after RPi3 -> RPi4 upgrade: Infrared remote not working anymore

  • I'm puzzled with my new Raspi4. I installed libreelec on it and restored the backup from my Raspi3 (same, latest LE version).

    Everything is there and works as expected - except my IR remote. (logitech harmony)


    I've connected the same IR receiver to the GPIO pins and set "dtoverlay=gpio-ir" in the config.txt

    What could be wrong?

    I even tried a clean reinstall because I read that the MCE IR should work out of the box - but no luck.


    Interestingly: reinstalling the RPi3 with latest libreelec version, restoring the backup and setting "dtoverlay=gpio-ir" leads to a working IR remote on the old RP3. Why not on the RPi4?


    Thanks for ANY hints!

    Andy


    PS: I followed Infrared Remotes [LibreELEC.wiki] but the debugging doesn't work like described. E.g. "ir-keytable -t" doesn't show any of my IR keys. It's very strange however that it shows scancodes from a third party remote: Why not from the Harmony? (BTW the exact same happens on the RPi3 where the IR remote is working - I'm confused)


    lechuza:~ # ir-keytable -t

    Testing events. Please, press CTRL-C to abort.

    874.589972: lirc protocol(nec): scancode = 0x6e10

    875.116653: lirc protocol(nec): scancode = 0x6e10

    ...


    lechuza:~ # lsb_release -a

    LibreELEC (official): 9.2.0


    lechuza:~ # ir-keytable

    Found /sys/class/rc/rc0/ (/dev/input/event4) with:

    Name: gpio_ir_recv

    Driver: gpio_ir_recv, table: rc-rc6-mce

    lirc device: /dev/lirc0

    Supported protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm

    Enabled protocols: lirc nec rc-6

    bus: 25, vendor/product: 0001:0001, version: 0x0100

    Repeat delay = 500 ms, repeat period = 125 ms

    Edited once, last by libreandy: more debugging info ().

  • No! I could not get /dev/lirc0 working on the Pi 4 until I changed the

    /boot/config.txt from dtoverlay=lirc-rpi to dtoverlay=gpio-ir,gpio_pin=18


    Now on to the next step:

    /dev/lirc0 now shows but when I try sudo /etc/init.d/lircd stop (then) mode2 -d /dev/lirc0

    I get nothing but I am still trying... for all I know I could have a bad remote.

    Edited once, last by wymand: updating as I go ().

  • Following the directions in the link above I finally got it to work.

    I had many problems. I had my IR receiver connected to pin 18 and

    had edited the modules file and the config.txt with that as the pin number.

    WRONG: It uses the BCM number which is 24. Also I had followed an instruction

    to list the entry as gpio-ir gpio_in_pin=24 I dropped the in so it is now

    gpio-ir gpio_pin=24 finally ir-ctl -d /dev/lirc0 -r started showing the output of

    the IR receiver.


    It is a pity that so many out dated and totally wrong instructions exist.

  • It is a pity that so many out dated and totally wrong instructions exist.

    This is true, but a general problem of stuff you find on the internet - the majority is either outdated or completely wrong. Better don't google for third-party info on the net but always refer to the official documentation.


    Therefore we have a wiki page with the current info - and it was linked in the first post of this thread:

    Infrared Remotes [LibreELEC.wiki]


    so long,


    Hias

  • Therefore we have a wiki page with the current info - and it was linked in the first post of this thread:

    Infrared Remotes [LibreELEC.wiki]

    Unfortunately it is NOT current as you can see by reading my post. The setup isn't valid for RPi4 anymore, it seems. And the troubleshooting tipps don't work like described.


    I'm still clueless. I followed wymand's advice and set gpio_pin to 24 but then "ir-keytable -r" doesn't show anything at all anymore. So I guess pin 18 is right BUT why is it showing codes from a third party remote but not from my Harmony which works with the RPI3? Ok, that might be a bug in ir-keytable but keypresses are not received by kodi. I have tried all the hints from the wiki ...


    I suspect that - although I stopped kodi and eventlircd - something is still reading the events and not processing them correctly. That would maybe explain why other scancodes get through.


    Do you guys have any other advice for me please?

    Edited once, last by libreandy ().

  • Are you sure your Harmony is set up right? In general it's recommended to configure the Harmony remotes to use the Microsoft Media Center (MCE) remote profile (NOT the MCE keyboard profile!), then it'll work out of the box with LE (you only need to add the dtoverlay=gpio-ir line to config.txt).


    If in doubt simply run ir-keytable -p all -t, that'll show scancodes of all supported protocols that the IR receiver saw. If you don't see anything from your Harmony remote, look at the Harmony config.


    so long,


    Hias

  • Are you sure your Harmony is set up right?

    Yes, otherwise the identical setup wouldn't work with the same libreelec version (and config) on the old Raspberry 3, would it?


    These scancodes are just the ones my Harmony sends to the Onkyo Receiver to change the volume.

    All the others keypresses are not there. :-(