usb-rea

CLI and MCP server

Get a Linux driver from a Windows-only USB gadget.

usb-rea reads a USB capture, infers the protocol from labelled clicks in the vendor app, and writes a Markdown report plus a standalone pyusb driver. I built it for devices that only ship a Windows app: a case LCD, an RGB controller, a mouse, or a "smart" lamp.

pip install usb-rea
usb-rea demo --device fan

The demo uses a synthetic fan controller, so you can try it without any hardware. It writes a report (every claim linked to frame numbers) and a working driver. Status is alpha; details and real device write-ups are in the repository.

From a real capture

sudo modprobe usbmon
usb-rea capture start -o lamp.pcapng
usb-rea mark -m lamp.pcapng.actions.json "brightness 0%"
usb-rea capture stop
usb-rea report lamp.pcapng -o report.md
usb-rea scaffold lamp.pcapng -o lamp_driver.py

It accepts usbmon on Linux and USBPcap on Windows. Captured without markers? List the actions in order and usb-rea splits the traffic at the pauses.

What it has recovered