4

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.

no comments (yet)
sorted by: hot top new old
there doesn't seem to be anything here
this post was submitted on 26 Nov 2026
4 points (100.0% liked)

Python

8126 readers
3 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 3 years ago
MODERATORS