Skip to content

USB Descriptor

hasu@tmk edited this page Sep 12, 2018 · 5 revisions

How to get descriptor

On Linux

You can use lsusb -v to get descriptor. To designate your device give vendor and product ID to -d option.

lsusb -v -d feed:cafe

You will see output like below.

Bus 001 Device 035: ID feed:caaa  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0xfeed 
  idProduct          0xcaaa 
  bcdDevice            1.04
  iManufacturer           1 t.m.k.
  iProduct                2 HHKB mod
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          109
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
...

On Windows

These tools can be used to get descriptors.

On MacOS

This gives you info perhaps?

system_profiler SPUSBDataType

USB Descriptor in 'USB in a NutShell'

https://www.beyondlogic.org/usbnutshell/usb5.shtml

HID Report Descriptor

https://github.com/tmk/tmk_keyboard/wiki/HID-Report-Descriptor

You can’t perform that action at this time.