背景
lsusb可以查看系统上挂载的usb设备。lsusb和lspci类似,有总线和dev视角,也有厂商和产品视角。比如lsusb -s指定总线号,以及挂在总线上的dev号。lsusb -d 指定vendorid和productid。这在lspci类似 lspci -s是指定pcie的BDF总线信息。
lsusb用法
lsusb -h
$lsusb -h [0]
Usage: lsusb [options]...
List USB devices
-v, --verbose
Increase verbosity (show descriptors)
-s [[bus]:][devnum]
Show only devices with specified device and/or
bus numbers (in decimal)
-d vendor:[product]
Show only devices with the specified vendor and
product ID numbers (in hexadecimal)
-D device
Selects which device lsusb will examine
-t, --tree
Dump the physical USB device hierarchy as a tree
-V, --version
Show version of program
-h, --help
Show usage and help
lsusb
这里可以看到两个设备,bd分别是001:002 001:001
以及vendorid和productid:0627:001和1d6b:001
$lsusb [1]
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
lsusb -v
可以看到usb详细信息,包括关键点:
- VendorID:0x0627 Adomax Technology Co., Ltd
- MaxPower 100mA 最大电流
lsusb -v [0]
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacket
lsusb命令查看USB设备信息

最低0.47元/天 解锁文章
3226

被折叠的 条评论
为什么被折叠?



