5 ms·
Show HN: Flash your ESP32 from the browser using JavaScript
- jstroem 5y agoHi 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.
- retox 5y agoNot to belittle your project, I'm all for hackers hacking on interesting projects, but I really am confused why such an API exists within the browser. The MDN page talks about browser connected 3D printers and boards like the ESP32, but boggles my mind that time and energy was expended to enable this.
- zinekeller 5y agoKnowing that Chromebooks exists should give you the rough answer why does this exists.
- retox 5y agoDo Chromebooks only run a browser? I never really looked into them.
- zinekeller 5y agoNo longer (it now also runs Android* and certain Linux applications), but at the time Google proposed Web(MIDI/USB/Bluetooth) ChromeOS was only a browser-based operating system. * Works on their x86 models, but depending on the specific application it's slower due to translation. Android apps runs best on ARM models.
- schwartzworld 5y agoOne 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?
- lpcvoid 5y agoI 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.
- pjmlp 5y agoI will give you three reasons why it will happen: - ChromeOS - Project Fugu - Microsoft collaboration regarding Chrome and PWA adoption
- emilfihlman 5y agoThe value proposition of this is pretty great, actually, and the implementation of it can be rather simple even though the actual interfaces underneath are rather fucked up historically because at it's core it's merely just getting a stream of bytes in/out.
- Shish2k 5y agoChrome is no longer “a browser”, it’s more like the new JVM - the “write once, run anywhere” platform for desktop app deployment
- orangepanda 5y ago> available in Edge and Chrome browsers Edge having better support for new features than firefox.. Truly a brave new world
- zuzkins 5y agoAh, perfect. Was playing with Toit last Friday and it took me some time to successfully flash my device (for some reason could not easily find the instructions). I also shortened and destroyed my ESP32 (while not paying enough attention :D) and more are coming this week, so will give this a try! The whole platform looks really interesting.
- sorz 5y agoWant 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 https://mozilla.github.io/standards-positions/#webserial
- Shish2k 5y agoThis makes sense when you realise Firefox is trying to be a web browser, and Chrome is trying to be an operating system...
- OJFord 5y agoAnd 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
- andylynch 5y agoThinking about libidevice and webusb I’d be curious to try doing this with an iPhone.
- tyingq 5y agoChrome does let you know what it's doing: https://icircuit.net/wp-content/uploads/2020/08/image-6.png https://icircuit.net/wp-content/uploads/2020/08/image-6.png You can try a demo here: https://unjavascripter-web-serial-example.glitch.me/ https://unjavascripter-web-serial-example.glitch.me/
- cinntaile 5y agoThey'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.
- yesimahuman 5y agoYes, 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/ https://dev.blues.io/get-started/quickstart/notecarrier-af/
- bessarabov 5y agohttps://github.com/esphome/esp-web-tools https://github.com/esphome/esp-web-tools
- jstroem 5y agoThanks for sharing, didn't know this implementation. Seems like they use a fork of https://github.com/adafruit/Adafruit_WebSerial_ESPTool/ https://github.com/adafruit/Adafruit_WebSerial_ESPTool/ which was the first implementation of this as far as I know.
- qalmakka 5y agoWho thought that an API to connect to serial devices from browsers was a good idea? It seems kind of dangerous to me.
- jstroem 5y agoI 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.
- qalmakka 5y agoYes, 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.