JavaScript Pytool

espytool.jpg

I’ve had a great idea. At least I think I have. I’m going to try to make a JavaScript version of the esptool program that is used to download firmware into the ESP32 and ESP8266. If you’ve ever built and deployed a C program onto these devices you’ve run this program. It is how your program actually gets onto the device. It works really well, but to make it work you have to download it and then figure out how to use it.

I want to make something that you can use from your browser. My dream is to get to a position where you can unwrap a brand new device, plug it into your PC and then browse a website that deploys binary software to the device, configures it and gets it going. I want to make this how you get a Connected Little Box running. It’s possible because of the Web Serial Interface which is now part of the Chrome and Edge browsers. This lets you connect your browser directly to your devices.

On one hand this should be quite easy, in that I can download the Python source of esptool from here and step through the program and see what it does. On the other hand I’ll have to convert the Python into JavaScript and also figure out how the ESP download protocol works. There’s a description here, which is useful.

Whatever happens I’ll learn a ton of stuff and have lots to put into the blog as I go. Which is probably the real of the effort. Wish me luck.