On Thu, Jun 24, 2004 at 09:28:17AM +0100, Hugo Costelha wrote: > On Thursday 24 June 2004 06:34, Greg KH wrote: > > On Wed, Jun 23, 2004 at 06:04:27PM +0100, Hugo Costelha wrote: > > > The code that runs in the robots is the same for every robot. It's > > > important to us that when our program starts it now which cameras is > > > /dev/video0 and which cameras is /dev/video1 (the left one, or the right > > > one, etc..). With the firewire cameras I read the serial number of the > > > cameras to fin out which is which, can I do the same with USB cameras? > > > How? > > > > Sure, use udev to manage your /dev tree, and make a rule based off of > > the serial numbers. > > > > Hope this helps, > > > > greg k-h > > Well, I'm more or less a newbie and don't understand that much. Using your > advice, how could I know the serial number, or make the assigment based on > the serial number?
Please read the udev documentation for information on how to do this. It contains a nice HOWTO also, that steps you how to set up a rule based on almost this very case. > Isn't there an USB API that can let me retreive the serial number? cat /proc/bus/usb/devices/ or cat the serialnumber file in the sysfs entry for the usb device. Either of them works the same. good luck, greg k-h ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel