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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

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

Postby kolban » Tue Apr 10, 2018 3:29 am

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
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ESP_Sprite
Posts: 9739
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Tue Apr 10, 2018 3:52 am

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).

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

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

Postby kolban » Tue Apr 10, 2018 4:04 am

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: No registered users and 9 guests