I was playing with the idea of having my usb disk have a static name to it
(like simply mobile). I was able to get everything I needed except for one
thing. The serial number. I can look in /sys to find the model, vendor,
and firmware. I tried scsi_id from udev which doesn't work. scsiinfo from
scsitools shows it as having a blank serial number. I tried reading scsi
page 0x80 and 0x83 but it's not supported.
Kernel 2.6.10 vanilla.
/sys/block/sdo/device:
model MK6021GAS
rev GA02
vendor TOSHIBA
# scsiinfo -a /dev/sdo
Scsiinfo version 1.7(eowmob)
Inquiry command
---------------
<snip>
Vendor: TOSHIBA
Product: MK6021GAS
Revision level: GA02
Serial Number ''
Unable to read Rigid Disk Geometry Page 04h
Data from Caching Page
----------------------
<snip>
Unable to read Control Mode Page 0ah
Unable to read Disconnect-Reconnect Page 02h
Data from Defect Lists
----------------------
<snip>
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-6:
manufacturer DMI
product USB 2.0 Storage Adaptor
serial 0B02011C047380EA
speed 480
version 2.00
I realize I probably could grab "serial" from the above, however, I was
thinking of the usb-ide dongle which you have 1 usb device that you can
attach to various hardware thus the serial # of the usb device won't be of
much good.
Ideas?
--
Lab tests show that use of micro$oft causes cancer in lab animals
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users