Thursday, January 20, 2011

inspecting USB HID descriptors in Linux

It's sometimes necessary to see the complete USB HID descriptor for a device, including the report descriptor.  On Debian-based systems like Ubuntu, you can do this with "lsusb".

To see all of the information with the report descriptor you must:
  1. unbind the HID device in question
  2. run "lsusb -vvv" as root
To see a list of HID devices:

$ ls /sys/bus/usb/drivers/usbhid


For example, for the device 3-1:1.0 you can:

$ echo -n 6-1:1.0 | sudo tee -a /sys/bus/usb/drivers/usbhid/unbind
$ sudo lsusb -vvv