Developer Uses Rust to Reverse Engineer USB Device for Linux Support

The process involves capturing USB packages via Wireshark and USBPcap, using Rust to replicate the data and writing a bit of Linux software.

Cabe Atwell
4 years agoSensors

UK-based developer Harry Gill built a new workstation using AMD’s Ryzen 3950X, a 16-core mainstream CPU that produces a lot of heat under load. The processor doesn’t include a heatsink in the retail packaging, as AMD must figure anyone willing to spend around $600 will probably want to use a third-market cooling solution, which is the route Gill went by using Corsair’s massive H150i RGB Pro XT AIO (all-in-one) water cooler.

The AIO connects to the motherboard’s CPU header and a USB port to control fan speeds and RGB lighting. The connections also allow users to see technical data on performance, including fan and pump RPMs, heat, and more. Setup was a breeze, but Gill soon found he couldn’t access any of that AIO data, as it only supports Windows, and he prefers Linux. The AIO still cools the processor as intended, but in order to access the information and control fan speeds via software, he needed to back engineer the USB connection.

Gill began the process by trying to use a VM (virtual machine) to grab USB data, but Corsair’s AIO needed access to OpenGL, and he couldn’t get the software to install. He then set about configuring a dual-boot system, and used Wireshark and USBPcap to capture the USB packages, then tasked Rust to make sense of the data. To utilize the information, Gill had to perform a bit of trial and error to identify what bit of code does what, and eventually successful at grabbing the information he wanted to display using the Linux OS. Gill uploaded a detailed walkthrough on his blog, for those interested in recreating his endeavor.

Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles