本文转载自: 查看USB设备

(1) lsusb

# 列出所有设备
$ lsusb
Bus 001 Device 002: ID 05a3:9310 ARC International
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub# 打印指定USB设备的具体的描述符 -d 指定usb -v 显示详细信息
lsusb -d 05a3:9310 -v

(2)ll /sys/bus/usb/devices

输出结果如下:

book@100ask:/sys/bus/usb/devices$ cd /sys/bus/usb/devices
book@100ask:/sys/bus/usb/devices$ ls
1-0:1.0  1-1  1-1:1.0  1-1:1.1  1-1:1.2  1-1:1.3  2-0:1.0  2-1  2-1:1.0  2-2  2-2:1.0  usb1  usb2
book@100ask:/sys/bus/usb/devices$ ll
总用量 0
drwxr-xr-x 2 root root 0 4月  18 18:04 ./
drwxr-xr-x 4 root root 0 4月  18 17:29 ../
lrwxrwxrwx 1 root root 0 4月  18 17:29 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-0:1.0/
lrwxrwxrwx 1 root root 0 4月  18 18:04 1-1 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/
lrwxrwxrwx 1 root root 0 4月  18 18:04 1-1:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/
lrwxrwxrwx 1 root root 0 4月  18 18:04 1-1:1.1 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.1/
lrwxrwxrwx 1 root root 0 4月  18 18:04 1-1:1.2 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.2/
lrwxrwxrwx 1 root root 0 4月  18 18:04 1-1:1.3 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.3/
lrwxrwxrwx 1 root root 0 4月  18 17:29 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-0:1.0/
lrwxrwxrwx 1 root root 0 4月  18 17:29 2-1 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-1/
lrwxrwxrwx 1 root root 0 4月  18 17:29 2-1:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-1/2-1:1.0/
lrwxrwxrwx 1 root root 0 4月  18 17:29 2-2 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/
lrwxrwxrwx 1 root root 0 4月  18 17:29 2-2:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2:1.0/
lrwxrwxrwx 1 root root 0 4月  18 17:29 usb1 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/
lrwxrwxrwx 1 root root 0 4月  18 17:29 usb2 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/

对上面输出结果解释如下:

  • usbx/:表示第x个总线
  • x-y:a.b/ 的目录格式:x表示总线号,y表示端口,a表示配置,b表示接口。

(3)cat /sys/kernel/debug/usb/devices

信息的详细解析可以参照 Linux源代码中 Documentation/usb/proc_usb_info.txt 文件。

book@100ask:/sys/bus/usb/devices$ sudo cat  /sys/kernel/debug/usb/devices
[sudo] book 的密码:T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 6
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 4.13
S:  Manufacturer=Linux 4.13.0-36-generic ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:02:03.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256msT:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=05a3 ProdID=9310 Rev= 0.00
S:  Manufacturer=HD Camera Manufacturer
S:  Product=USB 2.0 Camera
C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=0e(video) Sub=03 Prot=00
A:  FirstIf#= 2 IfCount= 2 Cls=01(audio) Sub=00 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#= 1 Alt= 1 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 128 Ivl=125us
I:  If#= 1 Alt= 2 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 256 Ivl=125us
I:  If#= 1 Alt= 3 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 800 Ivl=125us
I:  If#= 1 Alt= 4 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS=1600 Ivl=125us
I:  If#= 1 Alt= 5 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS=2400 Ivl=125us
I:  If#= 1 Alt= 6 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS=3072 Ivl=125us
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:* If#= 3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I:  If#= 3 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=84(I) Atr=05(Isoc) MxPS= 400 Ivl=1msT:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc= 17/900 us ( 2%), #Int=  1, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 4.13
S:  Manufacturer=Linux 4.13.0-36-generic uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:02:00.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255msT:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0e0f ProdID=0003 Rev= 1.03
S:  Manufacturer=VMware
S:  Product=VMware Virtual USB Mouse
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=1msT:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=12   MxCh= 7
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0e0f ProdID=0002 Rev= 1.00
S:  Product=VMware Virtual USB Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms

