[mythtv-users] Joy and pain (Daryl McDonald)

Daryl McDonald darylangela at gmail.com
Fri Feb 14 14:16:24 UTC 2014


On Fri, Feb 14, 2014 at 8:27 AM, Hika van den Hoven <hikavdh at gmail.com>wrote:

>  Hoi NickS,
>
>
> Friday, February 14, 2014, 1:48:32 PM, you wrote:
>
>
>
>
>
> > looking at device '/devices/platform/lirc_serial.0/lirc/lirc0':
> > KERNEL=="lirc0"
>
> > SUBSYSTEM=="lirc"
> > DRIVER==""
> >
> > looking at parent device '/devices/platform/lirc_serial.0':
> > KERNELS=="lirc_serial.0"
> > SUBSYSTEMS=="platform"
> > DRIVERS=="lirc_serial"
>
> From this output I would create the following rule:
>
> KERNEL=="lirc*", KERNELS="lirc_serial.0", SYMLINK+="lircSerial"
>
> The first part makes sure the rule matches the device at the lirc level of
> the device tree. Previously when I (and possibly you) queried (with udevadm
> info) against "event?" and tried to match with  KERNEL=="event*"  my udev
> rule would create a symlink but it seemed to be at the wrong level to work
> with lircd. If your setup works temporarily with /dev/lirc1 then that's the
> device you need to query against using:
>
> udevadm test -a -p  $(udevadm info -q path -n /dev/lirc1)
>
> and KERNEL="lirc*" is the level your udev rule should match against.
>
> The second part matches with "lirc_serial.0" which appears to be the only
> uniquely identfying piece of info further up the device tree, so we match
> the correct device regardless of the lirc number.
>
> The other issue I came across when testing the udev rule was that the
> filename in /etc/udev/rules.d made a big difference. Initially I'd created
> an 86-remote.rules, the file was picked up but the rule didn't take effect.
> Naming it z21-persistent-local.rules seemed to do the trick.
>
> Nick
>
>
Here is a snip from the query you suggested Nick:

 udev_device_new_from_syspath: device 0x7fa3f2832e20 has devpath
'/devices/platform/lirc_serial.0'
udev_device_new_from_syspath: device 0x7fa3f2833820 has devpath
'/devices/platform'
udev_rules_apply_to_event: LINK 'lircSerial'
/etc/udev/rules.d/capture-card.rules:7
udev_event_execute_rules: no node name set, will use kernel supplied name
'lirc1'

So how do I set a node name?

SUBSYSTEM=="lirc",KERNEL=="lirc[0-9]",DRIVERS=="lirc_serial",SYMLINK+="lircSerial",NODE+="lircSerial"

>
>
>
> Two thinks:
> The number in KERNELS="lirc_serial.0" kan change, so
> KERNELS="lirc_serial.*"
> The starting number of the filename, rules the ordering of the application
> of the rules.
> So it should be higher then the rules that create the original. Check in
> the default
> rules for the numbering of corresponding rules and give it the same
> number. For v4l
> rules that's 61 in my system. And don't forget the suffix '.rules'
>
>
> Tot mails,
>   Hika                            mailto:hikavdh at gmail.com<hikavdh at gmail.com>
>
>
> "Zonder hoop kun je niet leven
> Zonder leven is er geen hoop
> Het eeuwige dilemma
> Zeker als je hoop moet vernietigen om te kunnen overleven!"
>
> De lerende Mens
> --
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140214/f0b19fac/attachment.html>


More information about the mythtv-users mailing list