Using Artificial Intelligence to reverse engineer hardware
A GNOME developer used Claude with a custom harness to build Linux drivers for unsupported hardware by having the AI analyze USB traffic and Windows driver behavior, successfully fixing a film scanner and laptop camera without access to documentation or original source code.
- Built a working SANE backend for the Plustek OpticFilm 8200i scanner (GL128 chipset) that's faster than the upstream driver added months later, plus a GNOME app called Negative Vibes for scanning film with infrared dust removal and non-destructive editing.
- Created hw-harness, a generic tool that lets Claude compare reference captures from Windows drivers against Linux attempts, turning vague "it doesn't work" into concrete lists of register and control differences to fix.
- Fixed critical bugs in a ThinkPad X1 Carbon's MIPI camera (Sony IMX471) by having Claude identify and patch kernel driver issues and libcamera software ISP problems, raising frame brightness from 31.1 to 90.9 in low-light tests.
A GNOME developer reverse-engineered unsupported hardware by using Claude AI as a tireless assistant to analyze USB traffic and firmware behavior. The workflow was straightforward: run the Windows driver in a virtual machine with the real device passed through, capture USB data on the Linux host, repeat the same operation with a test driver, then diff the traces to find bugs. For devices without accessible buses (like internal cameras), the harness inspects Windows INF files and registry data instead. The approach avoids copying proprietary code—it just observes what hardware does and extracts configuration constants that can be traced back to recordings. The developer packaged this as hw-harness, a generic tool meant to lower the barrier for others tackling undocumented hardware.
The proof came through three concrete projects. First, a SANE backend for the Plustek OpticFilm 8200i scanner, which supports color, grayscale, and infrared scanning at up to 7200 dpi with dust removal—faster than the upstream SANE driver that was added months later. Second, Negative Vibes, a GNOME app for scanning film that treats the raw scanner output as immutable and applies non-destructive adjustments on top, with IT8 calibration and export to multiple formats. Third, fixes for the camera on a ThinkPad X1 Carbon that had been producing dark, vignette-heavy images with color cast—the developer patched the IMX471 kernel driver and libcamera's software ISP to correct crop selection bugs, register width errors, and missing lens shading correction.
The real insight here is that driver development for undocumented hardware is tedious but not conceptually difficult—it's pattern-matching across hex dumps that humans find exhausting. An AI model can read thousands of lines of USB captures, spot repeating sequences with single-byte variations, hypothesize what each byte controls, and write tests to confirm. It doesn't get bored or make careless mistakes. The human still owns the decisions about what to build and validates everything on real hardware, but the slog shrinks dramatically. What used to take weeks of staring at traces now takes hours.