I wrote this for hardware that only ships a Windows app (case LCDs, RGB controllers, AIO coolers, mice). You record USB traffic while clicking through the vendor app (usbmon on Linux, USBPcap on Windows), note what each click did, and usb-rea infers the command layout: constant bytes, counters, value fields with their scaling, lookup tables, checksums and CRCs, handshakes and image streams. Output is a Markdown report where every claim points at Wireshark frame numbers, plus a standalone pyusb driver.

A few Python-side details that might interest people here:

  • The pcap and pcapng parsing is plain standard library, so the only runtime dependency besides the optional MCP server is pyusb.
  • Linear field fits have to survive leave-one-out cross-checks before they are reported, so it says “unknown” rather than guessing.
  • usb-rea demo --device fan generates a synthetic capture and runs the whole pipeline, so you can try it with no hardware.

It is MIT licensed and on PyPI (pip install usb-rea). On known protocols, for example the NZXT Kraken X fan command from liquidctl, it recovers the packet format byte for byte. Feedback on the code or the inference approach is welcome.