Live data from Hacker News

Show HN: Flash your ESP32 from the browser using JavaScript

github.com

21–29 of 29 posts

Re: Show HN: Flash your ESP32 from the browser using JavaScript

#21
post #7

Want to know when Firefox will support Web Serial API, but turn out they won't since they consider it harmful: https://mozilla.github.io/standards-positions/#webserial

They're going to have to implement this sooner or later if they want to remain relevant. More and more happens in the browser, regardless of whether they like it or not.

Yes, as a FF user it’s becoming more and more clear that FF is falling behind on implementing new APIs. It’s frustrating having to keep Chrome around to load certain web apps.

I ran into this specific API following the great blues wireless tutorial (cell connectivity cards and dev cards with ESP32 support) which only works in Chrome https://dev.blues.io/get-started/quickstart/notecarrier-af/

Re: Show HN: Flash your ESP32 from the browser using JavaScript

#22
post #14
post #7

Want to know when Firefox will support Web Serial API, but turn out they won't since they consider it harmful: https://mozilla.github.io/standards-positions/#webserial

And isn't the submission a prime example (of how it could be misused)? Consider: > Show HN: Trick people into flashing their ESP32s with your firmware by visiting your web page

Chrome does let you know what it's doing: https://icircuit.net/wp-content/uploads/2020/08/image-6.png

You can try a demo here: https://unjavascripter-web-serial-example.glitch.me/

Re: Show HN: Flash your ESP32 from the browser using JavaScript

#23
post #16

Earlier quoted context omitted.

One of the big benefits of web apps, is that they are truly portable. I can run my app on any machine with a relatively up-to-date web browser. Like it or not, this is leading to more and more serious work being done in the browser. Aren't APIs like this almost inevitable?

I really, honestly hope that this by some miracle will not happen. The "modern web" is the most bloated, slow and inefficient mess imaginable. Not knocking the browsers themselves, those are marvels of engineering, but yeah.

I will give you three reasons why it will happen:

- ChromeOS

- Project Fugu

- Microsoft collaboration regarding Chrome and PWA adoption

Re: Show HN: Flash your ESP32 from the browser using JavaScript

#24
post #2

Hi HN Here to show a little library that makes it easier to write custom JavaScript code that flashes ESP32s. The library uses the new WebSerial API available in Edge and Chrome browsers.

> available in Edge and Chrome browsers Edge having better support for new features than firefox.. Truly a brave new world

and its chromium

Re: Show HN: Flash your ESP32 from the browser using JavaScript

#26
post #7

Want to know when Firefox will support Web Serial API, but turn out they won't since they consider it harmful: https://mozilla.github.io/standards-positions/#webserial

This seems like the perfect thing to implement as a browser addon. If you think you need it, install it. Otherwise, the code doesn't touch your install.

Much like the container tabs extension, in terms of requiring an addon for certain functionality. Or, if mozilla doesn't do it themselves, a (horrifying though warning) third-party-extension with an external helper application to connect to the serial device, and a API polyfill injected into every page.

Re: Show HN: Flash your ESP32 from the browser using JavaScript

#27

Who thought that an API to connect to serial devices from browsers was a good idea? It seems kind of dangerous to me.

I would say the same thing for using a webcam in the browser or accessing the filesystem. But yet everyone use it today and a world without it is unimaginable.

Wrapping functionality with the right security is key, but I browsers in general is already doing a good job in that regard IMO.

Re: Show HN: Flash your ESP32 from the browser using JavaScript

#28

https://github.com/esphome/esp-web-tools

Thanks for sharing, didn't know this implementation. Seems like they use a fork of https://github.com/adafruit/Adafruit_WebSerial_ESPTool/ which was the first implementation of this as far as I know.

Re: Show HN: Flash your ESP32 from the browser using JavaScript

#29
post #27

Who thought that an API to connect to serial devices from browsers was a good idea? It seems kind of dangerous to me.

I would say the same thing for using a webcam in the browser or accessing the filesystem. But yet everyone use it today and a world without it is unimaginable. Wrapping functionality with the right security is key, but I browsers in general is already doing a good job in that regard IMO.

Yes, but I really don't see the usecase for letting something potentially remote and untrusted to a serial device. How many people do actually need that? (Limited) filesystem access for web applications is also kind of dubious, outside of the trusty upload form.
Post reply on HN