Posts by HiassofT

    It's odd that enabling mce_kbd kills other input in kodi, this shouldn't happen. I haven't seen this on RPi yet and on x86 it also should work fine. Have you checked if restarting kodi helps?

    Combining MCE remote and MCE keyboard functionality is possible, and it's also rather easy to make that persistent.

    Copy the stock mce keymap from the system to .config/rc_keymaps, and give it a unique name so you later know what it's doing :)

    Code
    cp /usr/lib/udev/rc_keymaps/rc6_mce .config/rc_keymaps/mce_plus_keyboard

    then edit this file and add the "mce_kbd" protocol in the very first line - it should then look like this:

    Code
    # table rc6_mce, type: RC6,mce_kbd
    0x800f0400 KEY_NUMERIC_0
    0x800f0401 KEY_NUMERIC_1
    ...

    Now create a .config/rc_maps.cfg to activate that keymap. eg

    Code
    * * mce_plus_keyboard

    so long,

    Hias

    For mce_kbd everything's a lot simpler: just enable the mce_kbd protocol and Kodi should automatically pick up the device and everything should work.

    So just running "ir-keytable -p mce_kbd" (while kodi is running) should be enough. If not, try restarting kodi (systemctl restart kodi).


    so long,

    Hias

    mce_kbd is a bit different than the other IR protocols, if it's enabled a separate input event device will be created.

    To check if signals are properly received and decoded it's best to install the system tools addon and then use "evtest" (with kodi and eventlircd stopped) instead of "ir-keytable -t". Just select the event device that reads "MCE IR Keyboard/Mouse".

    eg:

    so long,

    Hias

    Thanks for the log!

    Unfortunately I can't help you here as you seem to be using a community build and I'm not aware of what changes there might be applied compared to official LibreELEC builds.

    So I'd suggest you ask the build maintainer, or maybe someone else familiar with these builds can chime in here.

    so long,

    Hias

    The output looks fine so far, kodi picked up both event devices and the udev info of the mouse device looks exactly like the one from the VRC-1100 remote (which works fine on LE 8.2.5 with eventlircd disabled, thus kodi accessing the mouse device - this remote also exposes KEY_HOMEPAGE and KEY_VOLUMEUP/DOWN via the mouse device).

    The kodi debug log should reveal what's going on.

    so long,

    Hias

    First check if kodi picked up both event devices - be careful, the numbers (event4/event5) might change across reboots, so verify via evtest or /proc/bus/input/devices that the numbers are correct. Run the following command and post the output

    Code
    lsof | grep /dev/input

    The output should look similar to this:

    Code
    749     /usr/lib/kodi/kodi.bin  /dev/input/event0
    749     /usr/lib/kodi/kodi.bin  /dev/input/event1
    749     /usr/lib/kodi/kodi.bin  /dev/input/event2
    749     /usr/lib/kodi/kodi.bin  /dev/input/event3

    You should see /usr/lib/kodi/kodi.bin both in the event4 and event5 lines

    Then we need some more info about both input devices. Run the following commands and post the output as well. This will tell us if the devices were classified as keyboard, mouse, joystick etc

    Code
    udevadm info /dev/input/event4
    udevadm info /dev/input/event5

    If kodi had picked up the /dev/input/event5 device (where you got HOMEPAGE, VOLUME, PLAYPAUSE) enable debug logging in kodi, then reboot, then press the HOME and PLAY buttons, then ssh in and post the kodi log file. This will tell us if kodi received the input and if yes if and how it processed it

    Code
    paste .kodi/temp/kodi.log

    so long,

    Hias

    When testing things make sure you have stopped kodi and eventlircd so no process is grabbing (taking away the events) from you. evtest will warn you if you try to access an input device which is grabbed, so it should be pretty obvious if that happens.

    evtest should then show all events that come from the input devices.

    The IR thing is not quite clear to me, did you see an IR receiver device when running "ir-keytable"? It's a bit unlikely that the USB receiver would expose both HID plus IR devices but you never know.

    so long,

    Hias

    Thanks a lot for sharing your lirc file!

    One problem with manual recording (both raw and standard mode) is that the measured values will never be 100% correct. The remote, IR receiver, SOC and OS all play a role in which values you get.

    If everything were perfect you'd see about 2-5 different lengths, because that's what the remote should be transmitting.

    So there's always some risk that some values are a bit on the edge and thus a lircd.conf file won't work on some other hardware or with another remote.

    That's why lirc now recommends using the profile mode where you manually select the remote's protocol (in-kernel decoding uses basically the same approach). But this won't help with non-standard protocols like the Xbox, the best one could do is to try to find some specs what the lengths should be and then manually clean up the file according to that (eg replace everything between 200 and 300 with 250 if that's what the nominal length would be).

    But then, often it works good enough as is so it's not really necessary.

    As for the KEY_ names: looking at the remote="devinput" section of Kodi's Lircmap.xml is a good approach. If in doubt look at what the Microsoft MCE remote is using (see /usr/lib/udev/rc_keymaps/rc6_mce), these KEY names are pretty much the standard when it comes to Kodi and IR remotes..

    so long,

    Hias

    Thank you HiassofT for all the detailed instructions. I have a remote with usb dongle. I followed your guide. What if some buttons dont register under evtest? For example I hit the Home button and it shows nothing, no event in evtest.

    What kind of remote and receiver is this? If it's an IR remote and the receiver shows up in "ir-keytable" you have to follow the guide in the wiki Infrared Remotes [LibreELEC.wiki]

    The remotes discussed in this thread are of a different type, they can be IR but also RF, the important difference is that the receiver shows up as a normal HID device, like a USB keyboard.

    Some of these receivers show up as 2 input devices, often one for the "keyboard"/"buton" part and one for "mouse". If that's the case also try the other one with evtest.

    For example the rather popular Ortek/Gmyle/Hama/... VRC-1100 exposes the volume buttons via the "mouse" input device. No one knows why the manufacturer choose to do this, but it's the way it is.

    Manufacturers might also have chosen to make some buttons only available in special modes - eg there might be a "mouse mode" button or sth like this on the remote which if pressed automagically enable some buttons - and maybe disable some other ones.

    Yes, it's weird, but thats how some manufacturers want their remotes to operate. As this is happening inside the remote and/or inside the receiver there's not much you can do about it.

    so long,

    Hias

    I have noticed this thread but I'm not familiar at all with the old amlogic / remote.conf thingy - so I can't help here.

    With LE9.0 Amlogic will finally switch to the standard ("ir-keytable") configuration so we just have a single method on all platforms.

    so long,

    Hias

    Hmmm "HID device except mice, keyboards, and joysticks" doesn't look like we'd get standard input (KEY) events from it.

    You could try installing the system tools addon, then ssh in, stop kodi and eventlircd (just to be sure) and check if you get something from evtest (if your device is listed, select it, then press a button on the remote and see if you get some output).

    Code
    systemctl stop kodi
    systemctl stop eventlircd
    evtest

    If this doesn't work it's probably easiest to just by a mceusb receiver (like the eg HP MCE USB receivers you find on ebay etc) these are usually very well supported.

    LibreELEC doesn't ship with any build tools, you have to cross compile it - see the wiki for details Compile [LibreELEC.wiki]

    Then you could create an (addon) package for the irmplircd daemon.

    As a quick hack you could also compile a statically linked binary on your Linux PC, copy that over and use that.

    That being said, implircd doesn't fit too well into the way LibreELEC uses remotes - LE expects to get linux input events, not a lirc socket. Therefore lircd is also used together with lircd-uinput. You'd probably have to do the same (run a lircd-uinput instance translating the output of implircd to linux input events).

    so long,

    Hias

    Never heard of irmplircd, but it looks like it's doing similar things like eventlircd (translating linux input events to lirc events) which is included in LibreELEC.

    What's happens if you don't run irmplircd, can you eg navigate with the arrow buttons in kodi?

    You can also try to change the eventlircd configuration so that it's picking up your IR receiver.

    First copy the eventlircd udev file to /storage/config/udev.rules.d/

    Code
    cp /usr/lib/udev/rules.d/98-eventlircd.rules /storage/.config/udev.rules.d/

    Then add a block with the usb vendor and product IDs of your IR receiver in the USB section of that rule file. sth like this

    Code
    ENV{ID_VENDOR_ID}=="XXXX", ENV{ID_MODEL_ID}=="YYYY", \
    ENV{eventlircd_enable}="true"

    After a reboot eventlircd should pick up your IR receiver and kodi should receive them as Lirc events (enable debug logging in kodi and check the kodi log).

    so long,

    Hias