【微知】USB信息如何查看?(lsusb -v,-s总线和dev,-d厂商和设备)

lsusb命令查看USB设备信息

背景

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值