12-03-2020 07:55 PM
Hi all
I want to check my usb device if usb2.0 or usb3.0,I try read device manager list(by attachment files) is not ok only get device basic information as snapshot,where can check what i want information,thanks in advance!
12-04-2020 07:08 AM - edited 12-04-2020 07:09 AM
Are you familiar with the command prompt?
You can call a script for a command.line parameter and retrieve the information for parsing. So if you already have a command-line way to get the information, you can do that in LabVIEW by passing it to the command line, retrieving the output buffer and parsing accordingly.
12-04-2020 09:17 AM
Thank you for your reply,I don’t know what command prompt get USB device Version 2.0 or 3.0,Do you have good way to this issue,thanks!
12-09-2020 04:43 AM
Who can help me for this issue of check removable device(USB disk,USB audio adapter)usb2.0 or usb3.0 version,thanks in advance.
12-09-2020 05:17 AM
Well, if I had to do it, I would most certainly call the Windows API. But that requires some serious C programming. First you have to use the Windows SetupDI API to enumerate the USB devices, find the relevant device and then open a device driver handle to it. From there you can do a DeviceIOControl() on the handle with the control code IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2 IOCTL Windows 8 and higher only). But this requires you to have a C compiler, knowledge about C programming and also the Microsoft Windows SDK and DDK installed as well.
The other approach is to call some command line tool with the right options to retrieve extra information. devcon seems not to be able to retrieve either the advertised nor the actually used USB speed for a device. USBVIEW from the Microsoft Developer Toolkit doesn't employ above IOCTL code either, but could be modified to do so. It is in source code on the Microsoft Github page for the Device Driver Development Kit.
Another approach would be to try to call libusb through the Call Library Node. It specifically enumerates the capabilities of a USB device including its actual speed.