Concept of WiFi flasher and bootloader?

Deouss
Posts: 270
Joined: Tue Mar 20, 2018 11:36 am

Concept of WiFi flasher and bootloader?

Postby Deouss » Sat Aug 04, 2018 11:48 am

How about making a tool that flashes ESP through WiFi?
It would be
1) much much faster
2) no botstrapping pins
3) no wires

:)

User avatar
martinayotte
Posts: 111
Joined: Fri Nov 13, 2015 4:27 pm

Re: Concept of WiFi flasher and bootloader?

Postby martinayotte » Sat Aug 04, 2018 2:38 pm

That's not what OTA provides ? ... :ugeek:

Deouss
Posts: 270
Joined: Tue Mar 20, 2018 11:36 am

Re: Concept of WiFi flasher and bootloader?

Postby Deouss » Sat Aug 04, 2018 2:51 pm

How does it work? Do you have to modify booting process?
I am talking about flashing chip with options wifi or serial without any extra steps straight from console

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

Re: Concept of WiFi flasher and bootloader?

Postby kolban » Sat Aug 04, 2018 3:26 pm

Howdy Mr Deouss,
I think Mr Martinayotte is correct when he says that the solution is architected and is baked into OTA. The high level of OTA is that it doesn't concern itself with how a new app arrives at the ESP32. You build ingestion logic which could be Sockets, MQTT, UDP, REST calls, BLE or any other means you choose. As the data arrives of the new app, you would use OTA APIs to cause that data to be written to flash. When the ingestion is complete, you then flag the new app as the next app to run at boot and then reboot.

This is pretty common practice for a production application where "customers" may have no access to serial ports and PCs and the complexity of flashing via serial. I get a sense that you may be talking about flashing over the the network during development. I'm personally of a mixed opinion on that notion. It would mean that my ESP32 has to boot, connect to WiFi and become an active listener for new incoming client connections pushing a new app. I would then still have to run a client app to push the new logic. While I could configure an OTA listener in all my development apps, I would then still have to sometimes use serial on occasion. For example, if while developing my app, it crashes it is likely I wouldn't have WiFi access available to re-publish my new version after correcting a problem. In that case I would have to drop back to serial.

On my Wrover DevKit I am having 100% stability with 2Mbps transfer of new code. This has brought the latency as low as I need. I also found that one could (if needed) separate out the ESP32 libraries from the app code and flash them separately. I simple terms, if my app is 1.5MBytes ... I can flash twice ... once for 1.2MBytes of ESP-IDF and then subsequent flashes of 300K for just the replacement user code logic which is extremely fast.

Here is a link to the OTA stories:

http://esp-idf.readthedocs.io/en/latest ... m/ota.html
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Available for ESP32 consulting.

Deouss
Posts: 270
Joined: Tue Mar 20, 2018 11:36 am

Re: Concept of WiFi flasher and bootloader?

Postby Deouss » Sat Aug 04, 2018 8:52 pm

Hey Mr kolban - yes that's basically what I had in mind - all during development.
It is complex but possible but I guess serial is ok for now. esptool somehow does not allow me to go beyond 0.5Mbps

Who is online

Users browsing this forum: No registered users and 4 guests