This HowTo applies to following devices:
Odroid N2
Odroid C4
Odroid HC4
Amlogic devices with bl301 injection
About bl301 injection: CoreELEC BL301 Wake-Up feature [inject_bl301]
Use predefined IR wake up code
There is a list of predefined IR power codes available in CoreELEC settings.
Settings
CoreELEC
Hardware
IR Remote Power Code
Obtain IR wake up code by command line
Sometimes there is no matching IR power code predefined. Use this option to find your unique IR power code.
As CoreELEC uses meson-ir by default you are able to scan your IR remote wakeup code and apply it to your config.ini
. If you use meson-remote you have to temporary remove any remote.conf
located in /flash/
and/or /storage/.config
. After a reboot the meson-ir device will be active.
Firstly you need to SSH into your device and then stop the Kodi and eventlircd services:
systemctl stop kodi
systemctl stop eventlircd
Next you need to run ir-keytable with option -u
:
ir-keytable -u
Press now the desired button for wake up on your IR remote. If the decoded protocol is implemented a code like this will be shown:
Received IRMP code: remotewakeup='0xbf40fe01', decode_type='0x0', remotewakeupmask='0xffffffff'
Add this values in your config.ini
and reboot. On next suspend/power off you should be able to wake up the device with your previously scanned IR code.
Since 20210219 (name).remotewakeup user file is supported in CoreELEC-19:
Just place your custom IR wakeup code in a new file in /storage/.config
.
Example H96Pro+ remote: Filename: H96Pro+.remotewakeup
Content of the file:
remotewakeup='0xbf40fe01'
decode_type='0x0'
remotewakeupmask='0xffffffff'
After a reboot the IR wakeup code should become available in the predefined list in CoreELEC settings.
If you get a error message like this: /sys/class/rc/: No such file or Directory
please force first meson-ir
modus by touch a file like this: /storage/.config/remote.force_meson_ir
. After a reboot the command above should work. When the code got decoded the touched file can be deleted to be able to use meson-remote again.
If the decoded protocol is not implemented you will receive a message like this:
Received IRMP code: scancode='0x00251001', IRMP protocol = 7, decode_type is undefined!
Then a implementation/code mapping for u-boot would be needed.
If you receive nothing at all you will need to debug the IR pulses to detect the correct IR protocol:
echo 2 > /sys/module/rc_core/parameters/debug
The received IR pulses will be printed to the kernel console and can be read by entering dmesg
.
Edit config.ini
The easiest way is to insert your eMMC/SD card to a PC and edit the values remotewakeup
, decode_type
and remotewakeupmask
in the config.ini
file by a unix compatible file editor.
The second way is to update via SSH.
Make /flash
writable:
mount -o rw,remount /flash
Then edit the config.ini with your preferred editor like vi or nano:
nano /flash/config.ini
After saving type:
sync && reboot