WebSerial was just introduced in Firefox 151. It was already available for 5 years in Chromium based browser. It's so new in Firefox that even caniuse is not up-to-date: https://caniuse.com/web-serial.
Im sure its also negative for WebBLE but we are hoping that one day we can have it on Firefox too.. We use WebBLE for talking and programming NRF52 chips and it works great compared to plugging a wire every time.
Ah okay, thanks. My company makes web based diagnostic tools for automotive. At the moment we are Chrome-only because the CAN bus dongle doesn’t support serial.
If the standards committee backpedaled on WebUSB it would literally destroy my company.
It would not be quite as seamless as having serial support included out of the box in the browser, but couldn't you get most of the way there by writing a native application that provides provides a network interface to the serial ports and then a JavaScript library for use in the browser than talks to that application over the network (maybe even making the JavaScript library API match the Web Serial API so code written for Chromium's actual Web Serial requires little of no porting)?
The native apps for Linux, Windows, and MacOS would be pretty simple, and would be independent of browser vendor or version.
This might even allow some flexibility that serial implemented in the browser doesn't have, such as allowing control of serial ports on a different host.
I'd have expected that when people saw that Web Serial in Chromium opened up some great possibilities for things like browser based Arduino development but other browser makers were not on board someone would had thoughts similar to what I've described.
Does this exist and I just missed it? Is there some major difficulty I've overlooked?
1. I go to your site
2. I download your service for my platform (that now has to be developed and shipped for N platforms your site wants to support
3. I install said service and make sure it's running
4. I go back to site and it's connected (or it's not and now you have to support a whole host of troubleshooting docs based on platform.
Web serial version that's now in Firefox and has been in chromium:
1. I go to your site. It works
What you described is something that has been done for awhile. Most recent thing I've used I can think of is Lenovos Driver install utility (you install their connector app, go to their support page, it connects to your app and then shows what drivers you need)
You could do that, but then either you're asking users to install a native app, which isn't very "webby," or you're shipping something with Firefox that isn't based on web standards*, which absolutely isn't webby.
*Unless you're thinking of something I'm not, the API couldn't exactly match the Web Serial API because of same-origin policy, and if you made an exception to that policy to make the polyfill work, you'd punch a giant security hole in the browser.
interestingly, MDN web docs claims at the top of the Web Serial page (https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_...) that Chrome does not support it, even though the support table at the bottom shows that it supports all of the features (Firefox doesn't) and has for longer than Firefox
That's because Chrome on Android has a partial implementation of Web Serial. The banner on top is to get information at a glance vs the detailed breakdown of the compatibility table.