<< Home Yes We Scan: backstory and how it works Do you have an old USB scanner that your computer can’t talk to? If so, this is the web app for you. And this is how it came about. But first, here’s a short demo of yes-we-scan.app in action (at 3x actual speed): VIDEO It starts with a printervention I started out wanting to make an old Canon photo printer usable by my parents and in-laws. So I made printervention.app, which I wrote about before. While working on that app, I remembered I also had an old Canon USB scanner tucked away on a shelf. The last time I’d used that, I think I’d resorted to setting up a Windows 95 VM. But the same technology that powers printervention.app would clearly work for scanners too. How does it work? The core of both apps is the amazing v86, which emulates an x86 CPU — and the whole machine around it — in a browser. It compiles machine code to WebAssembly modules at runtime, which is rather clever and makes the whole thing tolerably quick. So I set up an emulated v86 machine to run SANE (Scanner Access Now Easy) on Alpine Linux, discreetly, in your browser. The interface between your browser and SANE is provided by a small custom C program that Claude helped write. This connects to the scanner, provides a JSON dump of its settings we can use to build a settings UI, and streams scan data over the hypervisor console (hvc0) in v86. Back in the browser, that scan data is received and either written to a <canvas> context (when previewing), or sent to a Web Worker running wasm-mozjpeg or fflate, compressing it to JPEG or PNG on-the-fly. Bridging v86 and WebUSB I’d already got the USB side of things working for printervention.app: USB/IP runs on the Linux machine. It packages up outgoing USB data into TCP packets, and unwraps USB data out of incoming TCP packets. As far as SANE can tell, it’s just connected to an ordinary USB scanner over ordinary USB. tcpip.js runs on the JavaScript side, mainly by compiling lwIP to WebAssembly. The v86 machi...
First seen: 2026-05-21 01:50
Last seen: 2026-05-22 07:14