ESP32 S2 and ESPhome upload

I bought 5 ESP32 S2 Mini’s like these…

…and had the same problem, not able to flash ready-made bin’s using ESPHome Flasher,
nor from the ESPHome Dashboard and not directly from the browser using https://web.esphome.io.

Turned out ESPTool was the savior.

  1. Installed the latest CP210x driver from here: CP210x USB to UART Bridge VCP Drivers - Silicon Labs (silabs.com)
  2. Downloaded ESPTool for Windows from here Releases · espressif/esptool · GitHub. I used v3.3, the newest version p.t. (4.x) probably works just fine too. Needs no installation. Just unzip it to a folder.
  3. Plugged in the ESP32, a new com port popped up in the device manager under Ports.
  4. Pressed and held the “O” button on the ESP32 then pressed and released the Reset button. Finally I released the “O” button again. I noticed the comport number shown in the Device Manager changed and made a note of the final com-port number.
  5. Opened a Windows Command Prompt window, navigated to the folder where I unpacked ESPTool and ran the following command: esptool -p COM<port number> erase_flash, in my case:
    esptool -p COM7 erase_flash
  6. Did not touch or disconnect anything, opened the ESPHome Dashboard in Home Assistant and clicked “New device” button. Gave it a name, clicked install and selected the COM port number from above (in my case, 7). ESPHome now made its magic and started to flash the ESP32. However, after a while I got an error message from ESPHome. I simply tried one more time, selected the same COM port and this time it was a success. This error on first try happened on all 5, btw, and on all 5 the second try went well.
  7. Pressed the RST button on the ESP32 to take it out of Flash mode, and it came alive in the ESPHome Dashboard.

Not sure if this method works for others, but it worked for me, so at least might be worth a try. I hated the thought of maybe having to throw them away, but now my 5 ESP32 Mini S2s can be put to work and, most importantly, I lost no monetas :slight_smile:

A backup solution might be downloading the .bin file from ESPHome Dashboard and use ESPTool to flash it to the ESP32:

  1. Download a boot_loader for ESP32, i.e. this one: https://github.com/Aircoookie/WLED/releases/download/v0.13.3/esp32_bootloader_v4.bin and put it into the same folder as the ESPTool.
  2. Flash it, then your own .bin file into the ESP32:
1. esptool -p COM<PORT> write_flash 0x0 esp32_bootloader_v4.bin
2. esptool -p COM<PORT> write_flash 0x010000 <bin-filename>.bin
5 Likes