How can I determine the number and type of endpoints(control - IN/OUT,interrupt-IN/OUT?) my USB device is having.DOes it differs if I plug the same device onto different hosts(Linux,Windows,Mac)
Asked
Active
Viewed 2,287 times
1 Answers
1
You could use libusb. It runs on all of those platforms and it has functions for retrieving the configuration descriptor from the device. You could then parse the configuration descriptor to figure out how many endpoints there are.
Or you could just run lsusb -v
, which will show you tons of information about your device.

David Grayson
- 84,103
- 24
- 152
- 189