how to use libusb to detect usb ports in qt
-
I have to use libusb with Qt in order to detect USB ports for Linux and Windows at the same code.Please, could you recommend me?
-
Ports or connected devices? I might be wrong on this but I think you can only enumerate connected devices (and set hot plug notifications) with libusb?
@artwaw thanks for your response . and i need to detect usb port number and device name .could you suggest me code in windows side
-
S SGaist referenced this topic on
-
@artwaw thanks for your response . and i need to detect usb port number and device name .could you suggest me code in windows side
@Chakravarthi-N You can enumerate devices using this method https://libusb.sourceforge.io/api-1.0/group__libusb__dev.html#gac0fe4b65914c5ed036e6cbec61cb0b97
Bus and port numbers can also be obtained using methods like this one https://libusb.sourceforge.io/api-1.0/group__libusb__dev.html#gaf2718609d50c8ded2704e4051b3d2925