usb
This is an old revision of the document!
1. 用lsusb命令查看USB设备的详细信
前提是已经安装了usbutils包
用lsusb -D 命令列出指定设备信息:
root@Widora32:/# lsusb -D /dev/bus/usb/001/003
Device: ID 05a3:9310 ARC International
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x05a3 ARC International
idProduct 0x9310
bcdDevice 0.00
iManufacturer 2 HD Camera Manufacturer
iProduct 1 USB 2.0 Camera
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 963
...
结果包括了USB设备描述符、配置描述符、接口描述符、端点描述符等详细信息。其中idVendor和idProduct是比较重要的信息,分别是指供应商ID(VID)和产品识别码(PID)。
用lsusb -v 命令可以列出所有usb设备的信息。
2. 利用USB来扩展各种通用接口
usb.1526475985.txt.gz · Last modified: (external edit)

