LE11 RPi IR-Keytable

  • Hi

    I am using latest nightly for RPi4 and got argon 1 case with IR.

    I set up the keymaps file in /.config/rc_keymaps/ folder and also edited /.config/rc_maps.cfg to show "* * kodi" and kodi is name of the file I made for keymaps.

    however it only works if I type "ir-keytable -p nec" after sshing to the Pi.

    then it works until need boot when i have to re do the command to make it work.

    anyone know fix on how to make it permanent?

  • Go to Best Answer
  • Have you set the protocol in the keymap? Also did you use the old format or the new toml one? In the latter case you have to name the keymap file "kodi.toml".

    Please post your keymap if you have problems.

    so long,

    Hias

  • Have you set the protocol in the keymap? Also did you use the old format or the new toml one? In the latter case you have to name the keymap file "kodi.toml".

    Please post your keymap if you have problems.

    so long,

    Hias

    Yes protocol is set in the keymap and its old format.

    below is the file

    Code
    # table mecool, type: NEC                                                                                              0x19 KEY_MUTE                                                                                                          0x17 KEY_VOLUMEDOWN                                                                                                    0x13 KEY_VOLUMEUP                                                                                                      0x0d KEY_HOME                                                                                                          0x40 KEY_GREEN                                                                                                         0x42 KEY_RED                                                                                                           0x5a KEY_LEFT                                                                                                          0x06 KEY_UP                                                                                                            0x1b KEY_RIGHT                                                                                                         0x16 KEY_DOWN                                                                                                          0x1a KEY_ENTER                                                                                                         0x4D KEY_EPG                                                                                                           0x51 KEY_BACK                                                                                                          0x55 KEY_PAGEUP                                                                                                        0x15 KEY_PAGEDOWN                                                                                                      0x46 KEY_PLAYPAUSE                                                                                                     0x44 KEY_STOP                                                                                                          0x18 KEY_HOMEPAGE                                                                                                      0x08 KEY_REWIND                                                                                                        0x0b KEY_FASTFORWARD                                                                                                   0x59 KEY_POWER                                                                                                         0x45 KEY_MENU                                                                                                          0x05 KEY_EXIT                                                                                                          0x12 KEY_CONTEXT_MENU                                                                                                  0x0f KEY_0                                                                                                             0x52 KEY_1                                                                                                             0x50 KEY_2                                                                                                             0x10 KEY_3                      
  • The file looks a bit weird (everything in one line), double-check it's fine and doesn't have windows line-endings or other stuff.

    Also post the full output of ir-keytable -c -w .config/rc_keymaps/kodi

    With a cut-down version it works fine here. After reboot:

    Code
    LibreELEC:~ # cat .config/rc_keymaps/kodi 
    # table mecool, type: NEC
    0x19 KEY_MUTE
    0x17 KEY_VOLUMEDOWN
    LibreELEC:~ # cat .config/rc_maps.cfg
    * * kodi
    LibreELEC:~ # ir-keytable -r
    scancode 0x0017 = KEY_VOLUMEDOWN (0x72)
    scancode 0x0019 = KEY_MUTE (0x71)
    Enabled kernel protocols: lirc nec 

    ``

    so long,

    Hias

  • Checked the file and line ends were fine

    this is output of the command

    looks like it does not change the protocol to nec on boot unless you manually change it

    Code
    LibreELEC-PI:~ #  ir-keytable -c -w .config/rc_keymaps/kodi
    Read kodi table
    Old keytable cleared
    Wrote 34 keycode(s) to driver
    Protocols changed to nec

    Edited once, last by Nekromantik (May 21, 2022 at 8:52 PM).

  • Hmm, that looks OK. Please run the following command and post the output:

    Code
    udevadm control -l debug
    udevadm trigger -s input -c add
    pastekodi

    so long,

    Hias

  • Hmm, that looks OK. Please run the following command and post the output:

    Code
    udevadm control -l debug
    udevadm trigger -s input -c add
    pastekodi

    so long,

    Hias

    after pastekodi it hangs

    Code
    LibreELEC-PI:~ # udevadm control -l debug
    LibreELEC-PI:~ # udevadm trigger -s input -c add
    input5: Failed to write 'add' to '/sys/devices/virtual/input/input5/uevent': Cannot allocate memory
    LibreELEC-PI:~ # pastekodi
  • ix.io (which is used by pastekodi) sometimes has hiccups, just try running "pastekodi" again (or reboot and run all three commands again).

    so long,

    Hias

  • Then run "pastekodi -c > SOME_FILE_NAME" and upload the file here.

    so long,

    Hias

    here you go

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

  • Delete your .config/lircd.conf file - lirc will interfere with ir-keytable.

    so long,

    Hias

    hi

    it looks like its not fixed

    on a reboot the lircd.conf file gets restored

    cant find any settings to disable it and running "systemctl disable eventlircd" does not stick after reboot

  • This doesn't sound logical, nothing in LE will create a lircd.conf file. Either the SD card is bad or you have some script/addon/... installed that creates it.

    I'm not quite sure why you want to disable eventlircd but if you really want to do it use "systemctl mask eventlircd".

    so long,

    Hias

  • This doesn't sound logical, nothing in LE will create a lircd.conf file. Either the SD card is bad or you have some script/addon/... installed that creates it.

    I'm not quite sure why you want to disable eventlircd but if you really want to do it use "systemctl mask eventlircd".

    so long,

    Hias

    ah I found it.

    the Argon40 Add on was creating the lirc.conf file

    sadly if I remove it then the fan control on the case breaks as the argon script on its own dont work on LE11.

    I will try and make a lirc.conf for my remote and use that

  • anyone else can help?

    on boot ir-keytables only loads default-keymap and rc6 protocol and I have to do

    ir-keytable -c -w /storage/.config/rc_keymaps/kodi

    every boot to make remote work