On 26/11/11 12:12 AM, David Hughes wrote:
> On 25/11/2011 11:22, Brendan Simon (eTRIX) wrote:
>> Anyone know how to retrieve the unique serial number of a usb storage
>> device using python on OS X ??
>
> How about using
>
> system_profiler SPUSBDataType

I treid the system_profiler and got the following results when I plugged
a couple of usb flash sticks in.
I couldn't see anything that resembles a unique usb storage device
serial number :(  I think it is supposed to be a 12 digit (hex) number.

Either system_profiler doesn't report it, or these devices don't have
unique serial numbers (unlikely), or I am missing something (not unlikely).

Any thoughts ??


>             Composite Device:
>
>               Capacity: 262.1 MB (262,144,000 bytes)
>               Removable Media: Yes
>               Detachable Drive: Yes
>               BSD Name: disk1
>               Product ID: 0x0151
>               Vendor ID: 0x0457  (Silicon Integrated Systems Corp.)
>               Version: 1.00
>               Speed: Up to 480 Mb/sec
>               Location ID: 0xfa130000 / 7
>               Current Available (mA): 500
>               Current Required (mA): 98
>               Partition Map Type: MBR (Master Boot Record)
>               S.M.A.R.T. status: Not Supported
>               Volumes:
>                 USB-DRIVE:
>                   Capacity: 261.9 MB (261,865,472 bytes)
>                   Available: 124.7 MB (124,735,488 bytes)
>                   Writable: Yes
>                   File System: MS-DOS FAT16
>                   BSD Name: disk1s1
>                   Mount Point: /Volumes/USB-DRIVE
>                   Content: DOS_FAT_16


>             USB HD:
>
>               Capacity: 8.01 GB (8,006,926,336 bytes)
>               Removable Media: Yes
>               Detachable Drive: Yes
>               BSD Name: disk1
>               Product ID: 0x1f00
>               Vendor ID: 0x13fe  (Phison Electronics Corp.)
>               Version: 1.10
>               Speed: Up to 480 Mb/sec
>               Location ID: 0xfa130000 / 7
>               Current Available (mA): 500
>               Current Required (mA): 200
>               Partition Map Type: MBR (Master Boot Record)
>               S.M.A.R.T. status: Not Supported
>               Volumes:
>                 KINGSTON:
>                   Capacity: 8 GB (8,002,797,568 bytes)
>                   Available: 4.78 GB (4,780,769,280 bytes)
>                   Writable: Yes
>                   File System: MS-DOS FAT32
>                   BSD Name: disk1s1
>                   Mount Point: /Volumes/KINGSTON
>                   Content: Windows_FAT_32


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to