-
Notifications
You must be signed in to change notification settings - Fork 30
07. CoreELEC: IR Wakeup Code
The information contained within this document applies to CoreELEC ONLY! |
---|
- Odroid N2
- Odroid C4
- Odroid HC4
- Generic Amlogic Devices with
bl301
injected
- Using a predefined IR wakeup code
- Obtaining the power code via SSH
- Using a remotewakeup user file
- Error messages
- Editing config.ini
CoreELEC comes with a list of predefined IR power codes. There are codes are for:
- Hardkernel
- Minix
- Beelink
- Beelink 2
- Khadas
- Khadas VTV
- 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
If a Meson_IR remote is used with the device, it is important to 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 the device and stop the Kodi and eventlircd services:
systemctl stop kodi
systemctl stop eventlircd
Next run ir-keytable with option -u:
ir-keytable -u
On the remote, press a preferred button to wake up the IR remote. If the decoded protocol is implemented a code similar to this one be shown:
Received IRMP code: remotewakeup='0xbf40fe01', decode_type='0x0', remotewakeupmask='0xffffffff'
Enter these values to 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/
The following example is for a H96Pro+ remote
touch /storage/.config/H96ProPlus.remotewakeup
vi /storage/.config/H96ProPlus.remotewakeup
insert:
remotewakeup='0xbf40fe01'
decode_type='0x0'
remotewakeupmask='0xffffffff'
[ESC] :wq [ENTER]
reboot now
After reboot the IR wakeup code should be available in CoreELEC settings.
When receiving:
/sys/class/rc/: No such file or Directory
force meson-ir modus first like this:
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 again.
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
A. External via a computer
The easiest way to edit the config.ini file is to insert the eMMC/(m)SD card with CoreELEC into a computer and edit the values remotewakeup, decode_type and remotewakeupmask with a unix compatible file editor like vi, nano or vim
B. Internal via SSH
SSH root@ip_address
Make /flash/ writable:
mount -o rw,remount /flash
Edit config.ini with a unix compatible editor:
vi /flash/config.ini
After saving type:
sync && reboot
Source Portisch
Repository for AmRemote & Meson IR Remote Controllers