Flash multiples ESP32 at the same time

matheusmbg
Posts: 10
Joined: Thu Feb 20, 2020 2:44 pm

Flash multiples ESP32 at the same time

Postby matheusmbg » Mon Nov 23, 2020 2:40 pm

Hello guys, how are u? I hope that you're all good :D

I was wondering about producing devices using ESP32 in a large scale. Is it possible to flash multiples ESP32 at the same time? Like, connect a bunch of ESP32 on a unique line of communication with PC and flash the same firmware for all the microcontrollers all at once.

I tought about it because the company that i work for has plans to produce 3000 devices next semester, and i mean, flash 3000 esp32 it will require sometime of my team :lol: , so i'm trying to figure out a better way to do this task ;)


Regards,
Matheus

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

Re: Flash multiples ESP32 at the same time

Postby ESP_Sprite » Tue Nov 24, 2020 1:45 am

There isn't really an error-proof way to hook up multiple ESP32s to one serial line and flash them all, as you can't reliably see if one ESP32 fails to flash. The closest you could get would be to connect a lot of USB-serial converters to a PC and then spin up a bunch of esptool.py instances in parallel, one for each port. You may want to add some scripting around it that e.g. indicates the status of each ESP32 and asks the operator to replace them with a new one as soon as they're done programming.

I know it's possible to order modules/chips pre-flashed with your firmware as well, although I'm not sure what the MOQ for that is... you may want to send off a mail to sales@espressif.com if you're interested in that.

zyghom
Posts: 6
Joined: Tue Oct 19, 2021 11:13 pm

Re: Flash multiples ESP32 at the same time

Postby zyghom » Sat May 14, 2022 10:29 pm

I am making all of my devices being able to do OTA from the web server.
And then, I compile all files, put them on server, and then, send 1 command over MQTT to all devices.
When they wake up (most of them sleep and only wake up to perform measurements and send to home assistant, then they go to sleep again), MQTT command is waiting for them, once message is received each of them, one by one starts upgrade.

The devices that don't sleep, perform upgrade the moment the command is send.

dmitrij999
Posts: 71
Joined: Sat Mar 02, 2019 8:06 pm

Re: Flash multiples ESP32 at the same time

Postby dmitrij999 » Sun May 15, 2022 5:10 am

As well, it's needed to keep some secrets on device, that's why secure boot and flash encryption are needed.
After you prepare your environment for factory files preparation, they are needed to flash on the modules.
For instance, if you don't want contract manufacture to have plain files with secrets, your company can prepare ESP32 modules before send to contract manufacture, and construct the tooling for batch flashing made of existing toolings for ESP32 modules.

You can generate NVS files with secrets with mfg_gen.py script and use the secrets from there

Who is online

Users browsing this forum: Baidu [Spider] and 247 guests