Dev

Firefox 151 Supports Web Serial API, Enabling Direct Control of Microcontrollers and 3D Printers from the Browser

With Firefox 151, the Web Serial API is now supported, allowing direct control of microcontrollers, 3D printers, and other serial devices from the browser. Mozilla has also collaborated with Adafruit for testing.

4 min read Reviewed & edited by the SINGULISM Editorial Team

Firefox 151 Supports Web Serial API, Enabling Direct Control of Microcontrollers and 3D Printers from the Browser
Photo by Growtika on Unsplash

The desktop version of Firefox has finally added support for the Web Serial API. Mozilla announced that Firefox 151 for Desktop now supports the Web Serial API, enabling web applications to directly communicate with hardware connected via serial ports without the need for native software.

Significance for Hobbyists and Makers This new functionality makes Firefox a more practical browser for individuals involved in hardware projects. Hobbyists, hardware hackers, educators, makers, and developers can use the Web Serial API for a variety of use cases, ranging from home automation to hardware prototyping and 3D printing. One particularly noteworthy aspect is Mozilla’s collaboration with Adafruit, a leading organization in open-source hardware and STEM education. Mozilla worked with Adafruit to test Firefox’s implementation with hardware workflows commonly used in the Adafruit community.

Demo Projects by Mozilla Engineers Mozilla engineer Alex Franchuk has created interesting projects combining Web Serial with electronics. One such demo, called “Page Playground,” merges electronics and web editing into a functional and entertaining device. While many tools already exist for running custom code on small, inexpensive microcontroller boards, Web Serial makes it easier than ever to connect these devices to a computer and interact with them through a web-based user interface.

Context of Feature Gaps Among Browsers The Web Serial API has been supported by Chromium-based browsers (such as Google Chrome and Microsoft Edge) for some time, but it had long been absent from Firefox. With its introduction in Firefox 151, users can now engage in hardware development without relying solely on Chromium-based browsers. This move by Mozilla demonstrates its commitment to addressing the diverse needs of the developer community. As web technologies become increasingly important in hardware development and IoT, greater API compatibility across major browsers is essential for the health of the web platform. As of Firefox 151, desktop users can now connect to and interact with hardware such as microcontrollers and 3D printers directly through Web Serial-enabled web applications. For more technical details, refer to the Mozilla Developer Network (MDN) documentation. --- Frequently Asked Questions Q: Can the Web Serial API be used on the mobile version of Firefox? A: This announcement is limited to Firefox 151 for Desktop. There is no mention of support for the mobile version of Firefox, so at present, it is only available in desktop environments. Q: What devices are compatible with the Web Serial API? A: Compatible devices include ESP32-based boards from Espressif, the Raspberry Pi Pico, 3D printers, LEGO devices, and a wide range of other equipment that supports serial communication via USB or Bluetooth. Adafruit’s CircuitPython-compatible devices are also included. Q: Will existing Web Serial applications for Chrome or Edge work on Firefox? A: Since the Web Serial API is a standardized web API, applications developed in compliance with the specification are likely to work in Firefox as well. However, minor implementation differences between browsers may require testing on an application-by-application basis.

Source: Lobsters

Comments

← Back to Home