[mythtv-users] Double keys on remote
Joey Morris
rjmorris at nc.rr.com
Sun Feb 19 14:20:53 UTC 2012
Josu Lazkano <josu.lazkano at gmail.com> wrote on Sun, Feb 19, 2012 at 12:58:10PM +0100:
> 2012/2/18 Andrew Stadt <acstadt at stadt.ca>:
> > On 18/02/2012 10:01 AM, Josu Lazkano wrote:
> >> Thanks Andrew! This work for me: # echo lirc >
> >> /sys/class/rc/rc0/protocols Best regards.
> > FWIW: I added the following two lines to /etc/init.d/lirc
> >
> > # disable in kernel interpretation of
> > rc cmds
> > echo lirc > /sys/class/rc/rc0/protocols
> >
> > (I put these right after the line:
> > start-stop-daemon --start --quiet
> > --oknodo --exec /usr/sbin/lircd -- $LIRCD_ARGS < /dev/null
> > )
> >
> > Cheers,
> >
> > Andrew.
> >
>
> Hello again, after some hours of using MythTV, I have same problem
> again and the rcN protocols path changed (from rc0 to rc2):
>
> # ls -l /sys/class/rc/
> total 0
> lrwxrwxrwx 1 root root 0 Feb 19 12:51 rc2 ->
> ../../devices/pci0000:00/0000:00:06.0/usb4/4-5/4-5:1.0/rc/rc2
>
> # cat /sys/class/rc/rc2/protocols
> [rc-5] [nec] [rc-6] [jvc] [sony] [mce_kbd] [lirc]
>
> After apply this it is solved:
>
> # echo lirc > /sys/class/rc/rc2/protocols
>
> How could I fix the rc path? May I use a cron job to check it?
I use a udev rule for this. I created a file in /etc/udev/rules.d
called remote-control-lirc.rules and put this line in it:
SUBSYSTEM=="rc", ATTRS{protocols}=="*lirc*" RUN+="/bin/sh -c 'echo lirc > /sys$env{DEVPATH}/protocols'"
After creating that file, test the rule by running:
$ udevadm test /devices/pci0000:00/0000:00:06.0/usb4/4-5/4-5:1.0/rc/rc2
(replacing that path with whatever the link in /sys/class/rc points to
currently). You should see a line at the end of the output saying it's
going to run the echo lirc command.
Later, when you reboot or disconnect/reconnect the receiver, the udev
rule should detect the new location of the receiver and echo lirc to
the appropriate file.
More information about the mythtv-users
mailing list