AI agent helps Linux user reverse-engineer unsupported scanner driver

Red Hat engineer Christian Schaller used Claude Code to study a manufacturer's Windows driver and produce a working Linux driver for the Plustek OpticFilm 8200i, later releasing the tooling as open-source.

By LineZotpaper
Published
Read Time2 min
Christian Schaller, a Red Hat engineering director and longtime GNOME contributor, has reverse-engineered a Windows driver for a film scanner that would not work with Linux, using Anthropic's Claude Code AI agent. Schaller posted an account of the process, which involved capturing USB traffic from the manufacturer's software and comparing it with his Linux implementation, leading to a working driver within hours. He has released the underlying methodology as an open-source project called hw-harness under an MIT license.

Schaller bought the Plustek OpticFilm 8200i because it was listed as supported, but discovered the manufacturer had swapped in a chipset the SANE scanner backend did not recognise. His early attempts to produce a driver with Claude Code stalled because the AI had no working driver to compare against.

Inspired by a post on X from Tom Crider (Glorious Eggroll), who used an AI agent to fix a mouse driver by giving it access to a Windows machine, Schaller fed the idea to Claude and built a setup that let the AI run the manufacturer's Windows software and capture USB traffic alongside his Linux driver's output. By comparing the two, Claude could identify where the Linux implementation went wrong. "Claude doesn't get bored," Schaller wrote, noting the AI's patience with the painstaking work of piecing together undocumented device protocols.

By the time Schaller finished, support for the newer OpticFilm 8200i had already landed in SANE, courtesy of another developer. Schaller said he will switch to the upstream version once it has the features he needs and keep his own driver as a proof of concept. His implementation does offer some advantages, including infrared dust removal and exposure adjustments for dense negatives, supporting colour and grayscale scanning from 300 to 7,200 dpi.

Schaller's hw-harness project bundles the tooling for capturing how a device behaves, comparing a working implementation against a broken one, and giving a coding agent the information it needs to work on hardware that Linux does not yet support.

§

Analysis

Why This Matters

  • Demonstrates a practical workflow for using AI agents to bridge hardware compatibility gaps in Linux, potentially reducing the time and skill required for reverse-engineering.
  • Shows that AI agents can handle the repetitive, detail-oriented work of comparing USB captures, a task humans find tedious.
  • The open-source release of hw-harness could make this approach reusable by others facing similar driver challenges.

Background

Linux relies on volunteer-maintained backends such as SANE (Scanner Access Now Easy) for hardware support. When manufacturers change chipsets without updating drivers, users often face unsupported devices. Reverse-engineering proprietary drivers traditionally requires deep knowledge of USB protocols and assembler-level debugging. Schaller's approach uses AI to automate the comparison between known working and non-working implementations, lowering the barrier for such work.

Key Perspectives

Christian Schaller: The process is not highly complex but requires patience; AI agents can provide that patience and accelerate the discovery of differences. His open-source release aims to help others. Open-source community: The existence of a competing driver is beneficial even if not maintained, as it validates the approach and may inform future improvements. Upstream SANE support is the preferred long-term solution. Critics/Skeptics: AI-generated driver code still needs human testing on real hardware; generating correct-looking code is different from a working driver. The approach depends on having a working Windows driver to reference, which may not always be available.

What to Watch

  • Whether the hw-harness project gains traction and leads to similar reverse-engineering successes for other unsupported Linux hardware.
  • Whether Claude Code or other AI agents receive improvements that further automate the testing and validation loop.
  • Adoption of Schaller's method by other Linux driver developers as a standard part of their toolkit.

Sources

Zotpaper

Written by software from the reporting listed above, scored by an automated standards desk, and published without a person reading it first. If something here is wrong, tell the editor and it will be put right.

How we workSubscribe