结果解释如下:

Each line is tagged with a one-character ID for that line:T = Topology (etc.)
B = Bandwidth (applies only to USB host controllers, which arevirtualized as root hubs)
D = Device descriptor info.
P = Product ID info. (from Device descriptor, but they won't fittogether on one line)
S = String descriptors.
C = Configuration descriptor info. (* = active configuration)
I = Interface descriptor info.
E = Endpoint descriptor info.Legend:d = decimal number (may have leading spaces or 0's)x = hexadecimal number (may have leading spaces or 0's)s = stringTopology info:T:  Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=dddd MxCh=dd
|   |      |      |       |       |      |        |        |__MaxChildren
|   |      |      |       |       |      |        |__Device Speed in Mbps
|   |      |      |       |       |      |__DeviceNumber
|   |      |      |       |       |__Count of devices at this level
|   |      |      |       |__Connector/Port on Parent for this device
|   |      |      |__Parent DeviceNumber
|   |      |__Level in topology for this bus
|   |__Bus number
|__Topology info tagSpeed may be:1.5 Mbit/s for low speed USB12  Mbit/s for full speed USB480 Mbit/s for high speed USB (added for USB 2.0);also used for Wireless USB, which has no fixed speed5000    Mbit/s for SuperSpeed USB (added for USB 3.0)For reasons lost in the mists of time, the Port number is alwaystoo low by 1.  For example, a device plugged into port 4 willshow up with "Port=03".Bandwidth info:
B:  Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd
|   |                       |         |__Number of isochronous requests
|   |                       |__Number of interrupt requests
|   |__Total Bandwidth allocated to this bus
|__Bandwidth info tagBandwidth allocation is an approximation of how much of one frame(millisecond) is in use.  It reflects only periodic transfers, whichare the only transfers that reserve bandwidth.  Control and bulktransfers use all other bandwidth, including reserved bandwidth thatis not used for transfers (such as for short packets).The percentage is how much of the "reserved" bandwidth is scheduled bythose transfers.  For a low or full speed bus (loosely, "USB 1.1"),90% of the bus bandwidth is reserved.  For a high speed bus (loosely,"USB 2.0") 80% is reserved.Device descriptor info & Product ID info:D:  Ver=x.xx Cls=xx(s) Sub=xx Prot=xx MxPS=dd #Cfgs=dd
P:  Vendor=xxxx ProdID=xxxx Rev=xx.xxwhere
D:  Ver=x.xx Cls=xx(sssss) Sub=xx Prot=xx MxPS=dd #Cfgs=dd
|   |        |             |      |       |       |__NumberConfigurations
|   |        |             |      |       |__MaxPacketSize of Default Endpoint
|   |        |             |      |__DeviceProtocol
|   |        |             |__DeviceSubClass
|   |        |__DeviceClass
|   |__Device USB version
|__Device info tag #1where
P:  Vendor=xxxx ProdID=xxxx Rev=xx.xx
|   |           |           |__Product revision number
|   |           |__Product ID code
|   |__Vendor ID code
|__Device info tag #2String descriptor info:S:  Manufacturer=ssss
|   |__Manufacturer of this device as read from the device.
|      For USB host controller drivers (virtual root hubs) this may
|      be omitted, or (for newer drivers) will identify the kernel
|      version and the driver which provides this hub emulation.
|__String info tagS:  Product=ssss
|   |__Product description of this device as read from the device.
|      For older USB host controller drivers (virtual root hubs) this
|      indicates the driver; for newer ones, it's a product (and vendor)
|      description that often comes from the kernel's PCI ID database.
|__String info tagS:  SerialNumber=ssss
|   |__Serial Number of this device as read from the device.
|      For USB host controller drivers (virtual root hubs) this is
|      some unique ID, normally a bus ID (address or slot name) that
|      can't be shared with any other device.
|__String info tagConfiguration descriptor info:C:* #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA
| | |       |       |      |__MaxPower in mA
| | |       |       |__Attributes
| | |       |__ConfiguratioNumber
| | |__NumberOfInterfaces
| |__ "*" indicates the active configuration (others are " ")
|__Config info tagUSB devices may have multiple configurations, each of which actrather differently.  For example, a bus-powered configurationmight be much less capable than one that is self-powered.  Onlyone device configuration can be active at a time; most deviceshave only one configuration.Each configuration consists of one or more interfaces.  Eachinterface serves a distinct "function", which is typically boundto a different USB device driver.  One common example is a USBspeaker with an audio interface for playback, and a HID interfacefor use with software volume control.Interface descriptor info (can be multiple per Config):I:* If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=ssss
| | |      |      |       |             |      |       |__Driver name
| | |      |      |       |             |      |          or "(none)"
| | |      |      |       |             |      |__InterfaceProtocol
| | |      |      |       |             |__InterfaceSubClass
| | |      |      |       |__InterfaceClass
| | |      |      |__NumberOfEndpoints
| | |      |__AlternateSettingNumber
| | |__InterfaceNumber
| |__ "*" indicates the active altsetting (others are " ")
|__Interface info tagA given interface may have one or more "alternate" settings.For example, default settings may not use more than a smallamount of periodic bandwidth.  To use significant fractionsof bus bandwidth, drivers must select a non-default altsetting.Only one setting for an interface may be active at a time, andonly one driver may bind to an interface at a time.  Most deviceshave only one alternate setting per interface.Endpoint descriptor info (can be multiple per Interface):E:  Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=dddss
|   |        |            |         |__Interval (max) between transfers
|   |        |            |__EndpointMaxPacketSize
|   |        |__Attributes(EndpointType)
|   |__EndpointAddress(I=In,O=Out)
|__Endpoint info tagThe interval is nonzero for all periodic (interrupt or isochronous)endpoints.  For high speed endpoints the transfer interval may bemeasured in microseconds rather than milliseconds.For high speed periodic endpoints, the "MaxPacketSize" reflectsthe per-microframe data transfer size.  For "high bandwidth"endpoints, that can reflect two or three packets (for up to3KBytes every 125 usec) per endpoint.With the Linux-USB stack, periodic bandwidth reservations use thetransfer intervals and sizes provided by URBs, which can be lessthan those found in endpoint descriptor.

(4)dmesg

#sudo rmmod uvcvideo
#sudo modprobe uvcvideo
#dmesg[ 5066.889529] usbcore: deregistering interface driver uvcvideo
[ 5146.884778] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (05a3:9310)
[ 5146.904548] uvcvideo 1-1:1.0: Entity type for entity Extension 4 was not initialized!
[ 5146.904550] uvcvideo 1-1:1.0: Entity type for entity Processing 3 was not initialized!
[ 5146.904551] uvcvideo 1-1:1.0: Entity type for entity Camera 1 was not initialized!
[ 5146.905329] input: USB 2.0 Camera: HD USB Camera as /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/input/input7
[ 5146.905954] usbcore: registered new interface driver uvcvideo
[ 5146.905955] USB Video Class driver (1.1.1)

(转)查看USB设备相关推荐

  1. Linux下,查看USB设备信息

    Linux下,查看USB设备信息 首先需要将usbfs挂载一下,然后才能查看. $ mount -t usbfs none /proc/bus/usb $ cat  /proc/bus/usb/dev ...

  2. linux查看usb设备名称,Linux系统下查看USB设备名及使用USB设备

    1.系统插入USB设备后,从控制台界面有如下提示: 从控制台信息可以看出插入的USB设备名. 从上图可以看出,插入的USB设备为sde4. 但是,如果是CRT工具远程连接过去,可以使用下面的命令来查看 ...

  3. (三) 查看USB设备

    目录 查看USB设备 lsusb ll /sys/bus/usb/devices cat /sys/kernel/debug/usb/devices dmesg title: 查看USB设备 date ...

  4. ubuntu 查看usb设备

    原文地址:https://zhidao.baidu.com/question/1823163553720250108.html   感谢原作者分享. 查看 USB 设备 使用的是哪个串口 ls -l ...

  5. linux查看usb设备文件,技术|在 Linux 系统里识别 USB 设备名字的 4 种方法

    对于初学者来说,在 Linux 系统里你必须掌握的技术之一就是识别出插入系统里的各种设备.这也许是你的系统硬盘.外部的存储设备或者是可移动设备,比如 USB 设备或 SD 闪存卡等. 现如今,使用 U ...

  6. linux usb信息查看工具,Linux下,查看USB设备信息

    首先需要将usbfs挂载一下,然后才能查看. $ mount -t usbfs none /proc/bus/usb $cat  /proc/bus/usb/devices或者在文件(/etc/fst ...

  7. linux查看usb设备文件,Linux下查看USB设备信息

    首先需要将usbfs挂载一下,然后才能查看. $ mount -t usbfs none /proc/bus/usb $ cat  /proc/bus/usb/devices 或者在文件(/etc/f ...

  8. Ubuntu查看usb设备驱动/usb以太网卡设备驱动

    step1: lsusb 查看当前有哪些usb设备.注意:插在usb口上的外接设备一定能通过lsusb显示出来,但是不一定能通过lspci显示出来,即使这个设备的驱动已经安装了. 由于我要查看我的有线 ...

  9. linux查看usb设备文件,4 种方法识别Linux系统 USB 设备

    导读 如果在系统中插入一个设备,尤其是在桌面环境下,比如 USB 设备,它会自动挂载到一个指定目录,一般是在 /media/username/device-label 目录下,之后你就可以进入到该目录 ...

最新文章

  1. 计算机运行黑屏显示器正常,电脑主机运行正常 显示器黑屏
  2. 机器学习笔记:过拟合和欠拟合
  3. 19、修改和删除事件(ALTER/DROP EVENT)
  4. php调用C代码的方法详解和zend_parse_parameters函数详解
  5. Chromebook开发者模式Linux,Chromebook 的开发者模式和开发者版本有什么区别?
  6. Android C/C++ 开发
  7. Leetcode--142. 环形链表Ⅱ
  8. Hibernate的懒加载session丢失解决方法
  9. 机器学习实战 基于_基于ScikitLearn、Keras和TensorFlow的机器学习实战:分类
  10. Handbook of Constraints Programming——Chapter4 Backtracking Search Algorithms-Preliminaries
  11. 实验二 固件设计(小组)
  12. 阅读SSM项目之scm
  13. 偶极子天线参数优化记录
  14. IPFS为什么被学者称为数据的“黄金保险柜”?
  15. python能做什么软件?Python到底能干嘛,一文看懂
  16. 5、DOC命令获取连接电脑热点的设备的mac、ip
  17. 【知识图谱】阿里巴巴电商知识图谱
  18. 日积一步3(求解点到平面二次曲线的最近距离)
  19. Nginx的超时keeplive_timeout配置详解
  20. 浪潮信息边缘服务器测试,浪潮信息边缘AI服务器全面支持NVIDIA EGX平台

热门文章

  1. 有软件负载均衡,也有硬件负载均衡,选择哪个?
  2. Linux:chmod命令
  3. 警告框处理与下拉框选择_Sinno_Song_新浪博客
  4. 关于触摸屏的一些硬件知识
  5. python-CST MWS自动采样
  6. Cisco vPC 技术
  7. 咸鱼Micropython—GPIO
  8. 如何控制QQ好友访问空间?
  9. Junit 实例精讲基础教程(一) 使用@Ignore注解跳过单元测试方法的执行
  10. Golang — RESTful框架 go-restful