usb-rea is an open-source, MIT-licensed tool for people who own a USB gadget that only ships with a Windows program: it captures USB traffic while the user clicks through the vendor app, infers how the commands are built and generates a Markdown protocol report plus a standalone Python driver that runs on Linux. It is developed by Emir Mrkaljevic, published on GitHub and installed with pip.
Key points on usb-rea in 20 seconds
- It captures USB traffic with USBPcap on Windows or usbmon on Linux while you use the vendor app.
- It infers constants, counters, value fields, lookup tables and CRCs in each command.
- It outputs a report, a pyusb-based Python driver and a Wireshark dissector.
Fans, lighting controllers, AIO liquid coolers, mice with custom settings or video capture cards: plenty of USB devices only half work on Linux because the vendor only provides a Windows configuration tool. Until now, the alternative was capturing packets in Wireshark and working out by hand what each byte means. The author told CNX Software that he once did exactly that with a video capture card, using Wireshark and libusb, and that a tool like this would have saved him work.
Capture, label and infer the protocol
The workflow has four steps. First, USB traffic is captured with USBPcap on Windows or usbmon on Linux while you click options in the vendor app. Then each action is labelled in the capture with the mark command, so the tool knows which packets correspond to, say, setting the fan to 40% or 60%. With those labels, usb-rea diffs the packets per action and infers the command layout: which bytes are constants, which are counters, which carry the chosen value, whether there are lookup tables and whether the packet includes a checksum (CRC).
The output is three files: a Markdown protocol report, a standalone Python driver built on pyusb and a Lua dissector for Wireshark that shows packets already decoded. According to the project description, every conclusion in the report is linked to the exact packets that support it, so the inference can be checked. Capture can happen on Windows, and analysis runs on Windows, Linux or macOS.
It is worth being precise about the kind of driver it produces. CNX Software describes it as a Python driver on pyusb, running in user space through libusb, and does not mention kernel modules. That is enough to drive a fan or an LED, but it does not replace a kernel driver when the device must plug into subsystems such as video or audio.
Tested with an NZXT cooler and a SteelSeries mouse
The author validated the tool with two devices that already have Linux support, precisely so results could be compared: the NZXT Kraken X AIO cooler, handled by liquidctl, and the SteelSeries Rival 100 mouse, handled by rivalcfg. According to the developer, usb-rea recovers the same fan command liquidctl sends, byte for byte, and the generated driver produces correct packets for values it never saw in the capture. The project also ships a demo with an emulated fan.
There are other useful features. The lookup command checks whether a VID:PID is already documented by an open-source project, although the tool itself warns that a matching ID does not guarantee the same protocol. The replay command sends a single packet to a real device and requires the –yes flag, a sensible precaution because a malformed command can leave hardware in an unexpected state. It can also run as an MCP (Model Context Protocol) server so an AI coding assistant can drive the analysis.
Preparing a capture on Linux
If the vendor app runs in a Windows virtual machine on a Linux host and the device is passed through to that VM, traffic can be captured on the host with usbmon. The basic steps are finding the device’s bus and loading the module:
# Identify the device: bus, VID and PID
lsusb
# Load the kernel USB capture module
sudo modprobe usbmon
# Install usb-rea in a Python virtual environment
python3 -m venv ~/usb-rea
~/usb-rea/bin/pip install usb-reaCode language: PHP (php)
Once usbmon is loaded, Wireshark lists usbmon1, usbmon2 and so on, one interface per bus. The author tested the install on Ubuntu 26.04. For the generated driver to access the device without root, the usual Linux approach is a udev rule granting permissions on that specific VID:PID. The project is very new and still has little activity on GitHub, so it is best tried first on hardware that is not critical.
Frequently asked questions
What kind of driver does usb-rea generate?
A standalone Python driver built on pyusb, running in user space through libusb. It does not generate kernel modules.
Do I need Windows to use it?
You need to run the vendor app to capture its traffic, with USBPcap on Windows or usbmon on Linux. Analysis can run on Windows, Linux or macOS.
Which devices has it been tested with?
The NZXT Kraken X AIO cooler and the SteelSeries Rival 100 mouse, plus an emulated fan included as a demo.
What license does it use?
usb-rea is released under the MIT license and installs with pip.
Sources:
