Access serial devices directly from the browser

submited by
Style Pass
2020-06-22 07:36:41

Some days ago, Gustavo Tamanaka ( told me about the new Web Serial API , which is experimental in Google Chrome, but something we have been waiting for a long time. Basically, it allows a JavaScript application running on the browser to directly access the Serial / USB-Serial port without any extension or additional driver / software. This is something really interesting, because it does not require special hardware or UID as WebUSB requires. I tested it with several devices, and all worked smoothly: ESP8266, ESP32, Arduino Uno, Arduino Mega and some USB-Serial converter modules based on CH341, CP210x and PL3332 / FT32.

After that, I thought that a really useful simple tool would be an online Serial Terminal, such as miniterm, minicom, PuTTY, TeraTerm or other desktop serial terminal application, but online! And after some coding, it works. You can simply access one of the URLs below and access your serial port! 🙂

I took me some time to figure this, but note that due to security concerns, it will only work if served from a HTTPS server or locally from the filesystem. If the content is served from HTTP, the serial object will not be available and the button will be disabled.

Leave a Comment