[mythtv-users] Fix lirc devices to desired names

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Aug 31 15:37:46 UTC 2014


On Sun, 31 Aug 2014 12:30:24 +0200, you wrote:

>Hello all,
>
>I have two IR device in my frontend, and integrated CIR and USB MCE:
>
>$ dmesg | grep lirc
>[    3.710645] lirc_dev: IR Remote Control driver registered, major 251
>[    3.721774] rc rc0: lirc_dev: driver ir-lirc-codec (nuvoton-cir)
>registered at minor = 0
>[    3.721921] rc rc1: lirc_dev: driver ir-lirc-codec (mceusb)
>registered at minor = 1
>
>So there are 2 lirc devices:
>
># ls -l /dev/lirc*
>crw-rw---T 1 root video 250, 0 Aug 31 10:22 /dev/lirc0
>crw-rw---T 1 root video 250, 1 Aug 31 12:22 /dev/lirc1
>lrwxrwxrwx 1 root root      21 Aug 31 12:22 /dev/lircd -> ../var/run/lirc/lircd
>
>Sometimes they switch the numbesr (0 and 1), so I can not know wich
>device is each.
>
>I can not disable the CIR device because it is in the board, so I want
>to fix the names of the devices to use them, something like this:
>
>/dev/lirc0 -> /dev/lirc_cir
>/dev/lirc1 -> /dev/lirc_mce
>
>Is this possible?
>
>Thanks and best regards.

Fixing the USB MCE name is likely to be very easy as USB devices have
addresses that you can use in udev rules.  Here are my current udev
rules in /etc/udev/rules.d/10-local.rules (Mythbuntu 14.04):

# Hauppauge ("SMK Manufacturing, Inc. eHome Infrared Receiver") USB
MCE remote control IR receiver
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{idVendor}=="0609",
ATTRS{idProduct}=="031d", SYMLINK+="lirc0"

# Hauppauge WinTV Nova TD-500 remote control IR receiver
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{idVendor}=="2040",
ATTRS{idProduct}=="8400", SYMLINK+="lirc1"

# AverMedia AVerTV DVB-T Volar USB remote control IR receiver
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{idVendor}=="07ca",
ATTRS{idProduct}=="b808", SYMLINK+="lirc2"

# TBS QBox 5922 USB remote control IR receiver
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{idVendor}=="734c",
ATTRS{idProduct}=="5922", SYMLINK+="lirc3"

(Note that the rules are one line each, they get wrapped in some email
clients).

For a USB tuner with an IR receiver like all four of these, you can
find the idVendor and idProduct values to use from the output of the
lsusb command in the ID field:

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 2040:8400 Hauppauge WinTV Nova-T-500
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 05e3:070e Genesys Logic, Inc. USB 2.0 Card
Reader
Bus 002 Device 006: ID 734c:5922 TBS Technologies China
Bus 002 Device 002: ID 07ca:b808 AVerMedia Technologies, Inc.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 0609:031d SMK Manufacturing, Inc. eHome
Infrared Receiver
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop
Laser
Bus 005 Device 002: ID 076b:3021 OmniKey AG CardMan 3121
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 013 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 012 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 011 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 010 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


More information about the mythtv-users mailing list