How do I uniquely identify an USB-device?

前端 未结 6 1442
心在旅途
心在旅途 2021-01-13 02:32

I was wondering how to get the unique id of a USB storage device. I already know how to fetch the SCSI serial id from this post : USB-drive serial number under linux C++ Th

6条回答
  •  难免孤独
    2021-01-13 03:10

    To add to what everyone else has said:

    USB devices do not always have a serial number; even when one is present, it is not guaranteed to be globally unique. (For instance, my Apple USB keyboard has no serial number, and GoPro cameras all have the same bogus serial number of 123456789ABC.) As such, it is not always possible to uniquely identify a device.

提交回复
热议问题