The pain with the ir remote

  • Hello,

    newly created threads will remain inaccessible for others until approved by a moderator. Sorry for that!

    and now - the content: I know there is a lot's (really a lot!) of outdated information, documentation and threads about the use of ir remotes.

    Let's just start where I came of... back the old days before libreelec... the openelec days:

    In this times (was it v6?) my remote (a xbox 360 universial model or something like this it's called) looking like this:

    Xbox_360_remote.jpg

    Source: Microsoft XBox 360 Universal Remote Control - Official Kodi Wiki

    ...and this remote didn't worked out of the box but required a (more or less) correct keymap file. After adding the file it worked: Great! 8)

    Migration to libreelec (I think we are talking about v.7 now - but not sure) and it continued like that: Providing the right file in the right place -> Profit. :P

    Next version was a real bummer. I think it was libreelec v.8 and it just worked right out of the box! Without any configuration! Surprise! :love:

    Now I made the upgrade to libreelec v.9 and lost my remote and don't get it running anymore. ;(

    I found (after reading half on the remote related threads here) this link: Infrared Remotes [LibreELEC.wiki] which even mention the changes in librelec v9.

    And I did what was written:

    RPi specific changes

    Change dtoverlay=lirc-rpi to dtoverlay=gpio-ir in /flash/config.txt to switch to the newer gpio-rc-recv driver which replaces lirc-rpi.

    But my remote doesn't work. I (since always) used the default pins for the (tsop?) receiver on my raspberry. And no hardware changes.

    I'm more confused now after reading the wiki because It talks about a lot's of confusing things but doesn't tells me how I could use my remote which already worked out of the box in the past ;(

    Good old days? Maybe ?(

    Edited once, last by userfame (April 6, 2020 at 12:35 PM).

  • Thank's Klojum for approving my thread. That's so nice from you!

    I'm not sure if it's related but I was trying to do capture keypresses from the remote with

    Code
    rctest

    if this is right? I don't no. It's not mentioned in the documentation. My output looks like this:

    Code
    rctest[564]: Waiting for connection on channel 10 ...

    and nothing happens if I push buttons on my remote....

    Edited once, last by userfame (April 6, 2020 at 12:36 PM).

  • The essential sentence for LE 9.x.x is this:

    The option to enable / disable Lirc in LibreELEC settings has been removed as well, lircd will now be started automatically if the /storage/.config/lircd.conf file is present.

    Have you done this?

    PS: Please don't mix off-topic crap into your post. We have an off-topic sub-forum for this.

  • The essential sentence for LE 9.x.x is this:

    Have you done this?

    Not that I'm aware of. But isn't that the "fallback" mechanism and a ir remote like mine (which worked already out of the box in the past versions) should work without this modifications? Should the file be empty then? ?(

    I have the feeing LE 9 made a big step backwards regarding ir remotes.

    Edited 2 times, last by userfame: big (April 6, 2020 at 12:36 PM).

  • I'm more confused now after reading the wiki because It talks about a lot's of confusing things but doesn't tells me how I could use my remote which already worked out of the box in the past ;(

    The wiki page contains a very detailed step-by-step troubleshooting section Infrared Remotes [LibreELEC.wiki].

    Please follow the steps there and post the details what exactly doesn't work. Creating a poll but not providing any info isn't helping much in your case (unless you only want to rant).

    so long,

    Hias

  • The wiki page contains a very detailed step-by-step troubleshooting section Infrared Remotes [LibreELEC.wiki].

    Code: kodi:~ # ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event1) 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

    Looks good. My ir remote is a mce remote (listed here: List of MCE remote controls - Official Kodi Wiki) so maybe this mce_kbd thing could be useful.

    Code
    kodi:~ # ir-ctl -r

    But libreelec doesn't receive any commands. So I will need to check wiring and come back here...

    Edited once, last by userfame (April 6, 2020 at 12:36 PM).

  • So I will need to check wiring and come back here...

    I checked. Ground to Ground, 3.3V to 3.3V and the signal pin to GPIO 18 (should be default, at least it was in the past). With this wiring I had my remote running without problems the last years, after upgrade to libreelec9 the thing broke.

    My config.txt has this:

    Code: config.txt
    # enable the gpio-ir modules -> GPIO18
    dtoverlay=gpio-ir

    Edited once, last by userfame (April 6, 2020 at 12:36 PM).

  • Captain, we good pulse! And even space ^^

    Edited once, last by userfame (April 6, 2020 at 12:36 PM).

  • Sure? Isn't it an MCE remote, which needs LIRC?

    No and No.

    First of all MCE has become a rather generic term and a lot of remotes that don't use the original MCE remote protocol and scancodes have been marketed under that term.

    The original MCE remotes (plus scancodes) are supported out of the box with in-kernel/ir-keytable decoding via the rc6_mce keymap.

    The Xbox 360 remote uses the rc6/mce protocol as well but uses different scancodes so it needs a separate keymap (to map scancodes to keycodes) - see LibreELEC.tv/xbox_360 at libreelec-9.2 · LibreELEC/LibreELEC.tv · GitHub

    To make things easier for users we use a special multi-keymap by default so that the original Microsoft MCE remote, Xbox 360 and Xbox One keymaps are used instead of only the default rc6_mce keymap - see LibreELEC.tv/options at master · LibreELEC/LibreELEC.tv · GitHub

    Lirc is only needed for a few, rather odd, remotes that aren't supported by in-kernel decoding (which will become even fewer in LE10 where we support BPF protocol decoders via ir-keytable).

    so long,

    Hias

  • The Xbox 360 remote uses the rc6/mce protocol as well but uses different scancodes so it needs a separate keymap (to map scancodes to keycodes) - see http://LibreELEC.tv/xbox_360 at libreelec-9.2 · LibreELEC/LibreELEC.tv · GitHub

    That's interesting. Thank's a lot for this link.

    What I really don't understand is that it worked one time now without any additional configs (see pulse/spaces in my last post) and also the mapping was right out of the box (didn't tried all keys but successfully navigate thru kodi). Now, one day and a reboot later it doesn't work at all anymore :(

    I'm still on 9.2.0 and will do the update to 9.2.1 to see if something happens - don't have much hope but it's worth a try.

    Edited once, last by userfame (April 6, 2020 at 12:37 PM).

  • It might be best to check with a fresh install on a spare SD card. Could well be that you carried over some outdated config/scripts (autostart.sh, .config/udev.rules.d, .config/lircd.conf etc) that's now interfering.

    The only thing you need to change on a fresh install is adding the "dtoverlay=gpio-ir" line to config.txt - then Microsoft MCE (and Xbox 360) remotes should just work.

    If you're not getting pulse/space from ir-ctl -r then either some script/config/addon/... is messing with GPIO configs or it's the hardware.

    Be especially wary of addons that uses the hacky pi-gpio library or config.txt settings/overlays that enable pwm (which uses the same GPIO as your IR input).

    so long,

    Hias

  • It might be best to check with a fresh install on a spare SD card. Could well be that you carried over some outdated config/scripts (autostart.sh, .config/udev.rules.d, .config/lircd.conf etc) that's now interfering.

    Good point! The install was already an upgrade from a LE8 or something like that. I will give it a shot with a fresh install.


    The only thing you need to change on a fresh install is adding the "dtoverlay=gpio-ir" line to config.txt - then Microsoft MCE (and Xbox 360) remotes should just work.

    Very nice. That's what I'm used to. Good to hear that it's like this on LE9 and there is no regressions here :thumbup:

    Edited 3 times, last by userfame (April 6, 2020 at 2:38 PM).

  • I feel like I need to comment here as behaviour of the mce remotes has changed compared to earlier days.

    I have a acer mce rc6 remote and receiver.

    It had always worked fine in libreelec and still does.

    But since ubuntu 16.04 and Windows 10 it doesn't work on neither of these.

    Windows 10 barely any buttons work at all, ubuntu 16.04 onwards is pretty much the same but also doesn't wake the computer like it use to.

    But to be far through all of this whatever the libreelec guys do it's always worked for me.