Reviving old scanners with an in-browser Linux VM bridged to WebUSB over USB/IP

TL;DR

A new web application allows users to operate old USB scanners directly in their browsers by emulating a Linux environment with an in-browser VM and bridging to WebUSB via USB/IP. This development could extend scanner lifespan and improve accessibility for vintage hardware.

A developer has created a web application that allows users to operate vintage USB scanners directly within a browser by running an emulated Linux environment and bridging it to WebUSB over USB/IP, potentially reviving decades-old hardware without native drivers.

The project leverages v86, an x86 CPU emulator that runs entirely in the browser via WebAssembly, to emulate a Linux system with SANE (Scanner Access Now Easy) installed. This setup enables scanning functionality through a custom C program that interfaces with the scanner hardware, providing JSON configuration data and streaming scan images.

To connect the scanner to the browser, the app uses USB/IP, a protocol that packages USB data into TCP packets for transmission over the network. On the JavaScript side, a module called tcpip.js, compiled from lwIP to WebAssembly, reassembles Ethernet frames into TCP/IP traffic. This traffic is then bridged to the host computer’s USB interface via the browser’s WebUSB API, allowing the scanner to communicate as if connected directly over USB.

The developer has tested the app with a Canon CanoScan LiDE 100, claiming compatibility with hundreds of other scanner models from brands including Epson, HP, Microtek, and Ricoh. The project remains in early stages, with the code not yet fully open-sourced, but the core concept demonstrates a novel approach to hardware reuse.

Why It Matters

This development could significantly extend the usable lifespan of legacy scanners, reducing electronic waste and providing access to vintage hardware that no longer has driver support. It also demonstrates innovative browser-based virtualization and hardware bridging techniques, which could influence future web-based device management and repair solutions.

For users and institutions with old scanners, this could mean a cost-effective way to maintain scanning capabilities without hardware upgrades or reliance on outdated operating systems.

CZUR Shine Ultra Smart Portable Document Scanner, Thin Book Scanner with OCR, USB Document Camera for Desktop/Laptop, Capture Size A3, Compatible with Windows & Mac OS (Not for Android & iOS)

CZUR Shine Ultra Smart Portable Document Scanner, Thin Book Scanner with OCR, USB Document Camera for Desktop/Laptop, Capture Size A3, Compatible with Windows & Mac OS (Not for Android & iOS)

Design and Speed: Work with Windows XP/7/8/10/11 AND macOS 10.13 or later. Not compatible with Android and iOS….

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Reviving old peripherals through emulation and network bridging has been a challenge, often requiring complex setups or legacy OS environments. Prior solutions involved running full virtual machines or using specialized hardware adapters. This project simplifies the process by integrating an emulated Linux system directly into the browser, leveraging WebAssembly for performance, and bridging to the host’s USB interface via WebUSB.

The approach builds on existing technologies like v86 and USB/IP, but applies them in a novel way to connect vintage hardware to modern browsers. The developer, George MacKerron, previously worked on a similar project for printers, which inspired this scanner-focused extension.

“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.”

— George MacKerron

“The app has only been tested on my CanoScan LiDE 100, but it should work for hundreds of other models.”

— George MacKerron

Amazon

in-browser Linux VM for hardware emulation

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It is not yet clear how well the app will perform across all scanner models or in different browser environments. The code is not fully open-sourced, and the project is still in early development, so widespread adoption and stability remain to be seen.

AV Access USB Over Ethernet Extender Kit, USB 2.0 480Mbps, 4-Port Hub, USB Over CAT5e/CAT6/CAT7 Up to 60m/196ft for Webcam, KVM, Printer, PC, Plug & Play, No Driver, Compatible with Mac Windows Linux

AV Access USB Over Ethernet Extender Kit, USB 2.0 480Mbps, 4-Port Hub, USB Over CAT5e/CAT6/CAT7 Up to 60m/196ft for Webcam, KVM, Printer, PC, Plug & Play, No Driver, Compatible with Mac Windows Linux

【Extend USB Up to 60m Over Ethernet】Transmit USB 2.0 signals over CAT5e/CAT6/CAT7 cable up to 60m (196ft), ideal…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

The developer plans to expand testing to other scanner models, improve compatibility, and consider open-sourcing the project. Future updates may include user feedback integration and performance optimizations, with broader beta testing expected in the coming months.

Yekoaru 4 PCS Car Airbag Detection Simulator, SRS Airbag Simulator Tester, 2-Pin Airbag Diagnostic Scanner Fault Finding Repair Tool, Universal for Car Truck SUV Pickup (Black)

Yekoaru 4 PCS Car Airbag Detection Simulator, SRS Airbag Simulator Tester, 2-Pin Airbag Diagnostic Scanner Fault Finding Repair Tool, Universal for Car Truck SUV Pickup (Black)

2-Pin SRS Airbag Diagnostic: These black airbag detection simulators feature 2-pin connection, serving as practical airbag bypass resistor…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

Can this web app work with any old USB scanner?

It has been tested with a Canon CanoScan LiDE 100 and is expected to work with hundreds of other models, including those from Epson, HP, and Ricoh. Compatibility is still being evaluated.

Does this require any special hardware or software?

No, all processing occurs within the browser. The setup uses a Linux VM emulated in WebAssembly, and the connection to the scanner is bridged via WebUSB and USB/IP protocols.

Is the code available for public use?

Currently, the core code has not been fully open-sourced. The developer has indicated plans to do so in the future but has not provided a timeline.

Will this solution work on all browsers?

The project relies on WebAssembly, WebUSB, and WebSockets, which are supported by most modern browsers. Compatibility may vary, and testing across different browsers is ongoing.

Source: Hacker News

You May Also Like

The Promise of Nuclear Fusion: Are We Any Closer?

Keen advancements suggest progress in nuclear fusion, but crucial challenges remain before we can fully realize its potential.

Guerrilla Games co-founder developing European game engine to rival Unreal and Unity

Arjan Brussee, Guerrilla Games co-founder, is creating a new European game engine aimed at rivaling Unreal and Unity, emphasizing European control and AI integration.

Samsung 990 Pro gets discount of over $200 from recent highs — grab the 2TB model for $429.99

The Samsung 990 Pro 2TB SSD now available for $429.99, over $200 less than its recent peak price, offering a significant saving for PC enthusiasts.

How Agentic AI Differs From Traditional Automation

Perhaps the most significant difference lies in their decision-making abilities, which could reshape the future of automation—discover how agentic AI stands apart.