[mythtv-users] Trying To Get Two IR Receivers Working

Karl Newman newmank1 at asme.org
Wed Oct 14 15:21:29 UTC 2015


On Wed, Oct 14, 2015 at 7:28 AM, Kirk Bocek <t004 at kbocek.com> wrote:

> I'm still trying to get two different IR receivers working with my ECS
> Liva running Fedora 22 and the distro Lirc 0.9.2a packages. I am testing
> with a generic IR remote configured as an MCE remote and which works with a
> *different* Fedora 21 + Lirc 0.9.1a + Microsoft IR receiver setup.
>
> [169913.509997] input: PHILIPS MCE USB IR Receiver- Spinel plus as
> /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:0471:20CC.0003/input/input11
> [169913.562365] hid-generic 0003:0471:20CC.0003: input,hiddev0,hidraw2:
> USB HID v1.00 Keyboard [PHILIPS MCE USB IR Receiver- Spinel plus] on
> usb-0000:00:14.0-2/input0
>
>
See that "input11"? That's an important piece of information.


> irw does not work, yielding an error about /dev/lirc0. ir-keytable also
> does not work:
>
> $ir-keytable -d /var/run/lirc/lircd
> Can't open device: No such device or address
>

That's the wrong file. I believe that lircd file is a named pipe used to
communicate with the lirc daemon. ir-keytable is independent of lirc. The
help for ir-keytable shows this:
On the options bellow, the arguments are:
  DEV      - the /dev/input/event* device to control

First just run ir-keytable and see what it finds. If it finds nothing, then
try testing it with ir-keytable -t -d /dev/input/event11 and see what you
get. (If you reboot or replug the receiver, check dmesg | grep input for
possible new numbers).

Once I had it figured out I created a udev rule to create a stable symlink
for the device (mine has both a keyboard and mouse device; the remote
button commands generally come via the keyboard interface). Note that if
you want to use lirc you may need to specify that device explicitly, which
means you'll likely need a similar udev rule. Here's mine:

KERNEL=="event*",SUBSYSTEM=="input",ATTRS{idVendor}=="05a4",ATTRS{idProduct}=="9881",IMPORT{program}="input_id
%p"
KERNEL=="event*",SUBSYSTEM=="input",ATTRS{idVendor}=="05a4",ATTRS{idProduct}=="9881",ENV{ID_INPUT_KEYBOARD}=="1",ACTION=="add",SYMLINK="input/irremote0",RUN+="/usr/bin/ir-keytable
--set-key=0x70029=KEY_BACKSPACE,0x7002a=KEY_ESC --device
/dev/input/irremote0"
KERNEL=="event*",SUBSYSTEM=="input",ATTRS{idVendor}=="05a4",ATTRS{idProduct}=="9881",ENV{ID_INPUT_MOUSE}=="1",ACTION=="add",SYMLINK="input/irremote1",RUN+="/usr/bin/ir-keytable
--set-key=0x90002=KEY_M --device /dev/input/irremote1"

You can probably strip the RUN+= clause; I'm using it to remap keys. Mine
is slightly more complicated because of the combined mouse and keyboard,
which I think is why I needed the first line which identifies which input
type it is. You could probably try just the following in
/etc/udev/rules.d/10-irremote.rules (customize for your USB id, obviously):
KERNEL=="event*",SUBSYSTEM=="input",ATTRS{idVendor}=="05a4",ATTRS{idProduct}=="9881",ACTION=="add",SYMLINK="input/irremote0"

Then use that /dev/input/irremote0 for the --device argument to lircd. If
you're using hardware.conf you'll have to figure out where to put it (I'm
on Gentoo, which doesn't use that file).

Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20151014/c893a718/attachment.html>


More information about the mythtv-users mailing list