Can't make MCE remote work on release release 29.1+fixes

For discussion of topics specific to MythTV on linux
Post Reply
gpw928
Newcomer
Posts: 6
Joined: Tue Feb 12, 2019 5:59 am
Location: Rural NSW
Australia

Can't make MCE remote work on release release 29.1+fixes

Post by gpw928 » Wed Feb 13, 2019 12:07 am

Hi,

I have a recent copy of Debian 9 installed off the release ISO on physical hardware (Core 2 duo). It's updated to 9.7.

I got MythTV from github, and made the packages, which are mostly identified with this string in their name:
29.1+fixes.20190209.af5d819671-stretch
I had to apply a couple of hacks to get the packages made:
  1. install pwgen first (otherwise the database gets borked).
  2. modify a changelog by adding a "-stretch" to the end of the myth version (I'd like to post the URL, but that appears to be prohibited, so search this forum for "Error in trying to build MythTV v 0.29 in Debian 9.6").
Everything is working (well, there's an issue with VDPAU, but that's for another discussion), except the MCE IR remote (a Hauppauge 335), and that is a source of infinite pain (rc0 is the IT receiver, the others are tuners):

Code: Select all

[myth9.825] $ lsusb | grep Infrared
    Bus 001 Device 002: ID 0609:0334 SMK Manufacturing, Inc. eHome Infrared Receiver
    
[myth9.827] $ ir-keytable
    Found /sys/class/rc/rc1/ (/dev/input/event7) with:
            Driver dvb_usb_af9035, table rc-empty
            Supported protocols: nec
            Enabled protocols:
            Name: Leadtek WinFast DTV Dongle Dual
            bus: 3, vendor/product: 0413:6a05, version: 0x0200
            Repeat delay = 500 ms, repeat period = 125 ms
    Found /sys/class/rc/rc2/ (/dev/input/event8) with:
            Driver dvb_usb_af9035, table rc-empty
            Supported protocols: nec
            Enabled protocols:
            Name: Leadtek WinFast DTV Dongle Dual
            bus: 3, vendor/product: 0413:6a05, version: 0x0200
            Repeat delay = 500 ms, repeat period = 125 ms
    Found /sys/class/rc/rc0/ (/dev/input/event5) with:
            Driver mceusb, 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 rc-6
            Name: Media Center Ed. eHome Infrared
            bus: 3, vendor/product: 0609:0334, version: 0x0100
            Repeat delay = 500 ms, repeat period = 250 ms  
I first tried lirc, using the standard Debian package. There are several guides on the Internet for "devinput". Everything appeared to be functioning, except the kernel was intercepting IR keypresses:

Code: Select all

[myth9.133] # cat /sys/class/rc/rc0/protocols
    other unknown rc-5 nec [rc-6] jvc sony rc-5-sz sanyo sharp mce_kbd xmp cec [lirc]
Pressing the ">" key on the remote set off a cascade of repeated identical events in mythfrontend (causing the skin to iterate the display in circular conniptions). So I followed the advice on the mythtv wiki for LIRC -- "Double presses for certain buttons".

Which is, essentially:

Code: Select all

echo lirc > /sys/class/rc/rc0/protocols
which resulted in this:

Code: Select all

[myth9.134] # cat /sys/class/rc/rc0/protocols
    other unknown rc-5 nec rc-6 jvc sony rc-5-sz sanyo sharp mce_kbd xmp cec [lirc]
There-after, nothing worked. "irw" would not respond to the remote, nor would mythfrontend.

So I purged lirc, and tried ir-keytable.

Following several guides on the Internet, I manually created /etc/rc_keymaps/myrc6_mce, and then changed the rc-rc6-mce entry in /etc/rc_maps.cfg:

Code: Select all

    #driver      table               file
    *            rc-rc6-mce          myrc6_mce
It's working to the point where I can run "ir-keytable --test" and it spits out the 16 bit codes that I expect MythTV to be able to use, e.g. pressing the "0" button returns KEY_0, not KEY_NUMERIC_0:

Code: Select all

[myth9.851] # ir-keytable --test
Testing events. Please, press CTRL-C to abort.
1549952529.765649: event type EV_MSC(0x04): scancode = 0x800f0400
1549952529.765649: event type EV_KEY(0x01) key_down: KEY_0(0x000b)
1549952529.765649: event type EV_SYN(0x00).
1549952530.032719: event type EV_KEY(0x01) key_up: KEY_0(0x000b)
1549952530.032719: event type EV_SYN(0x00).
But MythTV front end does not respond to the remote, at all. Nothing.

I noticed that Wayland is now a default in Debian 9, so I switched back to Xorg. No change.

Dr Google says it should "just work". But it feels to me that the frontend needs to be told not to use lirc which is not running:

Code: Select all

[myth9.854] # grep lirc /var/log/mythtv/mythfrontend.log
Feb 12 16:32:47 myth9 mythfrontend.real: mythfrontend[1561]: E CoreContext lirc.cpp:210 (Init) LIRC: Failed to connect to Unix socket '/var/run/lirc/lircd'#012#011#011#011eno: No such file or directory (2)
I'm stumped. All insights welcome...

wesnewell
Senior
Posts: 512
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: Can't make MCE remote work on release release 29.1+fixes

Post by wesnewell » Wed Feb 13, 2019 6:32 am

Maybe this will help.
viewtopic.php?f=3&t=2977
If not then search my post with ir-keytable in them. I've covered this more than I want to and i hate typing.
BE/FE-Asrock AB350 Pro AMD Ryzen 3 2200G, 6 atsc tuners. Frontends-GF8200's,,AMD Athlon II's. Mythtv user since 2005.

gpw928
Newcomer
Posts: 6
Joined: Tue Feb 12, 2019 5:59 am
Location: Rural NSW
Australia

Re: Can't make MCE remote work on release release 29.1+fixes

Post by gpw928 » Wed Feb 13, 2019 11:04 pm

Hi,

Thanks for the response. I had already seen that thread. Everything familiar. Nothing new.

I should have mentioned that the hardware has been working in its current exact form on Debian 8 for several years with mythtv 0.27+fixes and lirc-0.9.3a (both from source, and I seem to recall that lirc had to be at that exact version to work).

I just plugged in a spare disk to scratch install Debian 9 and mythtv 0.29 because history suggested to me that it would be a struggle, and I wanted a full retreat path.

The balance of probability is that I am missing something, but I can't see what. Something needs to change. I'm thinking I will try mythbuntu 18.04.

Cheers,

wesnewell
Senior
Posts: 512
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: Can't make MCE remote work on release release 29.1+fixes

Post by wesnewell » Thu Feb 14, 2019 6:20 am

These are some ref sites I used when I switched from using lirc to ir-keytable a while back. Hope this helps.
http://atterer.org/mythtv-xmbc-remote-c ... thout-lirc
https://madaboutbrighton.net/articles/2 ... -ir-keymap
https://forum.kodi.tv/showthread.php?tid=101151
BE/FE-Asrock AB350 Pro AMD Ryzen 3 2200G, 6 atsc tuners. Frontends-GF8200's,,AMD Athlon II's. Mythtv user since 2005.

gpw928
Newcomer
Posts: 6
Joined: Tue Feb 12, 2019 5:59 am
Location: Rural NSW
Australia

Re: Can't make MCE remote work on release release 29.1+fixes

Post by gpw928 » Thu Feb 14, 2019 7:30 am

Hi,

Thanks for those. I had read them all. I just could not post the list as I am prohibited from posting URLs (presumably because I'm a novice to the forum).

I just installed lirc-0.10.1 from source and it's working (so far). I have not mapped all the keys yet, but it's looking promising. I will follow up when I have had a chance to test it fully (systemd config for lirc in /usr/local needed hacking).

Cheers,

wesnewell
Senior
Posts: 512
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: Can't make MCE remote work on release release 29.1+fixes

Post by wesnewell » Thu Feb 14, 2019 3:05 pm

What I like about ir-keytable over lirc is it works just like a keyboard in all programs with just the one keymap file so the app doesn't need support for it and you don't need an lircrc file for every app.. What is good about lirc is it supports raw data so the ir receiver isn't limited ti just the protocols supported by the ir receiver you use. The one thing I had to figure out was how to actually enable all the protocols supported by the receiver. Didn't find that documented anywhere, but it was simply to enable all of them in the first line of the keymap file.
BE/FE-Asrock AB350 Pro AMD Ryzen 3 2200G, 6 atsc tuners. Frontends-GF8200's,,AMD Athlon II's. Mythtv user since 2005.

Post Reply