On Tue, 8 Oct 2002, Michael Hamilton wrote: | I've knocked up two scripts that hook into the hotplug utils in | Redhat 7.2 and automatically mount any usb storage device on | /mnt/usb-storage/<device-serial-number>. Coupled with sudo they | allow a KDE URL desktop item to view/mount/unmount devices. | | I thought the serial number would remain constant for the same | device - this isn't true for the one device I own - a LeadTek | Winfast Disk - which is really a NeoDio 0xaec/0x5010. | | The serial number seems to have a suffix that changes | on each plug-in of the device. At least the last two bytes | step up by one ASCII value each time, stepping out of the | numeric range and into the characters beyond, for example | 0AEC501000001A001 0AEC501000001A002 0AEC501000001A003 .. | 0AEC501000001A009 0AEC501000001A00: 0AEC501000001A00; | 0AEC501000001A00< 0AEC501000001A00= ... | 0AEC501000001A010 ...
Interesting. | 1. What part of the serial remains constant for the same device, | if any? Not part of the USB spec. This is device-specific behavior. | 2. Is the serial number the way to recognise the same device | or am I barking up the wrong tree? The USB spec says that certain USB storage devices (like bulk-only) require a serial number and that it is unique for each idVendor/idProduct pair and at least 12 digits long. Unfortunately I don't see anything in the spec that requires the serial number to be persistent (unchanging), which would be desirable IMO. If I were attempting this, I too would have tried to use serial number, and eventually someone out there would have run into this problem. The larger problem is that there are lots of USB storage devices that don't have (or require) a serial number at all. How are you handling those? -- ~Randy ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
