Update AT Firmware on ESP32

The instructions to update firmware on the ESP32 boards is ether cryptic or non-existent. After spending hours reading everything I could find I was successful in updating my new Pico D4 evaluation kit board. Below are the steps I used.

  1. Down the firmware here . The latest firmware as of this writing is ESP32 AT Bin V1.1.3 .
  2. Navigate to where you extracted the zip file an find the download.config file. The file contains this text.

–flash_mode dio –flash_freq 40m –flash_size detect 0x1000 bootloader/bootloader.bin 0x20000 at_customize.bin 0x21000 customized_partitions/ble_data.bin 0x24000 customized_partitions/server_cert.bin 0x26000 customized_partitions/server_key.bin 0x28000 customized_partitions/server_ca.bin 0x2a000 customized_partitions/client_cert.bin 0x2c000 customized_partitions/client_key.bin 0x2e000 customized_partitions/client_ca.bin 0x30000 customized_partitions/factory_param.bin 0xf000 phy_init_data.bin 0x100000 esp-at.bin 0x8000 partitions_at.bin

4. We will need to make some changes to flash the Pico. The factory_Param.bin file will need be be exchanged with the Pico partition (factory_param_PICO-D4.bin) to make the firmware compatable with the Pico that uses pins 19 an 22 to receive and transmit AT commands . The Wroom 32 uses 16 and 17. Select the partition that is compatible with your board.

5. Below is the text that will be saved as “at.bat” in the firmware directory.

esptool.py –chip esp32 –port COM4 –baud 921600 –before default_reset –after hard_reset write_flash -z –flash_mode dio –flash_freq 40m –flash_size detect 0x1000 bootloader/bootloader.bin 0x20000 at_customize.bin 0x21000 customized_partitions/ble_data.bin 0x24000 customized_partitions/server_cert.bin 0x26000 customized_partitions/server_key.bin 0x28000 customized_partitions/server_ca.bin 0x2a000 customized_partitions/client_cert.bin 0x2c000 customized_partitions/client_key.bin 0x2e000 customized_partitions/client_ca.bin 0x30000 customized_partitions/factory_param_PICO-D4.bin 0xf000 phy_init_data.bin 0x100000 esp-at.bin 0x8000 partitions_at.bin

Note: The batch file uses the esptool.py script to flash the Pico. You will need to install Python and have the esptool.py in your path. This is done when installing the ESP32 idf or nanoFramework ESP Tools. You will also need to change the –port to the com port your device is connected to.

6. From a command prompt navigate to the directory containing the “at.bat” connect your board and click on the “at.bat” file. Your board will be flashed with the firmware.

7. For more information get the AT instruction set.

Advertisements