Skip to content

Instantly share code, notes, and snippets.

@yorickvP
Last active February 6, 2021 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorickvP/c3650001a7d298758eec81f4a438e976 to your computer and use it in GitHub Desktop.
Save yorickvP/c3650001a7d298758eec81f4a438e976 to your computer and use it in GitHub Desktop.
# without:
~ via ❄️ impure (shell)
❯ sudo lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 3: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 3: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
|__ Port 4: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 5: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 5: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
# with:
~ via ❄️ impure (shell)
❯ sudo lsusb -tv
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 1: Dev 22, If 1, Class=Vendor Specific Class, Driver=, 480M
ID 20b7:9db1 Qi Hardware Glasgow Debug Tool
|__ Port 1: Dev 22, If 0, Class=Vendor Specific Class, Driver=, 480M
ID 20b7:9db1 Qi Hardware Glasgow Debug Tool
|__ Port 3: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
|__ Port 3: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
|__ Port 4: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
ID 04f3:20d0 Elan Microelectronics Corp.
|__ Port 5: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
ID 0c45:670c Microdia Integrated Webcam HD
|__ Port 5: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
ID 0c45:670c Microdia Integrated Webcam HD
❯ head /sys/bus/usb/devices/1-1/*
==> /sys/bus/usb/devices/1-1/1-1:1.0 <==
head: error reading '/sys/bus/usb/devices/1-1/1-1:1.0': Is a directory
==> /sys/bus/usb/devices/1-1/1-1:1.1 <==
head: error reading '/sys/bus/usb/devices/1-1/1-1:1.1': Is a directory
==> /sys/bus/usb/devices/1-1/authorized <==
1
==> /sys/bus/usb/devices/1-1/avoid_reset_quirk <==
0
==> /sys/bus/usb/devices/1-1/bcdDevice <==
0131
==> /sys/bus/usb/devices/1-1/bConfigurationValue <==
1
==> /sys/bus/usb/devices/1-1/bDeviceClass <==
00
==> /sys/bus/usb/devices/1-1/bDeviceProtocol <==
00
==> /sys/bus/usb/devices/1-1/bDeviceSubClass <==
00
==> /sys/bus/usb/devices/1-1/bmAttributes <==
80
==> /sys/bus/usb/devices/1-1/bMaxPacketSize0 <==
64
==> /sys/bus/usb/devices/1-1/bMaxPower <==
500mA
==> /sys/bus/usb/devices/1-1/bNumConfigurations <==
2
==> /sys/bus/usb/devices/1-1/bNumInterfaces <==
2
==> /sys/bus/usb/devices/1-1/busnum <==
1
==> /sys/bus/usb/devices/1-1/configuration <==
Pipe P at {2x512B EP2OUT/EP6IN}, Q at {2x512B EP4OUT/EP8IN}
==> /sys/bus/usb/devices/1-1/descriptors <==
@ 1 I )
==> /sys/bus/usb/devices/1-1/dev <==
189:22
==> /sys/bus/usb/devices/1-1/devnum <==
23
==> /sys/bus/usb/devices/1-1/devpath <==
1
==> /sys/bus/usb/devices/1-1/driver <==
head: error reading '/sys/bus/usb/devices/1-1/driver': Is a directory
==> /sys/bus/usb/devices/1-1/ep_00 <==
head: error reading '/sys/bus/usb/devices/1-1/ep_00': Is a directory
==> /sys/bus/usb/devices/1-1/firmware_node <==
head: error reading '/sys/bus/usb/devices/1-1/firmware_node': Is a directory
==> /sys/bus/usb/devices/1-1/idProduct <==
9db1
==> /sys/bus/usb/devices/1-1/idVendor <==
20b7
==> /sys/bus/usb/devices/1-1/ltm_capable <==
no
==> /sys/bus/usb/devices/1-1/manufacturer <==
whitequark research
==> /sys/bus/usb/devices/1-1/maxchild <==
0
==> /sys/bus/usb/devices/1-1/port <==
head: error reading '/sys/bus/usb/devices/1-1/port': Is a directory
==> /sys/bus/usb/devices/1-1/power <==
head: error reading '/sys/bus/usb/devices/1-1/power': Is a directory
==> /sys/bus/usb/devices/1-1/product <==
Glasgow Debug Tool
==> /sys/bus/usb/devices/1-1/quirks <==
0x0
==> /sys/bus/usb/devices/1-1/removable <==
removable
head: cannot open '/sys/bus/usb/devices/1-1/remove' for reading: Permission denied
==> /sys/bus/usb/devices/1-1/rx_lanes <==
1
==> /sys/bus/usb/devices/1-1/serial <==
C1-20200924T001537Z
==> /sys/bus/usb/devices/1-1/speed <==
480
==> /sys/bus/usb/devices/1-1/subsystem <==
head: error reading '/sys/bus/usb/devices/1-1/subsystem': Is a directory
==> /sys/bus/usb/devices/1-1/tx_lanes <==
1
==> /sys/bus/usb/devices/1-1/uevent <==
MAJOR=189
MINOR=22
DEVNAME=bus/usb/001/023
DEVTYPE=usb_device
DRIVER=usb
PRODUCT=20b7/9db1/131
TYPE=0/0/0
BUSNUM=001
DEVNUM=023
==> /sys/bus/usb/devices/1-1/urbnum <==
14
==> /sys/bus/usb/devices/1-1/version <==
2.00
@yorickvP
Copy link
Author

yorickvP commented Feb 6, 2021

without:

yorick in jarvis in ~
❯ ls -al /sys/bus/usb/devices
lrwxrwxrwx 0 root 6 Feb 12:59 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-0:1.0
lrwxrwxrwx 0 root 6 Feb 12:59 1-3 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-3
lrwxrwxrwx 0 root 6 Feb 12:59 1-3:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0
lrwxrwxrwx 0 root 6 Feb 12:59 1-3:1.1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1
lrwxrwxrwx 0 root 6 Feb 12:59 1-4 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4
lrwxrwxrwx 0 root 6 Feb 12:59 1-4:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0
lrwxrwxrwx 0 root 6 Feb 12:59 1-5 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-5
lrwxrwxrwx 0 root 6 Feb 12:59 1-5:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0
lrwxrwxrwx 0 root 6 Feb 12:59 1-5:1.1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.1
lrwxrwxrwx 0 root 6 Feb 12:59 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb2/2-0:1.0
lrwxrwxrwx 0 root 6 Feb 12:59 usb1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1
lrwxrwxrwx 0 root 6 Feb 12:59 usb2 -> ../../../devices/pci0000:00/0000:00:14.0/usb2

with:

yorick in jarvis in ~
❯ ls -al /sys/bus/usb/devices
lrwxrwxrwx 0 root 6 Feb 12:59 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-0:1.0
lrwxrwxrwx 0 root 6 Feb 13:06 1-1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1
lrwxrwxrwx 0 root 6 Feb 13:06 1-1:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0
lrwxrwxrwx 0 root 6 Feb 13:06 1-1:1.1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1
lrwxrwxrwx 0 root 6 Feb 12:59 1-3 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-3
lrwxrwxrwx 0 root 6 Feb 12:59 1-3:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0
lrwxrwxrwx 0 root 6 Feb 12:59 1-3:1.1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1
lrwxrwxrwx 0 root 6 Feb 12:59 1-4 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4
lrwxrwxrwx 0 root 6 Feb 12:59 1-4:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0
lrwxrwxrwx 0 root 6 Feb 12:59 1-5 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-5
lrwxrwxrwx 0 root 6 Feb 12:59 1-5:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0
lrwxrwxrwx 0 root 6 Feb 12:59 1-5:1.1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.1
lrwxrwxrwx 0 root 6 Feb 12:59 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:14.0/usb2/2-0:1.0
lrwxrwxrwx 0 root 6 Feb 12:59 usb1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1
lrwxrwxrwx 0 root 6 Feb 12:59 usb2 -> ../../../devices/pci0000:00/0000:00:14.0/usb2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment