trivia: dumping USB HID report descriptors

Werner Almesberger werner at
Sat Nov 12 21:18:30 EST 2011

The USB HID protocol has a descriptor that defines the layout of
the reports the HID device sends. If you're ever in a situation
where you need this sort of information, here's how you can decode


  get usbhid-dump-1.2.tar.gz from

  get hidrd-0.2.tar.gz from

Build and install:

  tar xfz usbhid-dump-1.2.tar.gz
  cd usbhid-dump-1.2
  make install

  cd ..
  tar xfz hidrd-0.2.tar.gz
  cd hidrd-0.2
  make install


Find the VID:PID of your device with lsusb or whatever you prefer.

usbhid-dump -d VID:PID | grep -v : | tr -d ' \n' | xxd -r -p |
  hidrd-convert -o spec

And all the pesky little details will be revealed before your very

If you forget to specify the VID:HID, it seems that this will grab
your USB keyboard, etc. Just waiting for one minute supposedly
returns it to you. I didn't test this :-)

Further reading:

- Werner

More information about the discussion mailing list