After his mother passed away, the author inherited a box of old film negatives and bought a Plustek 8200i negative scanner, only to find its chipset had changed to one unsupported under Linux. Earlier, he had used Claude Code to build Linux configuration tools for some of his own hardware, so he wondered whether it could help him write a working SANE driver.
He had been stuck for months until he saw a post by Tom Crider, aka Glorious Eggroll, describing how he had used AI tooling to fix a mouse driver. The AI agent controlled a Windows instance to capture the data needed for the fix. The author asked Claude to set up a Windows virtual machine to do the same for his scanner. Combining the ability to run scans under Windows with USB data capture, plus improvements to Claude Code, produced his first working scan under Linux within a few hours. Some days later he had a near-perfect driver with infrared scanning support, only to find that someone had already committed scanner support to SANE in the meantime.
Encouraged, he reused the harness to attack the MIPI camera on his laptop. By the end of the day, Claude had produced patches for both the kernel driver and libcamera. He also asked Claude to make the harness generic and documented, so others could try the approach on their own hardware.
The method, called hw-harness, records a reference session by running the vendor's Windows driver in a KVM virtual machine with the device passed through. Traffic is captured on the Linux host with usbmon, which sits below the passthrough layer. The same operation is then repeated on Linux with the user's own driver, and the two traces are diffed. The human still decides what to build and verifies it on real hardware, but AI removes much of the tedious work of analyzing undocumented bus traffic.
Source: Hacker News · Summarized by HeadlinesBriefing