Using the Ortek VRC-1100 IR Dongle with OSMC

Hi,

I recently received my Vero 4K+ box and have almost finished setting it up.

I’ve previously used LibreELEC on a Generic HTPC machine, which has now been retired to serve as a TVHeadend server and storage.

I would like to use my Ortek VRC-1100 IR dongle which previously worked fine in LibreELEC, with the keys coming through as LIRC events.

Here is the hardware info from /proc/bus/input/devices

I: Bus=0003 Vendor=05a4 Product=9881 Version=0110
N: Name="HID 05a4:9881"
P: Phys=usb-xhci-hcd.0.auto-2/input0
S: Sysfs=/devices/c9000000.dwc3/xhci-hcd.0.auto/usb1/1-2/1-2:1.0/0003:05A4:9881.0001/input/input2
U: Uniq=
H: Handlers=sysrq kbd event2
B: PROP=0
B: EV=120013
B: KEY=e080ffdf 1cfffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=05a4 Product=9881 Version=0110
N: Name="HID 05a4:9881"
P: Phys=usb-xhci-hcd.0.auto-2/input1
S: Sysfs=/devices/c9000000.dwc3/xhci-hcd.0.auto/usb1/1-2/1-2:1.1/0003:05A4:9881.0002/input/input3
U: Uniq=
H: Handlers=kbd mouse0 event3
B: PROP=0
B: EV=17
B: KEY=1f0000 0 2020000 3878 d801d001 1e0000 0 0 0
B: REL=103
B: MSC=10

This remote doesn’t generate LIRC events in osmc via eventlircd; instead, the buttons are coming through to kodi as keyboard presses.

I have a fairly heavily customised keymap which I migrated over from my LibreELEC installation. Instead of trying to get lirc working, I firstly decided to re-write my keymap to use the keyboard codes rather than remote codes. I have mostly got this working perfectly, but there is one problem I cannot overcome…

When used as a keyboard, the numeric input keys from the Ortek IR dongle map to the numpad input buttons. Unfortunately, there is a known issue in krypton, which I’ve come across before with this remote, whereby the numpad number keys do not work in the numeric input popup window when attempting to switch channels via LiveTV. And the numeric input windows cannot be influenced via keymaps. Ref: Numeric keypad problem (solved). I am therefore going to try to get the remote working under eventlircd (as it was in LibreELEC) as suggested on various kodi forum discussion threads for those trying to use an Ortek receiver (and possibly others).

I can see that the relevant evmap file already exists on osmc in /etc/eventlircd.d: https://github.com/osmc/osmc/blob/master/package/eventlircd-osmc/files/etc/eventlircd.d/03_05a4_9881.evmap

However, there is no rule in /lib/udev/rules.d/98-eventlircd.rules for this input device:

There is a udev rule for this device under LibreELEC which is likely why the remote worked with eventlircd under that distro:

So I think all that’s required is to add the relevant lines to /lib/udev/rules.d/98-eventlircd.rules

ENV{ID_VENDOR_ID}=="05a4", ENV{ID_MODEL_ID}=="9881", \
  ENV{eventlircd_enable}="true", \
  ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"

Before I do so, I’d just like to check that I’m not missing anything or completely barking up the wrong tree.

Should adding the above lines to 98-eventlircd.rules allow this dongle to be picked up by LIRC? or is there a better way to get this remote to play with LIRC.

Not sure but maybe in the old thread some hints?

Yes I read that thread, but it’s clear from the screenshots and examples that user was using the remote as a keyboard input device rather than as a LIRC device via eventlircd. I’m trying to get it to work with eventlirc.d for the reasons described in my original post.

Try the eventlircd rules and see if it improves things

I added the entry as proposed to /lib/udev/rules.d/98-eventlircd.rules and it worked a charm. The remote is being picked up by eventlircd, which has resolved the problems described above regarding numeric input.

Looks like a couple of minor changes may be required to 03_05a4_9881.evmap - for example the select button maps to KEY_ENTER, looks like that’d be better mapped to KEY_OK when using linux-input-layer (per the osmc remote). Will try find time to nail down the mappings over next few days.

When done should i PR my work, or would it best be left as a custoisation. If the latter, then any hints on making it so that my customisations to these 2 files are not lost on upgrades?

A PR would be great

I completed work last night on the evmap changes, so have now got the Ortek 1100 working perfectly under OSMC. I’ve just submitted a PR for this to be merged:

Cheers – I’ll take a look at this shortly.

Any news?

I’ll get these changes in later today

I merged and built this, but it seems to cause regressions for @JimKnopf

My understanding is his Hama remote is the same. I remember picking up the same remotes years ago and while they are branded differently, they should be electrically identical.

I’ve the same remotes from 2010 or so; and I remember working with @Dilligaf to work on the remote to ensure it functioned as best as possible. Unfortunately the remote has some limitations in that they send several remote codes for some presses.

The fact that the update has affected @JimKnopf suggests that they at least match on VID/PID.

I am sure he can give some more details as to the issues he’s experiencing.

Sam

Not sure what information I can provide. I’m using the following Hama MCE Remote Control

which doesn’t work anymore with the implemented change. The effect is a broken functionality of the OK and ENTER button with Leia. I placed logs and information at

