I've done this in the past by doing this:
- create /etc/udev/rules.d/010-video.rules
- add lines of this form to the file:
KERNEL=="video*", ATTRS{serial}=="835DE5C1", SYMLINK+="cam01"
KERNEL=="video*", ATTRS{serial}=="F467C7C2", SYMLINK+="cam02"
Now when udev recognizes each camera, it will still (more or less)
randomly assign the cameras to different /dev/video* files, but will
symbolically link each camera to /dev/cam01, /dev/cam02, as dictated by the
rules above. I've used this to deterministically map 10 quick cam fusions
on a single system. I had this working on a Debian system, but I think udev
is pretty standard with most distributions.
Some provisos:
- I have occasionally found cameras that don't report any serial number. I
never found a solution for these, so I just swapped them out with cameras
that did.
- I could only get 10 cameras to work: when plugging in the 11th, I got a
"no space left on device" error, which I think may be related to USB bus
reservation (?)
Let me know if this doesn't work. :)
Denis
On Wed, Dec 10, 2008 at 6:01 AM, Alessandro Soro <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> I'm trying without success to get the serial number of a webcam Logitech
> Quickcam Pro 9000.
> after initialization, the field bus_info in the capability struct, got
> via ioctl, is set to something like
> "0000:05:06.2", that seems to be related to the usb bus as also appears
> in the proc fs, but not to
> the port, so I can't distinguish different webcams connected to the same
> controller
>
> the serial number of the webcam is reported in /proc/usb/devices
>
> T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
> D: Ver= 2.00 Cls=ef(unk. ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
> P: Vendor=046d ProdID=0990 Rev= 0.05
> S: SerialNumber=F88F63E8
>
> but unfortunately I can't find any way to map this info to the
> /dev/video# entry that I use
> to open the device.
>
> I need this for a computer vision app that uses 9 webcams connected to
> three different
> controllers, so I need the serial to match each webcam to the
> appropriate configuration file.
> Whenever the system is halted the /dev/video# entries are reassigned
> (randomly, it seems)
> to the webcams and the matching to config files is lost.
>
> Any ideas?
>
> If not, a way to fix the assignment of /dev/video# entries to a usb
> bus/port would also do the trick for me.
>
> thanx in advance for any help,
>
> Alessandro
>
> _______________________________________________
> Linux-uvc-devel mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
>
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel