[mythtv-users] UDEV rules

Daryl McDonald darylangela at gmail.com
Sat Jan 25 22:51:17 UTC 2014


On Sat, Jan 25, 2014 at 5:17 PM, Daryl McDonald <darylangela at gmail.com> wrote:
> On Sat, Jan 25, 2014 at 4:55 PM, Hika van den Hoven <hikavdh at gmail.com> wrote:
>> Hoi Daryl,
>>
>> As a help, this is the build-in v4l rule on my Gentoo system:
>>    /lib64/udev/rules.d/60-persistent-v4l.rules
>>
>> # do not edit this file, it will be overwritten on update
>>
>> ACTION=="remove", GOTO="persistent_v4l_end"
>> SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end"
>> ENV{MAJOR}=="", GOTO="persistent_v4l_end"
>>
>> IMPORT{program}="v4l_id $devnode"
>>
>> SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
>> KERNEL=="video*", ENV{ID_SERIAL}=="?*", SYMLINK+="v4l/by-id/$env{ID_BUS}-$env{ID_SERIAL}-video-index$attr{index}"
>>
>> # check for valid "index" number
>> TEST!="index", GOTO="persistent_v4l_end"
>> ATTR{index}!="?*", GOTO="persistent_v4l_end"
>>
>> IMPORT{builtin}="path_id"
>> ENV{ID_PATH}=="?*", KERNEL=="video*|vbi*", SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}"
>> ENV{ID_PATH}=="?*", KERNEL=="audio*", SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}"
>>
>> LABEL="persistent_v4l_end"
>>
>>
>> Tot mails,
>>   Hika                            mailto: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
>> --
>>
>> Saturday, January 25, 2014, 10:21:21 PM, you wrote:
>>
>>> On Sat, Jan 25, 2014 at 4:11 PM, Bill Meek <keemllib at gmail.com> wrote:
>>>> On 01/25/2014 02:34 PM, Andrew C. (AFPup) Stadt wrote:
>>>>
>>>> ...
>>>>
>>>>> Ok, so you've got the udev rules making the appropriate symlinks, you've
>>>>> verified that the 'mythtv' user is indeed a member of the video group,
>>>>> and the device nodes have the appropriate permissions (eg, read/writable
>>>>> by the video group).
>>>>>
>>>>> I guess that leaves a couple things: what exactly are you entering for the
>>>>> path to the device in mythtv-setup, and who are you running
>>>>> mythtv-setup as?  Are you logged in as the 'mythtv' user, or are you
>>>>> logged in as someone else?
>>>>
>>>>
>>>> I had a few minutes to test this and no, the rules are creating symlinks
>>>> to /dev/dvb/adapter0/net0 which is wrong. The link *must* be to frontend0
>>>> (or at least they were pointing to net0 last time Daryl posted them.)
>>>>
>>>> Creating the symlinks manually, this will fail:
>>>>
>>>>     sudo ln -s /dev/dvb/adapter0/net0 /dev/someName
>>>>
>>>> and this will work:
>>>>
>>>>     sudo ln -s /dev/dvb/adapter0/frontend0 /dev/someOtherName
>>>>
>>>> So the issue here is how to create a proper udev rule
>>>> that selects frontend0, not net0. I haven't had time
>>>> to find the proper key/value pair to correct this.
>>>>
>>>> And, Daryl, I had to type the link names in manually, they
>>>> weren't available using the left and right arrows.
>>>>
>>>> No need to delete the capture cards for this to work, just
>>>> edit the existing card.
>>>>
>>>> --
>>>> Bill
>>>>
>>>> _______________________________________________
>>>> mythtv-users mailing list
>>>> mythtv-users at mythtv.org
>>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>
>>> OK so currently the two digital cards look like:
>>> lrwxrwxrwx  1 root root   15 Jan 25 13:43 dig1250 -> adapter0/demux0
>>> lrwxrwxrwx  1 root root   13 Jan 25 13:43 DigKW150 -> adapter1/net0
>>
>>> and the corresponding rules are:
>>> SUBSYSTEM=="dvb",ATTRS{vendor}=="0x14f1",ATTRS{device}=="0x8852",SYMLINK+="dvb/dig1250",GROUP="video"
>>
>>> SUBSYSTEM=="dvb",ATTRS{vendor}=="0x1131",ATTRS{device}=="0x7133",SYMLINK+="dvb/DigKW150",GROUP="video"
>>
>>> I'm going back to the udev wiki and see if I can beat anything into
>>> this thick Irish cranium of mine.
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users at mythtv.org
>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
> Implementing Yianni's revise rules looks like this after a re-boot:
> daryl at daryl-A780L3C:~$ ls -lah /dev/dvb*
> total 0
> drwxr-xr-x  4 root root  120 Jan 25 17:09 .
> drwxr-xr-x 16 root root 4.6K Jan 25 17:09 ..
> drwxr-xr-x  2 root root  120 Jan 25 17:09 adapter0
> drwxr-xr-x  2 root root  120 Jan 25 17:09 adapter1
> lrwxrwxrwx  1 root root   13 Jan 25 17:09 HP1250 -> adapter0/net0
> lrwxrwxrwx  1 root root   15 Jan 25 17:09 KW150 -> adapter1/demux0
> daryl at daryl-A780L3C:~$
> (my own modifications on symlink names)  I'm going to see if the HP
> 1250 symlink sticks.

It didn't so I put in Haki's suggestion and tada check this out:
daryl at daryl-A780L3C:~$ ls -lah /dev/dvb*
total 0
drwxr-xr-x  4 root root  120 Jan 25 17:32 .
drwxr-xr-x 16 root root 4.6K Jan 25 17:32 ..
drwxr-xr-x  2 root root  120 Jan 25 17:31 adapter0
drwxr-xr-x  2 root root  120 Jan 25 17:32 adapter1
lrwxrwxrwx  1 root root   18 Jan 25 17:31 digHP1250-Index -> adapter0/frontend0
lrwxrwxrwx  1 root root   18 Jan 25 17:32 digKW150-Index -> adapter1/frontend0
daryl at daryl-A780L3C:~$

As yet i can't get the symlink to stick. Much obliged for all the input. Daryl

>>



More information about the mythtv-users mailing list