Home

You can finally control serial devices from Firefox

Firefox will soon be able to communicate directly with your 3D printer. Thirteen years after the idea was initially proposed, the Web Serial API has landed in Firefox Nightly, Mozilla's work-in-progress channel for its browser.

Web Serial allows browsers to interact with devices that communicate via serial ports, such as 3D printers, microcontrollers like Arduino and ESP32, and related services like smart home dashboard ESPHome. It can also communicate with devices capable of emulating a serial port over USB or Bluetooth.

Google Chrome has offered Web Serial support since 2021, eight years after initial discussions got underway. The API is also supported on Chromium-based browsers like Edge, Opera, and Vivaldi.

Firefox Nightly 151.0a1 appears to have added Web Serial support around April 13, though there's no official documentation yet. Activating it requires setting the flag via the menu.

Six years ago, Mozilla opposed Web Serial as unsafe.

"We don't believe that user consent is adequate protection for anything that provides this level of capability," wrote Martin Thomson, distinguished engineer at Mozilla, in a GitHub issues discussion back in 2020. 

"Serial access is a relic from an age where a physical connection conferred a great deal of trust. For instance, many devices offer administrative control to anything that connects over this interface without any form of authentication; in my experience, this often extends to privileges that transcend even what a root user can do."

Two years later, not long after a fierce forum fight on the subject, Mozilla was asked to reconsider its position and Firefox CTO Bobby Holley responded positively. 

By 2024, Holley said that Mozilla was "open to shipping WebSerial using the same add-on-gating mechanism as WebMIDI, provided we can come up with sufficiently understandable consent copy."

Mozilla hasn't entirely thrown caution to the wind – it still opposes WebUSB (for various USB devices) and WebHID (for keyboards, mice, video devices). But its wariness shifts risk from the user to the company – if there's sufficient demand to interact with devices through these APIs, lack of support will drive people away from Firefox toward the Chrome ecosystem.

And Mozilla isn't alone in its reticence. Apple's WebKit team opposes Web Serial, WebUSB, and WebHID "due to fingerprinting, security, and other concerns," and cites Mozilla's arguments about privacy and security in defense of its position. 

But in 2026, with people exposing their computers to AI agents and Mozilla exploring AI integration in Firefox, perhaps the worries about Web Serial look less significant in the grand scheme of things. 

The initial commit of Web Serial code in Firefox landed in mid-January and further work can be expected as bugs get ironed out. ®

Source: The register

Previous

Next