USB serial number not shown with lsusb -v command

12,946

Solution 1

lsusb may try to open the USB device as O_RDWR (read/write mode) and your user might not have the rights to do this (some error message "Couldn't open device, some information will be missing" should be inbetween the output, if so). Started as root lsusb should also be able to output the whole iSerial value.

Solution 2

There are lots of different USB devices in general (keyboard, mice, webcams, ...). lsusb deals with the connected devices on the USB protocol level.

Some USB device are storage devices (USB sticks, USB harddisks, ...). They understand a different protocol (more or less SCSI) on top of the USB protocol. Within this protocol, an USB storage device has a serial number (as does an ATA device). This is what you see in /proc/scsi/usb-storage.

The iSerial number you see in lsusb has nothing to do with it.

So that's why you see the serial number you are interested in with one method, but not with the other method. And that's why you can't use lsusb to get the kind of serial number you are interested in

Share:
12,946
Chris
Author by

Chris

Updated on September 18, 2022

Comments

  • Chris
    Chris over 1 year

    I have a USB-Stick from which I would like to read the serial number. If I invoke the command lsusb -v the output in the line iSerial is as follows:

    iSerial    3
    

    If i go to /proc/scsi/usb-storage and look into the file i get the following output:

    Host scsi10: usb-storage
    Vendor: USB
    Product: Disk 2.0
    Serial Number: 92071573E1272519149
    Protocol: Transparent SCSI
    Transport: Bulk
    Quirks:
    

    Why is there no serial output with the lsusb command on the one hand, but on the other hand I get a serial number from /proc/scsi/usb-storage. Where is the difference between the two methods to gather the serial?