Translation(s): English - French - Italiano - Русский

(!) ?Discussion

How to identify a device > USB



How to list and identify the USB devices that are connected to you computer.

/!\ Make sure the device is powered-up and enabled before listing the devices.

Device are mainly identified using a pair of hexadecimal numbers, like 04b3:3108.

See references for more information.

Most of the devices (device-ids) handled by Debian are listed in the page : DeviceDatabase/USB.

Many people simply use lsusb, which is available on almost every Debian system, to list the devices on their computer. Gnome users can install and use the hardinfo method. KDE user can use kinfocenter.

lsusb

lsusb (package:usbutils) is the standard tool to query the connected USB devices.

# lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 006: ID 0a5c:2110 Broadcom Corp.
Bus 004 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000

To get something slightly more verbose, but still readable, I use :

# lsusb -v | grep -E '\<(Bus|iProduct|bDeviceClass|bDeviceProtocol)' 2>/dev/null
Bus 005 Device 001: ID 0000:0000
  bDeviceClass            9 Hub
  bDeviceProtocol         1 Single TT
  iProduct                2 EHCI Host Controller
Bus 004 Device 006: ID 0a5c:2110 Broadcom Corp.
  bDeviceClass          224 Wireless
  bDeviceProtocol         1 Bluetooth
  iProduct                2 BCM2045B
  (Bus Powered)
Bus 004 Device 001: ID 0000:0000
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed hub
  iProduct                2 UHCI Host Controller
Bus 001 Device 001: ID 0000:0000
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed hub
  iProduct                2 UHCI Host Controller
Bus 002 Device 001: ID 0000:0000
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed hub
  iProduct                2 UHCI Host Controller
Bus 003 Device 001: ID 0000:0000
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed hub
  iProduct                2 UHCI Host Controller

{i} man lspci(8)

Under Gnome : hardinfo

Gnomes's System Information (Hardinfo in Menu Applications/System Tools, from package:hardinfo) has an information page on the "USB" cards.

hardinfo.png
note the "Vendor" and "Product ID".

Under KDE : KInfocenter

KDE's KInfoCenter (in K Menu / System / KInfoCenter Info Center, from package:kcontrol) has an information page on the "USB" cards.

KInfoCenter.png

discover

The discover package has a nice command too:

$ discover --vendor-id --model-id usb
0000 0000 unknown unknown
0000 0000 unknown unknown
0a5c 2110 unknown unknown
0000 0000 unknown unknown
0000 0000 unknown unknown
0000 0000 unknown unknown

{i} man (1)discover
{i} discover uses its own files : /lib/discover/usb-busclass.xml, /lib/discover/usb-device.xml, /lib/discover/usb-vendor.xml

Digging by hand

/sys/kernel/debug/usb/devices (or /proc/bus/usb/devices with usbfs)

Detailed information on attached USB devices is available via the /sys/kernel/debug/usb/devices file. Note that the /sys/kernel/debug/ path requires root privileges to access. In older systems, the deprecated usbfs filesystem provided similar information in /proc/bus/usb/devices.

For example, from a Beaglebone Black running Wheezy:

$ sudo cat /sys/kernel/debug/usb/devices | grep -E "^([TSPD]:.*|)$"

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.08
S:  Manufacturer=Linux 3.8.13-00770-g9dafee0 musb-hcd
S:  Product=MUSB HDRC host driver
S:  SerialNumber=musb-hdrc.0.auto

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.08
S:  Manufacturer=Linux 3.8.13-00770-g9dafee0 musb-hcd
S:  Product=MUSB HDRC host driver
S:  SerialNumber=musb-hdrc.1.auto

References