[mythtv-users] Joy and pain (Daryl McDonald)
NickS
nicks272 at yahoo.co.uk
Thu Feb 13 00:41:57 UTC 2014
I'm also running Mythbuntu (12.04) with a USB infrared receiver, and had the same problem. The following steps are how I've resolve it:
*** 1. Identify the /dev/lirc mappings created at boot-time:
~$ ls /dev/lirc*
/dev/lirc0 /dev/lirc1 /dev/lirc2 /dev/lircd
~$ dmesg | grep lirc
[ 7.675423] lirc_dev: IR Remote Control driver registered, major 250
[ 7.725757] rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0
[ 7.937544] rc rc1: lirc_dev: driver ir-lirc-codec (saa716x) registered at minor = 1
[ 11.655015] rc rc2: lirc_dev: driver ir-lirc-codec (cx23885) registered at minor = 2
In this case my mceusb device is number 0, i.e. /dev/lirc0 .
*** 2. Get more info on /dev/lirc0 :
~$ udevadm info -a -p $(udevadm info -q path -n /dev/lirc0)
looking at device '/devices/pci0000:00/0000:00:12.0/usb4/4-3/4-3:1.0/rc/rc0/lirc0':
KERNEL=="lirc0"
....
looking at parent device '/devices/pci0000:00/0000:00:12.0/usb4/4-3/4-3:1.0/rc/rc0':
....
looking at parent device '/devices/pci0000:00/0000:00:12.0/usb4/4-3/4-3:1.0':
....
looking at parent device '/devices/pci0000:00/0000:00:12.0/usb4/4-3':
ATTRS{idVendor}=="1784"
ATTRS{idProduct}=="0011"
....
*** 3. Create (or append to) the file /etc/udev/rules.d/z21-persistent-local.rules
the following udev rule:
KERNEL=="lirc*", ATTRS{idVendor}=="1784", ATTRS{idProduct}=="0011", SYMLINK+="input/irremote"
Note how the specified elements match the output from step #2 above.
*** 4. Reload the udev rules and test the new rule to make sure it works:
~$ sudo udevadm control --reload-rules
~$ sudo udevadm test -a -p $(udevadm info -q path -n /dev/lirc0)
You should see lines confirming that your rules file has been read, the rule has been applied and the link has been created:
....
parse_file: reading '/etc/udev/rules.d/z21-persistent-local.rules' as rules file
....
udev_rules_apply_to_event: LINK 'input/irremote' /etc/udev/rules.d/z21-persistent-local.rules:1
....
link_update: creating link '/dev/input/irremote' to '/dev/lirc0'
...
DEVLINKS=/dev/input/irremote
DEVNAME=/dev/lirc0
DEVPATH=/devices/pci0000:00/0000:00:12.0/usb4/4-3/4-3:1.0/rc/rc0/lirc0
*** 5. Of course step 4 was just a test, so restart udev and check that you can see the device link itself:
~$ sudo /init.d/udev restart
~$ ls -l /dev/input/irremote
lrwxrwxrwx 1 root root 8 Feb 13 00:19 /dev/input/irremote -> ../lirc0
*** 6. Update /etc/lirc/hardware.conf to specify the device:
REMOTE_DEVICE="/dev/input/irremote"
*** 7. Restart lirc:
~$ sudo /etc/init.d/lirc restart
And your remote should be working in the MythTV frontend :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140213/27a69eaa/attachment.html>
More information about the mythtv-users
mailing list