Page 1 of 1

Sample: Node.js application that performs some of the esptool serial protocols

Posted: Tue Apr 10, 2018 3:29 am
by kolban
For a project I am working on, I needed to be able to flash an ESP32 (and more) in the same fashion as can be achieved by esptool. Thankfully, the protocol used by esptool is pretty well documented in the esptool WiKi and with some guidance from the experts, we now have a working sample that performs flashing from a Node.js app. Next steps will include making this a module (for node.js) and creating C/C++ ports. The hard part was working out the protocols. Once done, the easier part is to port to other languages.

An early driver of the code can be found here:

https://github.com/nkolban/esp32-snippe ... ptool_libs

Re: Sample: Node.js application that performs some of the esptool serial protocols

Posted: Tue Apr 10, 2018 3:52 am
by ESP_Sprite
There's not a large chance you weren't aware of it but I'll post int anyway: the ESP8266 has a C-based esptool for it: https://github.com/igrr/esptool-ck . Using this as a base possibly is quicker than re-inventing the wheel entirely (although I have no idea what the code quality of that project is).

Re: Sample: Node.js application that performs some of the esptool serial protocols

Posted: Tue Apr 10, 2018 4:04 am
by kolban
Thank you sir. That was a great post. I wasn't aware of that existing project (or had forgotten about its existence). I wish I had been familiar with it as it might have saved some time and heartache. However, I'm a happy camper at present. The Wiki page here:

https://github.com/espressif/esptool/wi ... l-Protocol

Is pretty darn useful and keeps getting better and richer all the time. Again, thanks for the post and I just wish I had known/thought to look at that repository earlier. Be sure it will be studied now.