USB Descriptor and Request Parser

Input hexadecimal values, seperated by commas or whitespace, "0x" or "$" prefix is optional, invalid numbers are treated as 0 or ignored, C style comments will be stripped out
Parse as...    
Output
About this page

This page was written by Frank Zhao in July of 2013. Now it is hosted on Frank's new site.

The page uses Javascript, so it must be enabled. This page can be downloaded and used offline, because it does not depend on any external or online resources.

The reason why I made this tool is because some USB traffic sniffers do not perform parsing on USB packets (especially the freeware ones), but the binary data can still be obtained. This tool will traverse through the binary data, and translate it into something human-readable, using the official documents from USB.org. The three types of data this tool can handle are "USB Standard Descriptors", "USB Standard Requests", and "USB HID Report Descriptors".

The "parse USB HID report descriptor" function is the reverse of the (horrible) "HID Descriptor Tool" provided by USB.org, and the display format is very similar.

Because USB devices are generally embedded devices, this tool is designed with the C programming language in mind. The output can be imported as an array initializer.

I was frustrated when I couldn't find a tool for this, so I wrote it in hopes that it will become useful for everybody looking for such a tool.

If you don't understand this tool, here are some sample datasets I've taken from a Playstation 3 DualShock 3 controller:

This tool is a great companion to a USB traffic sniffer like the Beagle USB 12, available from Adafruit Industries. If you like reverse engineering, also check out the Saleae Logic and Saleae Logic 16.

If you have any comments, please post them here on this blog post.

Useful Links USB.org Main Page
USB.org Developer Documentation (all specifications can be downloaded here)
USB.org Approved Class Specification Documents
USB.org HID Information
USB.org Defined Class Codes
Beyond Logic: USB in a NutShell
USB Made Simple
LUFA - Lightweight USB Framework for AVRs
V-USB, A Firmware-Only USB Driver for Atmel AVR Microcontrollers
libusb and libusb-win32

Changes: