How USB's are enumerated on the XO

david at lang.hm david at lang.hm
Tue Jun 24 13:21:46 EDT 2008


On Tue, 24 Jun 2008, K. K. Subramaniam wrote:

> On Tuesday 24 Jun 2008 5:18:52 pm shivaprasad javali wrote:
>> The USB device that I am connecting is not a storage drive. so there is no
>> way I can copy a file containing a unique UUID on the device. I just need
>> one unique parameter for the device when it is connected to the system.
> Have you tried using /sys/bus/usb/devices/../dev? This gives the major/minor
> number of the attached device. The major number will be that of the usb
> driver, but the minor number will be unique.

unique, but not repeatable (reboot and plug the two devices in in the 
reverse order and the numbers will be swapped)

I think he's trying to find a way to identify which software device is 
which hardware device.

unfortunantly with USB this is a hard thing to do. udev does lots of 
tricks to try and do this job, but with some devices it's just not 
possible.

I've been watching this conversation, and I don't think that there's any 
way to look at the software device and say 'this is the one plugged into 
the USB slot on the left side' or 'this is the one plugged into the top 
USB slot on the right side', which it sounds like is what the OP is trying 
to do.

if the USB device doesn't provide any unique info to the system all you 
can do is say 'this is the first one that was plugged in'

on some desktop systems you have multiple USB busses, so you can say 'this 
device was plugged into one of the USB slots for bus#1' but the XO laptops 
only have one USB bus.

David Lang



More information about the Devel mailing list