Click here to Skip to main content
15,916,692 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to list existing USB hub and the devices connected in the hub.

I can able to print the USB Hub and devices connected in hub from terminal using the commands
lsusb
lsusb -v 


How I can do this programmatically. Is there any C++ classes available to use in my Qt application.
Posted

1 solution

Just have a look at the usbutils[^] sources which contain the lsusb utility. It uses the libusb[^] package. See the libusb API[^] for the provided functions.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900