[mythtv-users] IR control via evdev
Don Brett
dlbrett at zoominternet.net
Thu Aug 9 15:07:23 UTC 2018
On 8/8/2018 1:47 PM, Stephen Worthington wrote:
> On Wed, 8 Aug 2018 11:19:39 -0400, you wrote:
>
>> I'm building a new box with Ubuntu 18.04 and trying to get the remote
>> working, but ran into a snag. I'm following the instructions here:
>>
>> https://www.mythtv.org/wiki/User_Manual:IR_control_via_evdev
>>
>> This worked:
>>
>> don at andy:~$ sudo ir-keytable -t
>> Testing events. Please, press CTRL-C to abort.
>> 182.735877: event type EV_MSC(0x04): scancode = 0x800f0401
>> 182.735877: event type EV_KEY(0x01) key_down: KEY_NUMERIC_1(0x0201)
>> 182.735877: event type EV_SYN(0x00).
>> 182.869726: event type EV_MSC(0x04): scancode = 0x800f0401
>> 182.869726: event type EV_SYN(0x00).
>> 183.132071: event type EV_KEY(0x01) key_up: KEY_NUMERIC_1(0x0201)
>> 183.132071: event type EV_SYN(0x00).
>>
>> , but this did not:
>>
>> don at andy:~$ sudo ir-keytable -t -d /dev/event/input3
>> /dev/event/input3: No such file or directory
>>
>> don at andy:~$ sudo ir-keytable -t -d /dev/event/input4
>> /dev/event/input4: No such file or directory
>>
>> My box has /dev/input/event*, but does not have /dev/event. Trying the
>> next command:
>>
>> don at andy:~$ sudo ir-keytable
>> Found /sys/class/rc/rc0/ (/dev/input/event10) with:
>> Name: Media Center Ed. eHome Infrared Remote Transceiver
>> (0471:0815)
>> Driver: mceusb, 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
>> Enabled protocols: lirc rc-6
>> bus: 3, vendor/product: 0471:0815, version: 0x0000
>> Repeat delay = 500 ms, repeat period = 125 ms
>>
>> I have /dev/input/event10, so tried:
>>
>> don at andy:~$ sudo ir-keytable -t -d /dev/input/event10
>> Can't open lirc device: No such file or directory
>>
>> , so purged lirc, and tried it again; got the same results:
>>
>> don at andy:~$ sudo apt-get remove *lirc* --purge
>> don at andy:~$ sudo ir-keytable -t -d /dev/input/event10
>> Can't open lirc device: No such file or directory
>>
>>
>> Any suggestions?
>>
>> Don
> I do not see any problem there. You have ir-keytable working seeing
> an MCE remote on rc0 (/sys/class/rc/rc0/), and the setup shown seems
> fine. Just use that, and use "-s rc0" if you really need to select
> the remote. But it is defaulting to the correct device without any -s
> or -d options. I think you will find that "ls -al /sys/class/rc" will
> show only one remote.
>
> And be aware that lirc in 18.04 is a much later version (0.10.0) than
> in 16.04 (0.9.0). It uses different config files and programs
> (lirc-setup and irdb-get). So old configuration guides for lirc will
> likely lead you astray. See:
>
> http://www.lirc.org/html/configuration-guide.html
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Hmmm, maybe I don't have a problem, I think I misunderstood the
instructions. I thought I needed to include the device specification
when adjusting the timing, and had to use -d, but it accepts -d or -s or
default (no specification). With the -t (testing) switch, default and
-s work, but -d gave an unexpected result.
-t (testing) result with default:
don at andy:~$ sudo ir-keytable -t
Testing events. Please, press CTRL-C to abort.
-t (testing) result with -s:
don at andy:~$ sudo ir-keytable -t -s rc0
Testing events. Please, press CTRL-C to abort.
-t (testing) result with -d:
don at andy:~$ sudo ir-keytable -t -d /dev/input/event4
Can't open lirc device: No such file or directory
The wiki page instruction uses the -d switch to adjust timing, so I
assumed it wouldn't work. But, it looks like all three work when
setting the timing:
result with default:
don at andy:~$ sudo ir-keytable -D 500 -P 125
Repeat delay = 500 ms, repeat period = 125 ms
Changed Repeat delay to 500 ms and repeat period to 125 ms
result with -s:
don at andy:~$ sudo ir-keytable -D 500 -P 125 -s rc0
Repeat delay = 500 ms, repeat period = 125 ms
Changed Repeat delay to 500 ms and repeat period to 125 ms
result with -d:
don at andy:~$ sudo ir-keytable -D 500 -P 125 -d /dev/input/event4
Repeat delay = 500 ms, repeat period = 125 ms
Changed Repeat delay to 500 ms and repeat period to 125 ms
Note: I attached a different receiver (same model of hardware) and
re-ran ir-keytable, which gave me a different event number:
don at andy:~$ sudo ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event4) with:
Name: Media Center Ed. eHome Infrared Remote Transceiver
(0471:0815)
Driver: mceusb, 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
Enabled protocols: lirc rc-6
bus: 3, vendor/product: 0471:0815, version: 0x0000
Repeat delay = 500 ms, repeat period = 125 ms
All the remote buttons work in ir-keytable testing, but several don't
work in Myth, so I'll work on the keymapping next. Mine should be
similar to '/lib/udev/rc_keymaps/rc6_mce' . Thanks for the help,
Don
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the mythtv-users
mailing list