Skip to content
Gary Rowe edited this page Oct 13, 2020 · 1 revision

The Universal Serial Bus (USB) is a huge subject and anyone developing code for devices that use it should spend some time learning it. To help you out I've curated a set of useful links that I think will help.

A comprehensive guide to how HID works

The Beyond Logic USB in a Nutshell articles offer a down to earth explanation of how the various parts of USB fit together. As of October 2020 the site covers up to USB 2.0 but the wealth of information within makes it a "must read" reference.

A light-hearted approach to HID

This article provides a useful explanation of HID report descriptors in the context of joysticks. It's a good way to cement the knowledge you've gained from the USB in a Nutshell reference.

Tools for analysing USB traffic

The hid4java project does provide a basic packet monitor (see HidApi.logTraffic) but sometimes it's better to use a dedicated tool for the job. Support across operating systems for USB varies wildly so you may find that your system needs a different approach.

Wireshark

Wireshark is considered the best free and open source general purpose packet traffic analyser. To use it with USB you'll need to do some extra work, detailed here.

hid-tools

The hid-tools project on GitLab offers several useful command line HID debugging tools (decoding reports, recording etc).

The list of USB IDs

Ever wanted to know where the vendorId and productId come from? Look right here: http://www.linux-usb.org/usb.ids

The USB document library

If you need the final word on how USB is expected to behave this is the definitive resource: https://www.usb.org/documents