• XLE@piefed.social
    link
    fedilink
    English
    arrow-up
    13
    ·
    1 day ago

    This has been a serious pain point for people who have wanted to use web apps to flash many things, including keyboards and phones. Nice to see Mozilla is finally observing the competition on something that’s not AI.

    • 5in1K@lemmy.zip
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 day ago

      I only have Chrome to flash my Flipper Zero, ESP32’s and my Mestastic stuff. Being able to use Firefox would be nice.

  • cmnybo@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    22
    ·
    2 days ago

    It’s about time. I hate having to use another browser so I can use a few web apps that need to connect to serial devices.

      • dan@upvote.au
        link
        fedilink
        arrow-up
        14
        arrow-down
        1
        ·
        2 days ago

        Why install a native app when a website can do it? It’s very common to use a website to flash ESPHome for example.

        • thingsiplay@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          2 days ago

          Well you have more control over it and not dependent on the server. Also it should be more private I guess. I’m not judging, just asking if there was no native app that you felt forced to use a worse browser.

          • dan@upvote.au
            link
            fedilink
            arrow-up
            8
            arrow-down
            1
            ·
            edit-2
            2 days ago

            not dependent on the server

            It doesn’t have to be - a developer could also provide a HTML file that the user can download and open locally.

            And to be honest, if someone had to build a user-friendly cross-platform GUI app for connecting to some sort of serial device, they’d probably just end up using web technologies (Electron or Tauri) anyways. May as well avoid the extra overhead of Electron.

            • thingsiplay@lemmy.ml
              link
              fedilink
              arrow-up
              1
              ·
              2 days ago

              I encountered such programs in the past. It’s basically simple HTML with JavaScript, to run with my “favorite” browser and not being packaged as an Electron app. But that is very rare. Still better than dependent on the server, which solves a huge issue (which was my point). But the other point isn’t solved, if the person is “forced” to use a browser he or she does not like.

      • cmnybo@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 days ago

        Not for what I need. Some of them have an electron program, but that’s just chrome bundled with a web app.

  • Midnitte@beehaw.org
    link
    fedilink
    English
    arrow-up
    10
    ·
    2 days ago

    Great news for ESPhome - it is such a hassle to try and use the cli (especially on windows) as opposed to just using the interface in home assistant

    • dan@upvote.au
      link
      fedilink
      arrow-up
      15
      ·
      2 days ago

      IMO it’s fine since you need to explicitly grant permission for the site to use it, and also explicitly choose a device to allow it to communicate with. You can also configure your browser to always reject requests to use the API, if you never want to use it.

      WebSerial is useful for the developer as they can build their webapp once and it’ll work consistently across platforms, and it’s useful for the user since the same interface will work across all OSes.

      I prefer it over the other common approach for communicating with serial devices, which is often to only make a Windows app and to have some convoluted setup process involving sketchy-looking drivers, which then breaks when you have different devices that require different versions of the flashing software or drivers.

        • dan@upvote.au
          link
          fedilink
          arrow-up
          7
          ·
          2 days ago

          Chrome’s had it for five years, and I don’t recall any Webserial-specific vulnerabilities in it (but I could be wrong!)

          • ☂️-@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            2 days ago

            i’d bet on webusb being compromised first, when/if that takes off for more mundane tasks.

      • SkaveRat@discuss.tchncs.de
        link
        fedilink
        arrow-up
        18
        ·
        2 days ago

        as someone who did an ESP based project for end users, this is really useful to let users flash new stuff on their device without needing some convoluted toolchain on your computer

        it was really really useful to tell people “go to xyz and select the option you want, follow the on screen instructions and you’re done. sorry, chrome only”

      • nibbler@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        7
        ·
        2 days ago

        Just last week my mobile died. I was able to get a new one and flash GrapheneOS while traveling, using my partners phone. That was totally awesome.

      • thingsiplay@lemmy.ml
        link
        fedilink
        arrow-up
        1
        arrow-down
        2
        ·
        2 days ago

        Since they are adding Ai to the browser, it seems the quality and security standards are reduced.

  • brianpeiris@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 day ago

    This is a bit of speculation on my part, but I think the recent leadership changes, especially Eric Rescorla (ekr) leaving as Mozilla CTO probably lead to this. I think ekr was responsible for many of the security vetoes that held APIs like this back. Maybe they had good reason for it at the time, but Chrome has now demonstrated that Web Serial has been safe for years.

    So although I appreciate Firefox has always been security conscious, I think they sometimes landed a little too strict on some decisions. I’d be happy if this attitude change allows some more innovation in Firefox that is not just “AI all the things”.

    • dan@upvote.au
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      2 days ago

      You can completely disable the API in Chrome… I assume Firefox will allow this too.

      • CandleTiger@programming.dev
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        1 day ago

        All my serial devices need careful handling and will happily destroy themselves or start a fire if given the wrong instructions — my 3D printer, my laser engraver, my inverter/solar/battery monitor-programmer.

        None of them are remotely prepared or hardened in any way to protect from malicious or careless commands.

        I don’t generally trust websites and I do not want any website to discover those devices and interact with them.

        • brianpeiris@lemmy.ca
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 day ago

          Maybe it will depend on the specifics of their UI/UX implementation, but I don’t think you’ll end up in a scenario where you’re surprised that a website suddenly has access to your serial ports. I expect the UI will be fail-safe, very visible, and that you’ll be able to disable it entirely if you wish, so that you never even see a prompt.