dorssel / usbipd-win

Windows software for sharing locally connected USB devices to other machines, including Hyper-V guests and WSL 2.
GNU General Public License v3.0
3.5k stars 224 forks source link

USB devices serial numbers in the 'list' option. #896

Open namki007 opened 5 months ago

namki007 commented 5 months ago

I have several FTDI cables that I am working on and I need to connect and disconnect them on a regular basis. The way I distinguish them is by assigning every one a different Serial number [You can do that using FTDI utility]. I would like the usbipd utility to list the serial numbers of the devices [can be an additional command line option] so that I can easily see which of the devices I have to connect or disconnect.

dorssel commented 5 months ago

Turns out this is not as trivial as I thought...

Devices in low power state (i.e., most devices that are currently unused) do not expose their serial number until powered.

There may be a workaround. It looks like Windows assigns the device Instance ID based on the serial number. Can you post the output of usbipd state? For example, I have a device that has serial number "A50285BI", and it has InstanceID USB\\VID_0403&PID_6001\\A50285BI. That last part is the same as the serial number and it is available even in low power mode (and even when the device is currently not connected).