Display the USB device list information of this machine
lsusb command is used to display the local USB device list and detailed information of the USB device.
The lsusb command is an assistant for learning USB driver development and understanding USB devices. It is recommended for everyone to use. If there is no lsusb command in your development board or product, you can transplant one yourself and put it in the file system.
lsusb(option)
-v: Display detailed information of USB devices;
-s<bus:device number> only displays devices with the specified bus and/or device number;
-d<Manufacturer: Product>: Only display devices with specified manufacturer and product number;
-t: Display the hierarchy of unreasonable USB devices in a tree structure;
-V: Display the version information of the command.
The output of executing lsusb after inserting the USB mouse is as follows:
Bus 005 Device 001: id 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 006: ID 15d9:0a37
Bus 002 Device 001: ID 0000:0000
explain:
Bus 005
Represents the fifth USB host controller (there are a total of 5 USB host controllers on the machine - you can view it through the command lspci | grep USB)
Device 006
Indicates the device number (devnum) assigned by the system to the USB mouse. You can also see that the mouse is inserted into the second USB host controller.
006 usb_device.devnum
/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/devnum
ID 15d9:0a37
Represents the ID of the USB device (this ID is set by the chip manufacturer and can uniquely represent the device)
15d9 usb_device_descriptor.idVendor
0a37 usb_device_descriptor.idProduct
/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/idVendor
Bus 002 Device 006: ID 15d9:0a37 Bus 002 Device 001: ID 0000:0000
Indicates that two devices are connected to the USB host controller No. 002: