My MCE remote stopped working, changes to lirc?

  • I got an MCE remote I've use for ten years. First in Ubuntu and XBMC, later OpenELEC and now latest years LibreELEC. At first I use the IR receiver that came with the remote, but for 1-2 years I've used a Intel NUC with built in IR instead.

    During all upgrades of OpenELEC and LibreELEC the remote has still worked. I got a customized remote.xml in ~/.kodi/userdata/keymaps that I've kept during the years, where I've edited some stuff. The four colored buttons I got on the remote I don't want Kodi to use, but instead they are mapped with irexec/lirdrc to four different scripts that force a restart of LibreELEC or force Kodi to restart. irexec are configured by the file .lircrc in ~/.config

    But, yesterday, the remote didn't work. First I thought it was the batteries, even though I say the remote to light up when I pressed the buttons. Changing them didn't help. I also connected the IR receiver mentioned above, and I can see that it flashes when I press a button on the remote (like if the remote actually do send something), but Kodi doesn't do anything.

    I know that I found the option in the LibreELEC settings, to enable Lirc, and I might have enabled that. Because, as I told you, it worked even before that.

    Is there a way to test my remote like in a terminal, or something else I can do to get it to work again? Are there any changes done lately? BTW, I'm on LibreELEC 8.0.1 Generic Build, Intel.

    Thanks.

    /Söder

  • Could you tell us more about your setup, did you add special config files, how are you starting irexec, did you update LibreELEC or something else before it stopped working? Have you actually been running lircd before, i.e. was lirc enabled in LE settings (irexec can work without lircd, too).

    With an MCE remote and the builtin receiver it's generally recommended to disable lirc. The kernel then takes care about decoding the remote signals. Lirc is only needed for remotes with odd protocols that aren't supported by the kernel.

    First check with irw:

    Code
    irw


    This checks the remote buttons right before they enter kodi. If you see buttons here, check with kodi conf.

    If you are using lirc to decode remote buttons (check with ps if lircd and lircd-uinput processes are running) you can use irw to see if lircd is working correctly:

    Code
    irw /run/lirc/lircd-lirc0


    if this works, then either lircd-uinput or eventlircd aren't working correctly.

    If you get nothing, test with mode2 to see if the IR receiver receives any signals:

    Code
    mode2

    In case you are not running lircd you first have to stop kodi and eventlircd - if they are running they'll interfere with the tests.

    Code
    systemctl stop kodi
    systemctl stop eventlircd

    Run ir-keytable to see if the kernel IR decoder is setup properly. The output should look like this:

    Code
    LibreELEC:~ # ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event1) with:
            Driver gpio-rc-recv, table rc-rc6-mce
            Supported protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce-kbd rc-6 sharp xmp
            Enabled protocols: lirc nec rc-6
            Name: gpio_ir_recv
            bus: 25, vendor/product: 0001:0001, version: 0x0100
            Repeat delay = 500 ms, repeat period = 125 ms


    Check that you have the "rc-rc6-mce" table and "nec" and "rc-6" listed amongst the enabled protocols.

    Also test the kernel can decode the remote signals:

    Code
    ir-keytable -t

    If you still don't see anything and lirc is listed under supported protocols you can use "mode2" as above as well to check if any IR signals are received.

    so long,

    Hias

  • Hi, and thanks for your reply. And what a reply! Great stuff!

    First, about my setup. It's a Intel NUC (NUC5CPYH). About the custom files, it's just the remote.xml that's in the main (not user path) kodi path, copied to my /.kodi/userdata and edited some stuff. No big things.

    My lircrc is started with the autostart.sh with this lines.

    Bash
    #!/bin/sh 
    
    
    #start IRexec
    /usr/bin/irexec -d /storage/.config/.lircrc


    I didn't do any update to LibreELEC right before my remote stopped working. The only thing I can think of is that i MIGHT have switched the lirc option in the LibreELEC addon in Kodi. I saw it, and thought "hey, shouldn't this be enabled since I use a remote". But even if I disable and reboot, the remote still doesn't work. It might also be that I switched the lirc option before the weekend, and it was first yesterday I rebooted LibreELEC (even though I think I rebooted LibreELEC because it did respond to the remote and I did a hard reboot, but it might be something else that forced me to do a reboot also...).

    As I said, I don't think I had that option enabled before, and my remote and irexec worked anyway it seems.

    When I run "irw" in a terminal and press the remote, nothing happens. When I run "mode2" this happens.

    About the other tests you asked me to do, this is the result of them. It looks like I got what you asked for, but with the last test nothing happens when I press buttons on the remote.

    EDIT: It doesn't got all the things that should be enabled. Missing "nec" and "rc-6" listed amongst the enabled protocols.

    In ~/.config I got a file called remote.conf, where the line that not has a # in front says " REMOTE_BACKEND="lirc" "

    In ~/.kodi/userdata I got a file called Lircmap.xml that looks like this


    I hope this can give you some more information about what might have gone wrong for me. As I said, everything has worked just great with the remote before this. I've once learned how it all worked with the config files and then forgot about it again, but since OpenELEC and LibreELEC I got kind of spoiled with the lirc part just working. =)

    Thanks.

    /Söder

    Edited once, last by soder (May 3, 2017 at 6:32 PM).

  • With mode2 outputting something we know that your remote and the IR receiver is working, but somehow it's not decoding the signals.

    Make sure lirc is disabled in LE settings, reboot once then ssh in and post the output of the following commands:

    Code
    ir-keytable | paste
    ir-keytable -r | paste
    dmesg | paste
    journalctl -a | paste

    so long,

    Hias


  • Not some more protocols was enabled, but the remote still doesn't work.

    Here the url's.
    jigA
    EdZj
    ifdF
    EOeC

    Thanks once again..

    /Söder

    Could you repost the ir-keytable output? I'm always forgetting we need 2>&1 there :)

    Code
    ir-keytable 2>&1 | paste

    ir-keytable -r output and dmesg/journalctl output is looking fine, not sure what's going wrong.

    BTW: please also try to install the "System tools" addon (from the LibreELEC repository), then stop kodi and eventlircd and do a test with evtest

    Code
    evtest


    select the event device corresponding to your remote and press some keys, then post the output here

    so long,

    Hias

    Edited once, last by HiassofT (May 3, 2017 at 7:01 PM).

  • Here's the new url. WDGA

    Actually, I installed the system tools last night.
    This is the output of evtest: *********************************************** LibreELEC-NUC:~ # systemctl sto - Pastebin.com

    /Söder

    Edited once, last by soder (May 3, 2017 at 7:14 PM).


  • Thanks, this is looking interesting:

    Code
    Event: time 1493835120.131142, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f2421
    Event: time 1493835120.870720, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f241e
    Event: time 1493835121.486192, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f2420
    Event: time 1493835122.144904, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f241f
    Event: time 1493835123.086740, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f2402

    The scancodes (value in the lines above) are looking similar to the rc6-mce scancodes, except they start with 0x800f2 instead of 0x800f0. Here's a snipped from /usr/lib/udev/rc_keymaps/rc6_mce:

    Is there maybe some switch or key-combination on your remote to switch between different "remote addresses" (like on old VCR remotes where you could switch between VCR1 and VCR2)?

    You could also try downgrading to LE8.0.0 but I don't think that'll change much - can't remember there being any changes in kernel rc-6 decoding between the 8.0.0 and 8.0.1 kernels.

    so long,

    Hias

  • I don't think there is some kind of switch. At least not HW switch.

    My kid has the last year some times dropped the remote on the floor, but I guess it's unrealistic that it would be this way by being half broken, isn't it?

    I don't think it has with 8.0.1 to do, but instead with me flipping the lirc switch in settings.

    There's no files that's missing I should have, that might be deleted when the switch is enabled? Stuff in /run/lirc or something? Or something that's not being loaded by default during boot?

    /Söder

    Sent from my ONEPLUS A3003 using Tapatalk

  • Hi,
    I had the same issue a few days ago; I also have the same configuration, with Logitech harmony remote configured as MCE.

    I was navigating through Kodi settings, I think I entered "Peripherals" or "Devices" section in "System/Input" and my remote stopped to work (maybe I switched something about joypad controllers ).
    I also tried to investigate the problem in terminal without any success...
    I eventually solved just following the "Manual Update" procedure (just copied the generic update image to /storage/.update/ ).
    Hope this could help you, however I'd also like to understand what happened.

    Edited once, last by z3rodivide (May 4, 2017 at 5:44 PM).


  • Hi,
    I had the same issue a few days ago; I also have the same configuration, with Logitech harmony remote configured as MCE.

    I was navigating through Kodi settings, I think I entered "Peripherals" or "Devices" section in "System/Input" and my remote stopped to work (maybe I switched something about joypad controllers ).
    I also tried to investigate the problem in terminal without any success...
    I eventually solved just following the "Manual Update" procedure (just copied the generic update image to /storage/.update/ ).
    Hope this could help you, however I'd also like to understand what happened.

    It wasn't that easy for me. Just did a "manual update" and no change...

    I also disabled the Joystick Support addon. No change...


    /Söder

    Edited once, last by soder (May 4, 2017 at 6:43 PM).

  • The puzzling thing is I have no idea how that remote could work before if it always transmitted 0x800f2xxx scancodes. These scancodes were never supported by in-kernel decoding and I also don't think they'd work when using userspace lirc.

    Googling for the scancode brought up and older post on the OE forum, there a user had a similar issue:
    OpenELEC Mediacenter - OpenELEC Forum - Rosewill RHRC-11002 MCE remote not working (1/2)

    If you can't find out what changed on your setup you could just copy /usr/lib/udev/rc_keymaps/rc6_mce to /storage/.config/rc_keymaps/my-mce, change the 0x800f0xxx codes to 0x800f2xxx, and activate that via /storage/.config/rc_maps.cfg:

    Code
    * rc-rc6-mce my-mce

    so long,

    Hias


  • The puzzling thing is I have no idea how that remote could work before if it always transmitted 0x800f2xxx scancodes. These scancodes were never supported by in-kernel decoding and I also don't think they'd work when using userspace lirc.

    Googling for the scancode brought up and older post on the OE forum, there a user had a similar issue:
    OpenELEC Mediacenter - OpenELEC Forum - Rosewill RHRC-11002 MCE remote not working (1/2)

    If you can't find out what changed on your setup you could just copy /usr/lib/udev/rc_keymaps/rc6_mce to /storage/.config/rc_keymaps/my-mce, change the 0x800f0xxx codes to 0x800f2xxx, and activate that via /storage/.config/rc_maps.cfg:

    Code
    * rc-rc6-mce my-mce

    so long,

    Hias

    I will try this. BTW, is possible that the remote is broken, in a way that it sends different signals now? A longshot?

    Edit: I tried it, and it didn't work. But when I read the thread you linked to, they say that since irw doesn't do anything itself (not without killing stuff, they have done some more stuff.)

    /Söder

    Edited once, last by soder (May 5, 2017 at 2:25 PM).


  • I will try this. BTW, is possible that the remote is broken, in a way that it sends different signals now? A longshot?


    As I wrote before, it could be that the controller inside the remote can be configured to different "addresses" (scancodes), either by a hardware-switch, solder-bridge or by some magic button combination (the latter should usually be reset by removing batteries). But this is just a wild guess (consumer electronics remotes often can do that, so you can control 2 TVs/VCRs/DVD-players etc in the same room without interfering), not sure if this is true for your remote at all.

    [quote]Edit: I tried it, and it didn't work. But when I read the thread you linked to, they say that since irw doesn't do anything itself (not without killing stuff, they have done some more stuff.)[/code]
    Could you be more specific what you had done?

    After creating the keytable try to read it in via ir-keytable

    Code
    ir-keytable -c -w /storage/.config/rc_keymaps/my-mce


    Then read it back and verify it's the same you created (ir-keytable will silently ignore some errors when "loading" a keytable, so it could be that some or all keys were missed):

    Code
    ir-keytable -r

    When that had worked, check if loading via rc_maps.cfg works. But first clear the current table:

    Code
    ir-keytable -c


    Then run ir-keytable in auto-load mode with your rc_maps.cfg:

    Code
    ir-keytable -s rc0 -a /storage/.config/rc_maps.cfg


    Now, again read it back (via ir-keytable -r) and verify it's the one you created.

    If all that worked so far, check if it's being picked up automatically on boot (note that this only works in LE 8.0.1 and newer, older versions didn't support this). Reboot your box and then read back the keytable and verify it's the same (or try pressing buttons and check if that works).

    If the reboot-test failed, please post your journalctl -a output.

    If you get any errors from the commands above or if the output differs from the expected one please post your keymap file, the rc_maps.cfg file and any errors/warnings you got on the console.

    so long,

    Hias

  • Hmm, all I did was to create the my-mce and rebooted, and then tested in Kodi. =)

    Now I started with all you other lines, and I got some error I thought was strange. I then checked my files again, and found a typo.

    I had named the file my_mce instead of my-mce (because of rc_maps.cfg I guess). Renamed it again, and rebooted, and now the remote works.

    It must be like you said, that probably a solder bridge has gone of in the remote (there's something loose in it, damn kids =( ) and causing the remote to speak in other codes. Or, if the same kid in some way pushed a combo, causing this, but I don't think that's possible.

    Anyway. Thanks for your support. I owe you a big one!

    /Söder

  • This is all really strange. My MCE remote (via harmony) stopped yesterday. have been trying to get it back to work for an hour now (Hope I haven't messed up Harmony settings now). Trying a restore first, made a kodi backup two weeks ago.

    Running 8.0.1 on Pi2 device, did not update this last week.

    Edited once, last by jaspov (May 7, 2017 at 12:08 PM).


  • This is all really strange. My MCE remote (via harmony) stopped yesterday. have been trying to get it back to work for an hour now (Hope I haven't messed up Harmony settings now). Trying a restore first, made a kodi backup two weeks ago.

    Running 8.0.1 on Pi2 device, did not update this last week.


    Please do the checks as outlined in post #2 of this thread: thread-8016-post-48094.html#pid48094

    Also please post what kind of IR receiver you are using (USB or GPIO) and in case of a GPIO receiver which driver you are using (lirc-rpi or gpio-ir).

    so long,

    Hias