It might be that even other keys does not work anymore but since the central function of the OK/ENTER buttons I stopped all further test activities.

Just looking into this.

In the meantime, I think you can get the OK/enter buttons working by creating a file named:

~/.kodi/userdata/Lircmap.xml

As follows

<lircmap>
  <remote device="linux-input-layer">
    <select>KEY_ENTER</select>
  </remote>
</lircmap>

Hi @sam_nazarko

The new version of the package (1.3.1) broke things for me too on my Vero4k+

After upgrading, it looks like this file is missing the change I made:
/etc/eventlircd.d/03_05a4_9881.evmap

I can see it was committed to the master osmc git branch as per my PR:

However, I took a look in the package itself using:
sudo apt-get --download-only --reinstall install armv7-eventlircd-osmc

Followed by
ar vx armv7-eventlircd-osmc_1.3.1_armhf.deb

And
tar -xvf data.tar.xz

From this, I can see that my change to this file made it into the package:
lib/udev/rules.d/98-eventlircd.rules

But my changes to this file did not:
etc/eventlircd.d/03_05a4_9881.evmap

Did something go wrong with the packaging, or is there another version of the 03_05a4_9881.evmap file knocking around somewhere in the git repository that we’ve missed?

Edit: I wonder whether this file is taking precedence:

I downgraded via apt-get install --reinstall armv7-eventlircd-osmc=1.3.0 but will monitor this thread, only.

This is something you (@jahutchi) and @sam_nazarko have to negotiate. I come back into play if any change should be tested with the original Hama Remote+Receiver set. Sad story that the same IR receiver (or at least one with the same VID/PID) was sold with two different remote controls.

@sam_nazarko

I dug further, and the problem is that there are a small number of evmap files in the osmc/eventlircd project (only 5 in total, but including 03_05a4_9881.evmap):

https://github.com/osmc/eventlircd/tree/master/etc

When building the package, these are taking precedence over evmap files in the main osmc project:
https://github.com/osmc/osmc/tree/master/package/eventlircd-osmc/files/etc/eventlircd.d

I can see two ways to resolve this:

  1. Update https://github.com/osmc/eventlircd/blob/master/etc/03_05a4_9881.evmap with my new version.
  2. Delete https://github.com/osmc/eventlircd/blob/master/etc/03_05a4_9881.evmap
    & Remove related line from: https://github.com/osmc/eventlircd/blob/master/etc/Makefile.am

Either solution will also require a version bump in:
https://github.com/osmc/osmc/blob/master/package/eventlircd-osmc/build.sh

I don’t know the history WRT why evmap files are maintained in both locations, so not sure on which is the best way to resolve this, such that the updated 03_05a4_9881.evmap file gets included when the package is built.

@sam_nazarko @jahutchi:

I took the time and upgraded armv7-eventlircd-osmc to version 1.3.1 but in addition placed @jahutchi`s new file /etc/eventlirc.d/03_05a4_9881.evmap.

I can confirm that my Hama MCE Remote Control works as designed now with this change. To my astonishment the info button even works now 100% which wasn’t before although I do not see any change to this in @jahutchi’s fixes. Good job.

Wait … there is some changed functionality with one button on the Hama. Give me some time.

On the Hama MCE Remote Control on the top left is a button with a symbol like “@”.

With armv7-eventlircd-osmc 1.3.0 the button behaves like the ESC or HOME key (jumps to previous menu or home screen) :

18:13:12.011 T:1917812736   DEBUG: Keyboard: scancode: 0xac, sym: 0x00ac, unicode: 0x0000, modifier: 0x0
18:13:12.011 T:1917812736   DEBUG: HandleKey: browser_home (0xf0b6) pressed, action is ActivateWindow(Home)

With armv7-eventlircd-osmc 1.3.1 and @jahutchi’s evmap file content this button has no function anymore and you see in the logs:

17:58:07.306 T:1908404976   DEBUG: LIRC: - NEW 96 0 KEY_WWW linux-input-layer (KEY_WWW)
17:58:07.329 T:1918095360   DEBUG: HandleKey: 0 (0x00, obc255) pressed, action is
17:58:07.338 T:1908404976   DEBUG: LIRC: - NEW 96 0 KEY_WWW_UP linux-input-layer (KEY_WWW_UP)
17:58:07.349 T:1918095360   DEBUG: HandleKey: 0 (0x00, obc255) pressed, action is
17:58:09.002 T:1908404976   DEBUG: LIRC: - NEW 96 0 KEY_WWW linux-input-layer (KEY_WWW)
17:58:09.039 T:1918095360   DEBUG: HandleKey: 0 (0x00, obc255) pressed, action is

I corrected this in file 03_05a4_9881.evmap by modifying first line to

KEY_HOMEPAGE = KEY_HOME # home/main menu

so, this kind of change has to be integrated otherwise the Hama Remote Control owners loose functionality using @jahutchi’s modifications.

@jahutchi Can you confirm your Ortek IR receiver and your remote control still works with this change?

When I merged this, I skimmed over the commit, and assumed that you were just bumping the git rev to eventlircd-osmc in the OSMC repo.

The correct evmap (when established) needs to be PR’d to eventlircd-osmc repository.