coreelec:irwakeup

Configure IR Wakeup Code

This information applies to following devices:

CoreELEC comes with a list of predefined IR power codes. There are codes are for:

  • Hardkernel
  • Minix
  • Beelink
  • Khadas
  • MCE

This option can be accessed by navigating to:

  • Settings
  • CoreELEC
  • Hardware
  • IR Remote Power Code

If there is no matching IR power code predefined, this option can be used to find the devices unique IR power code.

Since CoreELEC uses Meson_IR by default, it is possible to scan a device for the IR remote wakeup code and apply this code to the file config.ini

IMPORTANT: If a Meson_IR remote is used with the device, remove or rename any remote.conf located in:

/flash/

and, or:

/storage/.config/

After a reboot the meson-ir device will be active.

  • SSH into device and stop the Kodi and eventlircd services:
systemctl stop kodi
systemctl stop eventlircd
  • run ir-keytable with option -u
ir-keytable -u
  • press the desired button for wake up on the IR Remote

If the decoded protocol is implemented a code like will show:

Received IRMP code: remotewakeup='0xbf40fe01', decode_type='0x0', remotewakeupmask='0xffffffff'
  • Enter these values in the config.ini file.

On the next suspend/power off, the device should now be able to wake up by pressing the preferred button with the previously scanned IR code.

Support for a remote wakeup user file was implemented into CoreELEC February 2021

Naming convention:

(name).remotewakeup 
eq: mytvbox.remotewakeup

Custom wakeup code file syntax:

remotewakeup='0xaabbffff'
decode_type='0x0'
remotewakeupmask='0xaabbffff'

Location: /storage/.config/

touch /storage/.config/H96ProPlus.remotewakeup
vi /storage/.config/H96ProPlus.remotewakeup
  • insert
remotewakeup='0xbf40fe01'
decode_type='0x0'
remotewakeupmask='0xffffffff'
  • [ESC] :wq [ENTER]
  • reboot

After reboot the IR wakeup code should be available in CoreELEC settings.


Error messages

When receiving:

/sys/class/rc/: No such file or Directory
  • force meson-ir modus:
touch /storage/.config/remote.force_meson_ir
reboot now

After reboot the above command should work, and the file remote.force_meson_ir can be deleted to re-enable the meson-ir protocol.

If the decoded protocol is not implemented a message similar to this one will appear:

Received IRMP code: scancode='0x00251001', IRMP protocol = 7, decode_type is undefined!

In this case an implementation/code mapping for u-boot would be needed.

If there is no message, the IR pulses need to be debugged 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

config.ini can be edited in 2 different ways:

The easiest way to edit the config.ini file is to insert the USB Flash Drive or (μ)SD card with CoreELEC into a Personal Computer and edit the values remotewakeup, decode_type and remotewakeupmask with a unix compatible file editor.

SSH root@ip_address
  • make /flash writable
mount -o rw,remount /flash
  • edit config.ini
vi /flash/config.ini
  • enter:
sync && reboot