|
|||||||||||
|
Re: Udev. Problems with ordering hardware using /dev/video
From: Florian Kulzer <florian.kulzer+debian(at)icfo.es>
Date: Wed Aug 01 2007 - 13:21:07 EDT
[...] > > > My TV card was set as /dev/video0, and some time later the webcam was set [...] > Output below. Bear in mind that /dev/video0 should be the TV card, /dev/video1 [...] > djmons@debian:~$ udevinfo -a -p $(udevinfo -q path -n /dev/video0) [...] > looking at device '/class/video4linux/video0': [...] > djmons@debian:~$ udevinfo -a -p $(udevinfo -q path -n /dev/video1) [...] > looking at device '/class/video4linux/video1': [...] > I saw that someone with network device problems, and Udev, was able to specify For network cards see: /etc/udev/rules.d/z25_persistent-net.rules. /usr/share/doc/udev/writing_udev_rules/index.html describes in detail how udev rules work. Based on the output that you posted this should get you started: ### START ###
SUBSYSTEM=="video4linux", \
SUBSYSTEM=="video4linux", \
### END ### Put these rules into a file "local-tvwebcam.rules" in /etc/udev/ with ownership and permissions like the other *.rules files in this directory. Then create a symlink ("ln -s ...") in /etc/udev/rules.d/ which points to your rules file. The names in rules.d determine the order in which the rules are tested. You might have to experiment a bit; I would try to start with something like 010_... . My experience with network cards was that the NAME assignments sometimes did not work reliably if I tried to use them to swap two existing (kernel) names (i.e. eth0 and eth1). If you have similar problems then it is probably best to replace the two NAME assignments in the rules by two SYMLINK directives: ### START ###
SUBSYSTEM=="video4linux", \
SUBSYSTEM=="video4linux", \
### END ### This will give you /dev/mytvcard and /dev/mywebcam as symlinks which should always point to the correct /dev/video? device. Then you just have to reconfigure your applications once to use the device symlinks instead of the video? nodes. -- Regards, | http://users.icfo.es/Florian.Kulzer Florian | -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.orgReceived on Wed Aug 1 13:39:44 2007 This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 18:37:54 EDT |
||||||||||
|
|||||||||||