Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enum USB devices in Linux/C++

Tags:

c++

linux

usb

Im writing IO routines for a linux device that will have various and changing USB devices connected to it. To this end I need to be able to figure out which device is connected to which port so I can open it with the correct software. Something akin to 'udevinfo' would be ideal but I have no idea how to start in writing such.

Suggestions on c++ apis to read?

like image 458
ethrbunny Avatar asked Dec 07 '25 09:12

ethrbunny


1 Answers

Take a look at libudev++. It seems to be what you're looking for.

like image 54
Frédéric Hamidi Avatar answered Dec 09 '25 21:12

Frédéric Hamidi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!