How to configure IR wakeup code [Odroid N2]

This HowTo applies to following devices:

Odroid N2

Obtain IR power up 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.

Firstly you must SSH into your device and then Kodi and eventlircd services must be stopped.

systemctl stop kodi
systemctl stop eventlircd

Next you need to run ir-keytable with option u.

ir-keytable -u

Press now the desired button 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 the next suspend/power off cycle you should be able to wake up the device by your previously scanned IR code.

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 dmesg.

Edit config.ini

The easiest way is to move your eMMC/SD card to a PC and edit the values remotewakeup, decode_type and remotewakeupmask by a unix compatible editor.

The second way is to update it by a SSH connection.
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
2 Likes