Page 1 of 1

Flash multiples ESP32 at the same time

Posted: Mon Nov 23, 2020 2:40 pm
by matheusmbg
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

Re: Flash multiples ESP32 at the same time

Posted: Tue Nov 24, 2020 1:45 am
by ESP_Sprite
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.

Re: Flash multiples ESP32 at the same time

Posted: Sat May 14, 2022 10:29 pm
by zyghom
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.

Re: Flash multiples ESP32 at the same time

Posted: Sun May 15, 2022 5:10 am
by dmitrij999
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