Getting the serial number of a USB Mass Storage device is going to be
problematical. Most don't even have one. Normally, one might get the
serial number of *magnetic* media (such as a USB Mass Storage device
that is a PATA or SATA disk 'under the hood') using SMART tools,
although SMART tools don't always work through the USB interface
(depends on the USB <=> SATA/PATA interface device and what it is
capable of). SSD USB Mass Storage devices (eg flash drives), generally
don't have serial numbers, and if they do, there isn't a USB Mass
Storage device API to fetch it (AFAIK).
Other sorts of USB devices *sometimes* have serial numbers in their USB
device descriptors and it is possible to use libusb to fetch these
serial numbers, but you can't normally use libusb to do that with a USB
Mass Storage device, since the O/S will recognise the USB Mass Storage
device as a disk, and glom onto it with the O/S's Mass Storage device
API (eg it will show up as a SCSI disk (/dev/sd<mumble>) under Linux or
a drive letter under MS-Windows.
What *I* have done (under Linux!) is to reformat flash drives with ext2
file systems with a label (-L<mumble>) and then use the label to mount
the file system, and thus not worry about what the O/S names the device
(eg /dev/sda, or /dev/sdb, or /dev/sdf, etc.).
Why do you need the manufacturer's serial number?
>
> uwe
>
--
Robert Heller --
978-544-6933 /
hel...@deepsoft.com
Deepwoods Software --
http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\
www.asciiribbon.org -- against proprietary attachments