简体   繁体   中英

How to fetch whether a USB device is connected to USB3.0 or USB2.0 port

I just want to know how to find a usb device is connected to USB3.0 or USB2.0 port in windows as well as linux. FYI, I am using libusbK in WINDOWS and in libusb in LINUX is used to access usb device. Is there any api's or any techniques available to fetch the said information?

Eg: If a usb device is connected to USB3.0, i should be able to tell the user that usb device is connected to USB3.0 port.

Is it not possible to fetch the USB details as mentioned above?

Thanks in Advance.

The USB Specification Number which device complies is encoded in the field bcdUSB of the device descriptor.

In libusb you got that information on the struct libusb_device_descriptor

In libUSBK you gat that in the struct USB_DEVICE_DESCRIPTOR

It should be easy to access them :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM