WebSerial: Browser Based Development For Your Boards And Electronic Badges

For years, one of the most accessible and simplest-to-implement methods of talking to a dev board has been to give it a serial port. Almost everything has serial in some form, so all that’s needed is to fire up a terminal. But even with that simplicity, there are still moments when the end user might find a terminal interface a little daunting. Think of a board aimed at kids for example, or an event badge which must be accessible to as many people as possible.

We’ve seen a very convenient solution to this problem in the form of WebUSB, but for devices without the appropriate USB hardware there’s WebSerial, an in-browser API for communicating with serial ports including USB-to-serial chips. [Tom Clement] argues that this could serve as the way forward for event badges. Best of all it can be a retro-fit to enable in-browser development for older badges or dev boards with a serial port.

The boards on which he demonstrates the technique are the series of event badges running the badge.team firmware platform including his own i-Pane from CampZone 2019 and going right back to the SHA 2017 badge, but there’s no reason why the same technique can’t be extended to other boards.

There’s a snag with all this though, sadly only browsers in the Chrome family support it at the time of writing, with no plans from Mozilla and apple, and silence from Microsoft. So things look likely to stay that way. It is however inevitable that in time there will be commercial products taking advantage of it via the use of cheap USB to serial chips, so perhaps the case to incorporate it will make itself.

Header: Mobius, Public domain.

9 thoughts on “WebSerial: Browser Based Development For Your Boards And Electronic Badges

  1. Web Serial API in chrome is great. I actually just threw together a serial terminal for my Chromebook this past week that uses it. Less than 150 lines of code including HTML, CSS and Javascript. https://www.serialTerminal.com Source is up on github for a quick example and it works with all the 3d printer and micro controller dev boards I tested it on so far.

    My next project is a minimalist gcode sender . . .

  2. Wait, so Chrome is now a conduit from the cesspool* that is the Internet to any serial device that happens to be connected to your PC?

    * it’s nice in parts and useful in others

    1. Wait, so Chrome is now a conduit from the cesspool that is the Internet to your CPU and to your computer ? OMAGAD we’re all gonna die.

      You need to give the permission before it can access anything.

  3. So web browsers come now with RS232 hardware?

    Thought so :-@

    Sorry, folks: I’m now doing something in a PHP/Javascript rats-n^H^H^H^H^H^H framework wich shall remain unnamed to not kill my karma thoroughly… and am a bit… itchy.

    Yeah, for Google/Chrome it’ll be a Go/WebAssembly framework or what. Had I known into what kind of hell that thing develops, I’d have some professional re-trainign as a shepherd.

Leave a Reply to AndrewCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.