FYI, jonnor.com/2010/08/determining-physical-topology-of-hotplugged-usb-devices-with-udev/
Ie, figure out your physical setup and write a script. If programming isn't your thing, you could probably get this done with sed / awk or maybe even grep. Though this sounds harder to me than writing a simple perl script. On Jul 16, 2011 10:12 AM, "shawn wilson" <ag4ve...@gmail.com> wrote: > On Jul 16, 2011 8:00 AM, "Camaleón" <noela...@gmail.com> wrote: >> >> On Thu, 14 Jul 2011 20:59:24 +0200, Tuxoholic wrote: >> >> >> Von: Camaleón <noela...@xxxxx.xxx> >> >>> What do you mean ? - SYMLINK+="webcam%n" ? I tried that, didn't help. >> >>Nope. >> >> >> >>I wanted to know why you used Name="video%n" instead Name="video1" and >> >>Name="video2" in two separate rules/lines. >> > >> > I see your point, so I tried this: >> >> (...) >> >> > SUBSYSTEM=="video4linux", ATTRS{idVendor}=="046d", > ATTRS{idProduct}=="08a2", Name="video1", GROUP="video" >> ^^^^ > ^^^^ >> > SUBSYSTEM=="video4linux", ATTRS{idVendor}=="046d", > ATTRS{idProduct}=="08a2", Name="video2", GROUP="video" >> ^^^^ > ^^^^ >> >> (...) >> >> Mmm... How are those rules going to work? :-? >> >> You are using the same "idVendor" and "idProduct" for both Logitech > cameras, >> I think you need to find an udev attribute that is "unique" for each of > them >> and then use it to filter by that field. >> > > I agree. I'd start with looking at what lsusb says. IIRC, there should be > some sort of uid for each device. Check the specs on the usb group's web > site (usb.org?) but really that doesn't matter if it says the manufacturer > didn't follow spec - again lsusb will show you quick enough. > > However, I think there's a way to name devices based on the port they're > plugged into.