The USB tools

USB devices connected to our system can be listed and inquired by some specific utilities in the usbutils package (the package should be already installed, in case we can done it in the usual ways).

If we can even use sysfs to inspect connected devices, using these tools, the developer can simplify their job. For example, to get a list of connected USB devices, we can use the following command line:

root@bbb:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

In this example, on our BeagleBone Black, we get the root hub only (the root hub is a phony device and represents the USB bus itself into the system. It always has a device number of one on whatever bus it sits on and a fixed manufacturer, that is, Linux Foundation ...

Get GNU/Linux Rapid Embedded Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.