usb-rea is an MIT-licensed tool for reverse-engineering USB devices that work only with a manufacturer’s Windows application, then creating Linux support. It captures USB traffic through USBPcap or usbmon as a user operates the vendor software and labels actions, such as changing a fan speed or observing a temperature. From those labeled exchanges, it infers protocol details - including command fields, counters, lookup tables, checksums, and handshakes - and produces a Markdown evidence report, a standalone Python driver using pyusb, and a Wireshark Lua dissector. It can also decode HID descriptors, replay packets, check whether a device ID is already documented, and run as an MCP server for AI coding assistants.
Developer Emir Mrkaljevic tested the tool against an NZXT Kraken X cooler and SteelSeries Rival 100 mouse, whose protocols are already supported by Linux utilities, making its inferred behavior verifiable. For the cooler, usb-rea reportedly recovered a fan command byte-for-byte and generated packets that worked for values absent from the capture. Its demo simulates a fan, identifies command formats and a session handshake, and reports that all 24 labeled observations matched device replies. Users can capture traffic on Windows and analyze it on Windows, Linux, or macOS. The tool’s device-ID lookup can prevent unnecessary reverse-engineering, though a matching USB ID alone does not guarantee that a device uses the documented protocol.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.