View Single Post
  #5  
Old 09-30-2005, 16:46
redbull redbull is offline
Friend
 
Join Date: Mar 2004
Posts: 160
Rept. Given: 17
Rept. Rcvd 5 Times in 4 Posts
Thanks Given: 3
Thanks Rcvd at 6 Times in 6 Posts
redbull Reputation: 5
Hi Guys,

If I look at my USB memory stick in my registry

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR\Disk&Ven_Kalliba&Prod_Velocity&Rev_2.00\454542009DA80061&0

However there is no serial number there..

If you send raw packets to a USB device using a createfile handle pointing to the right USB root, USB hub and finally USB device you can populate this this structure (Find on MSDN):

typedef struct _USB_DEVICE_DESCRIPTOR {
UCHAR bLength ;
UCHAR bDescriptorType ;
USHORT bcdUSB ;
UCHAR bDeviceClass ;
UCHAR bDeviceSubClass ;
UCHAR bDeviceProtocol ;
UCHAR bMaxPacketSize0 ;
USHORT idVendor ;
USHORT idProduct ;
USHORT bcdDevice ;
UCHAR iManufacturer ;
UCHAR iProduct ;
UCHAR iSerialNumber ;
UCHAR bNumConfigurations ;
} USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR ;

Here is a practical example and detailed discussion of this

hxxp://www.physics.brandeis.edu/undergraduate/phys32b_2005/USBIntro/USB%20Ch7.htm


Here are more discussions on this topic
hxxp://jp.xlsoft.com/documents/windriver/usb_setup_packets.pdf
hxxp://www.mega-tokyo.com/osfaq2/index.php/USB%20Tutorial

This is a dump from my Kalliba USB memory stick:
Port=8
DeviceAddress=1
ConnectionStatus=1
MaxPower=300
MajorVersion=2
MinorVersion=0
ProductID=8552
VendorID=3744
Manufacturer=USB
Product=Flash Disk
Serial=454542009DA80061

Whether the serial number is unique to this device or only unique to my machine is another thing.

This serial number is not even remotely close to the serial stamped on the side of the device!

Hope this helps!!
Reply With Quote