Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting serial number of USB Flash drive

673 views
Skip to first unread message

S-Y. Chen

unread,
Apr 1, 2013, 2:13:09 AM4/1/13
to
Hi there,

Is it possible to get the serial number of a USB flash drive with Tcl ? I am not talking about the Volume Serial Number (something like 536B-23HJ). I need to get the manufacturer's serial number.

I know which driver letter to look for, and I can get the volume serial number too. I have been thinking about get the data from Windows Registry, but it seems not a feasible solution. Because the whole idea was that I would not know the driver's manufacturer and other information. I just have to retrieve the manufacturer's serial number from the drive with a specific letter.

Any hint ?

Regards
S-Y. Chen

S-Y. Chen

unread,
Apr 1, 2013, 11:57:31 AM4/1/13
to
Well, any suggestion there ?

Regards
S-Y. Chen

Eric

unread,
Apr 1, 2013, 1:13:58 PM4/1/13
to
Well, I don't know, but if you can find out how to do it at all then
converting to or wrapping with TCL is probably fairly simple.

On the other hand, nagging for an answer after less than 24 hours on a
holiday weekend is not really going to make you popular.

Eric
--
ms fnd in a lbry

Uwe Klein

unread,
Apr 1, 2013, 1:59:31 PM4/1/13
to
this is a lot less usefull than one would think.
Most usb devices were I would have found it usefull to
distinguish devices independent of bus enumeration
and hub placement had no "populated" serial number ;-(

uwe

Robert Heller

unread,
Apr 1, 2013, 5:15:59 PM4/1/13
to
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



S-Y. Chen

unread,
Apr 2, 2013, 10:41:34 AM4/2/13
to
Hi Robert,

Thanks for your info. I just need a way to uniquely identify a USB Flash drive in my program. Since Volume serial number can be easily changed, so I am thinking about getting the manufacturer's SN.

Regards
S-Y. Chen
0 new messages