0xreversed/with.ai
Firmware and hardwareWorksSource available
Target: Plustek OpticFilm 8200i film scanner

Wrote a SANE driver for the Plustek OpticFilm 8200i with Claude Code by diffing USB captures of the Windows driver

Plustek OpticFilm 8200i film scanner: A scanner driver from USB traces, and a harness anyone can reuse.
Image: Christian Schaller (blogs.gnome.org)

What was done

Christian Schaller had Claude Code write a Linux SANE backend and fix a laptop camera by comparing USB traces of the vendor's Windows driver in a VM against its own driver, and shared the method as hw-harness.

Christian Schaller of GNOME had Claude Code write a Linux SANE driver for the Plustek OpticFilm 8200i film scanner, whose newer chipset had no Linux support. A few hours after setting up a capture harness he had his first working scan. He then reused the harness on his laptop's MIPI camera.

How it was done

The harness runs the vendor's Windows driver in a KVM virtual machine with the real device passed through, and records USB traffic on the Linux host with usbmon. The same operation is then repeated with the new Linux driver and captured the same way, and the two traces are diffed so the differences become a list of driver bugs. For devices with no bus to tap, it reads INF files, registry data and ACPI tables instead. He generalised and published it as hw-harness. Claude also wrote Negative Vibes, a Rust negative-scanning app.

Results

The backend supports colour, gray and infrared modes, 300 to 7200 dpi, and dust removal from the infrared channel. In a single-unit test it was faster than upstream's later driver at full resolution, 34.6 seconds against 54.4. On the ThinkPad camera, kernel and libcamera fixes raised frame brightness in a low-light test from 31.1 to 90.9. He says neither result is perfect, and he checked every claim on the actual hardware.