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, with ID 0x1d6b). However, if we plug in a USB device into the host port (for example, a USB key), we get the following lines of code:
root@bbb:~# lsusb Bus 001 Device 003: ID 058f:6387 Alcor Micro Corp. Flash Drive Bus 001 Device 001: ID...