42 votes

Announcing web serial support in Firefox 151

18 comments

  1. skybrian
    Link
    From the article: [...] [...]

    From the article:

    Firefox can now connect directly to microcontrollers, development boards, 3D printers, power meters, and other serial-connected hardware from the web. Starting in Firefox 151 for Desktop, support for the Web Serial API allows web applications to communicate with compatible devices without requiring native software.

    [...]

    Ports are allowed on a per-site and per-port basis. The Web Serial API requires websites to call navigator.serial.requestPort(), which lets the user choose which port to allow access to, or disallow all access entirely. This means websites do not receive a list of connected devices and there is no useful fingerprinting information outside of the port the user selects.

    [...]

    While Web Serial still resides in the Web Incubator Community Group (WICG), we’re optimistic there’s a path to standardization given its scope and long-running incubation. We are pursuing standardizing the Web Serial API in the WHATWG in a new Workstream proposal and are excited to work with ecosystem partners and standards bodies to help shape access to peripherals on the web.

    12 votes
  2. [13]
    JCPhoenix
    Link
    Is this the same thing that allows devices like Keychron keyboards to be configured from a webpage? I can do it from Chrome and Edge, but I can't do it from Firefox

    Is this the same thing that allows devices like Keychron keyboards to be configured from a webpage? I can do it from Chrome and Edge, but I can't do it from Firefox

    12 votes
    1. [7]
      Arbybear
      Link Parent
      No, that is WebUSB. Firefox refuses to support it because of security/privacy reasons.

      No, that is WebUSB. Firefox refuses to support it because of security/privacy reasons.

      23 votes
      1. [6]
        Jedi
        Link Parent
        Firefox refuses to support a lot of things, I lose track of all the features that don't or still have not been implemented in Firefox that have been available for several years in most other major...

        Firefox refuses to support a lot of things, I lose track of all the features that don't or still have not been implemented in Firefox that have been available for several years in most other major browsers.

        4 votes
        1. [5]
          Akir
          Link Parent
          Most other major browsers are essentially reskinned Chrome. Google is constantly spearheading APIs that are unpopular with browser vendors and basically uses their power and influence to force...

          Most other major browsers are essentially reskinned Chrome. Google is constantly spearheading APIs that are unpopular with browser vendors and basically uses their power and influence to force them to be standards. Many of these APIs are not implemented by Firefox because they break through the sandbox and make the browser less secure.

          48 votes
          1. skybrian
            Link Parent
            And yet, some of these API ‘s are very useful for the small number of websites that need them, like the Web Serial API. The situation reminds me of how the Go language didn’t have generics for...

            And yet, some of these API ‘s are very useful for the small number of websites that need them, like the Web Serial API.

            The situation reminds me of how the Go language didn’t have generics for many years and there were apologists saying they’re unnecessary, and then after they implemented them, apparently they’re not so bad after all.

            I think you have to look at it case by case, rather than assuming Firefox is probably right.

            7 votes
          2. [3]
            fxgn
            Link Parent
            The Chromium sandbox is much more secure than the Gecko/FF one

            Many of these APIs are not implemented by Firefox because they break through the sandbox and make the browser less secure

            The Chromium sandbox is much more secure than the Gecko/FF one

            2 votes
    2. Wes
      Link Parent
      It's possible, though it likely use WebUSB instead, a related API. One would have to look into which specific approach their app is using. Firefox have historically taken a negative stance on...

      It's possible, though it likely use WebUSB instead, a related API. One would have to look into which specific approach their app is using.

      Firefox have historically taken a negative stance on supporting WebUSB (standards positions, discussion), so future support is less likely there. Though it's possible they're reconsidering their stance on hardware interaction now, in light of this release.

      There is also an addon that provides WebUSB support, though it requires a little more setup than usual.

      7 votes
    3. skybrian
      Link Parent
      I don't know; it depends on whether it uses WebUSB or Web Serial. Web Serial is one kind of connection that typically uses a USB cable, but there are other kinds of device connections.

      I don't know; it depends on whether it uses WebUSB or Web Serial.

      Web Serial is one kind of connection that typically uses a USB cable, but there are other kinds of device connections.

      3 votes
    4. AevumDecessus
      Link Parent
      Related and possibly also supported now, not sure 100%

      Related and possibly also supported now, not sure 100%

      2 votes
    5. Narry
      Link Parent
      This is the thing I care about most myself. I have to keep Vivaldi installed for when I want to tweak my Keychron.

      This is the thing I care about most myself. I have to keep Vivaldi installed for when I want to tweak my Keychron.

      2 votes
    6. tanglisha
      Link Parent
      I’ve noticed that oryx works in chrome, but not Firefox or chromium.

      I’ve noticed that oryx works in chrome, but not Firefox or chromium.

      1 vote
  3. [2]
    MeckiSpaghetti
    Link
    It feels like we're rebuilding the operating system within the browser.

    It feels like we're rebuilding the operating system within the browser.

    7 votes
    1. Rocket_Man
      Link Parent
      That is what we're doing, turns out the technologies are standard enough and flexible enough to work on almost every platform. There are obvious downsides to that right now, but I don't think any...

      That is what we're doing, turns out the technologies are standard enough and flexible enough to work on almost every platform. There are obvious downsides to that right now, but I don't think any of it is insurmountable.

      2 votes
  4. 3WolfMoon
    (edited )
    Link
    Seems like they didn't add a permissions section for this in about:preferences like they do with most similar features. Hopefully one is coming in the future. If you want to disable it entirely...

    Seems like they didn't add a permissions section for this in about:preferences like they do with most similar features. Hopefully one is coming in the future. If you want to disable it entirely for now it looks like you'll have to go to about:config and change dom.webserial.enabled to false

    3 votes
  5. text_garden
    Link
    On one hand I think this is neat. On the other hand I'm already concerned with the absolutely massive attack surface of a modern web browser. An interesting workaround if you're implementing an...

    On one hand I think this is neat. On the other hand I'm already concerned with the absolutely massive attack surface of a modern web browser.

    An interesting workaround if you're implementing an USB gizmo and already have a use case for widely supported serial transfer to/from the browser is to implement the USB MIDI device class and use SysEx messages. That's already supported by the Web MIDI API, as far as I know in all major browsers.

    3 votes