[mythtv-users] How to make the LIRC_DEVICE static in Fedora 16

Joey Morris rjmorris at nc.rr.com
Tue Dec 13 00:20:59 UTC 2011


Gabe Rubin <gaberubin at gmail.com> wrote on Mon, Dec 12, 2011 at 09:32:41AM -0800:
> On Sun, Dec 11, 2011 at 6:26 AM, Joey Morris <rjmorris at nc.rr.com> wrote:
> > When you did this:
> >
> >  # ln -fs /dev/input/`cat /proc/bus/input/devices|grep -A 3
> >    "Hauppauge"|grep event|cut -d ' ' -f3` /dev/input/remote
> >
> > the reason you ended up with this symlink:
> >
> >  remote -> /dev/input/
> >
> > is that the cat|grep|grep|cut sequence didn't return anything. Did you
> > try running cat /proc/bus/input/devices by itself on the command line
> > to see what it gives you? Maybe you just need to change how you're
> > grepping.
> 
> Here is what I get.  I am not sure how to modify the grep sequence
> (and I am concerned that on reboot, when the event id changes, the
> symlink won't reflect that).  I just used the syntax that was in the
> wiki:
> 
> [root at localhost ~]# cat cat /proc/bus/input/devices
>
> [snip]
>
> I: Bus=0018 Vendor=0000 Product=0000 Version=0000
> N: Name="i2c IR (Hauppauge WinTV PVR-350"
> P: Phys=i2c-1/1-0018/ir0
> S: Sysfs=/devices/virtual/rc/rc0/input2
> U: Uniq=
> H: Handlers=kbd event2
> B: PROP=0
> B: EV=100013
> B: KEY=10afc312 2142017 0 0 0 0 118000 41a8 4801 9e16c0 0 0 10000ffc
> B: MSC=10
>
> [snip]

(For brevity, I've cut out the part of your /proc/bus/input/devices
output that doesn't apply to your IR receiver.)

Assuming that the event listed in your Handlers line is the right
one and that it changes appropriately on reboot, you should get the
right symlink if you change grep -A 3 to grep -A 4, like this:

    ln -fs /dev/input/`cat /proc/bus/input/devices|grep -A 4
    "Hauppauge"|grep event|cut -d ' ' -f3` /dev/input/remote

The event line is now 4 lines below the Hauppauge line. It must have
only been 3 lines below when the wiki page was written.

Using udev is probably the more elegant solution, because you don't
have to worry about parsing that file. If you want to try the udev
route, your udev rules need to match against the device's attributes
in the udev database. The Sysfs line from /proc/bus/input/devices
shows you the path to your device, and you can use udevadm to display
all its attributes, like this:

    udevadm info --attribute-walk --path /sys/devices/virtual/rc/rc0/input2
    
>From the output of that, you can probably figure out how to modify the
other udev rule examples to match what you have.

Note that I'm basing all this on my Ubuntu 11.04 install, so there are
no guarantees that any of this will work on F16.


More information about the mythtv-users mailing list