Plenty of USB gadgets only work properly on Windows: RGB controllers, case LCDs, AIO coolers, gaming mice, smart lamps. The vendor's configuration app talks to the device over a private protocol, and Linux users get nothing. The usual fix is slow, manual work. You sniff the bus, click one setting at a time, diff the packets, and slowly build a picture of the command format. A new open-source tool called usb-rea tries to automate most of that, from the capture through to a working Python driver.

The project's GitHub repository describes it as a tool to "Reverse Engineer any USB gadget: capture vendor-app traffic, infer the protocol with evidence, generate an open Python/libusb driver." It is written by Emir Mrkaljevic, released under the MIT license, and ships as both a command-line tool and an MCP (Model Context Protocol) server. CNX Software covered it on 27 November 2026.

How the pipeline works

usb-rea doesn't sniff the bus itself in some new way. It uses the two capture mechanisms people already use: usbmon on Linux and USBPcap on Windows. It reads their output as pcap or pcapng files. According to CNX Software, you run a capture while clicking through the vendor app, and you label the actions as you go. Those labels are what make inference possible. With them, the tool can line up a known change in user intent against a change in the bytes on the wire. The README's example marks an action such as a brightness setting, and asks for three or more values per setting.

From labelled captures, usb-rea tries to classify each part of the command structure. CNX Software lists the categories it looks for: constants, counters, value fields, lookup tables and CRCs. The repository's demo example shows what that output looks like: a counter field that increments by one per message, lookup tables, and a crc16_modbus checksum computed over bytes[0:6]. The README says the tool infers this structure "with evidence". In other words, the demo report links its claims to Wireshark frame numbers, rather than just handing over an opaque result.

There are two main outputs. One is a Markdown report describing the protocol. The other is a standalone pyusb driver that can drive the device directly from Linux without the vendor software. The demo also writes a Wireshark dissector.

CNX Software lists the CLI subcommands as capture, mark, transfers, infer, report, scaffold, dissector, hid, demo, testcard, replay, lookup and mcp. The last one starts the MCP server mode, which CNX Software says lets an AI coding assistant drive the analysis. The repository also contains a server.json and a Dockerfile alongside a CHANGELOG.md. A third-party directory, mcp.so, lists the server under the category "Other" with an MIT license and a last-updated date of 2026-11-11. That listing sends readers to the repository README for install and MCP configuration.

The validation: two devices with known answers

Any protocol-inference tool has to answer one question: how do you know the inferred protocol is right? Mrkaljevic's answer is to test against devices whose protocols the open-source community has already worked out.

The first is the NZXT Kraken X AIO liquid cooler, USB ID 1e71:170e. It is supported by liquidctl, the cross-platform CLI and Python driver collection for AIO liquid coolers and other devices. liquidctl's supported-device list includes the Kraken X42, X52, X62 and X72, along with devices such as the NZXT Smart Device (V1) and Corsair Vengeance RGB memory. Its repository shows 2,166 commits. According to the usb-rea README, captures of the Kraken X let the tool recover the fan command:

02 4d <channel> 00 <duty>

The README says this matches, byte for byte, what liquidctl's kraken2.py driver sends. It also makes a stronger claim: the generated driver emits identical packets for duty values that never appeared in the captures. That is the difference between replaying recorded packets and modelling the protocol. A replay tool can only send what it saw. A tool that has correctly identified <duty> as a value field can produce any valid duty setting.

The second device is the SteelSeries Rival 100 mouse, which the open-source rivalcfg project supports. The README says the same holds for the Rival 100's DPI, polling and RGB tables from rivalcfg. These are lookup-table cases, where a user-facing setting maps to a device-specific byte value instead of a plain integer.

The README says these checks run in CI, so the Kraken and Rival comparisons are regression tests and not a one-off demo. The repository showed 93 commits at the time of writing.

The caveat that matters

CNX Software notes that both test devices are already supported by Linux tools (liquidctl and rivalcfg), "so verifying the results was easier". That is the right way to build a test harness. It also means the headline evidence covers protocols that are already known. Both validation targets use fairly simple command formats: a fixed prefix, a channel byte, a zero byte and a value byte for the Kraken fan command, and lookup tables for the Rival settings.

The README does say the tool has also been run on public Wireshark captures and on a real AIO cooler LCD capture a user shared, and it warns that a matching USB ID alone does not prove your unit speaks the same protocol. But nothing in the sources shows usb-rea working on a fully undocumented device, or on one whose protocol is more hostile to inference. Examples would be devices that use encryption, multi-packet state machines, firmware handshakes or checksums outside the families the tool recognises. The demo's CRC-16/MODBUS detection is encouraging, but it is a demo on a synthetic capture. The README labels the project alpha status. Treat the generated driver as a well-evidenced first draft, not a finished product, and read the Markdown report before sending anything to hardware you care about.

It is also worth being clear about where the value is. Labelling actions and diffing captures is the tedious part of USB reverse engineering, and usb-rea automates exactly that. It doesn't remove the need to understand what the device is doing. A wrong inference about which byte is the duty field on a pump or fan controller is a real hardware concern, not just a software bug.

What It Means for Makers

The tool is aimed at people with a USB peripheral that is stuck on a Windows vendor app: the case LCDs, RGB controllers, mice and smart lamps the README names. It could also help people who maintain open drivers for that kind of hardware. For a liquidctl- or rivalcfg-style project, usb-rea could speed up adding support for a new model by turning a set of labelled captures into a draft protocol description and a working pyusb prototype, replacing hours of manual packet diffing. For embedded engineers, it is a reasonable way to document a legacy or third-party device's protocol in a structured, reviewable form.

The MCP server mode matters if you already use an AI coding assistant. The assistant can call the analysis steps directly instead of you pasting hex dumps into a chat window. The core CLI works without it.

Price and availability: usb-rea is free and open source under the MIT license, available now from its GitHub repository. The README gives the install as pip install usb-rea, with pipx recommended on Arch Linux. CNX Software installed it with pip inside a Python virtual environment on Ubuntu 26.04. Capturing on Windows uses USBPcap, and capturing on Linux uses usbmon. CNX Software says the analysis step can run on Windows, Linux or macOS. The README's status line reads "alpha (v0.7.14, on PyPI)", and the repository's CHANGELOG.md tracks changes. Expect rough edges.

Sources