Ah dang. Loaded wrong firmware

So, didn’t have enough caffeine in me this morning and was updating the ESP32 wifi in my OpenEVSE chargers. Loaded the gateway firmware instead of the wifi one. So… Let’s just say while they still, sorta, do wifi it’s totally messed up. I just ordered this

to flash the correct one since while I can put it in standalone, it won’t load the firmware via the web interface. Just want to ensure I’m on the right path here.


I use this one as it can also program the EVSE controller. and has the correct cable to do this :slight_smile:

Pololu USB AVR Programmer v2.1: AmazonSmile: Computers & Accessories


Programmer arrived. Able to activate the esptool program and while it sees the programmer and the serial port. It’s unable to connect to the Huzzah ESP32. I tried the GPIO and Reset button pushing as the instructions say to do and still nothing. It’s like the ESP32 is not waking up or even there. I am keeping it connected for power to the OpenEVSE and powering it on, but still nothing.

Ok, so what is the secret for flashing the firmware onto these boards? I’ve verified my programmer TX and RX is working as expected. I have a reliable power supply so I can put these esp32 wifi boards onto my bench to do this. Board is powered up, I push the GPIO and Reset buttons to put it into download mode. But It never connects. I keep timing out.

esptool --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x10000 openevse_huzzah32.bin 
esptool.py v2.8
Serial port /dev/ttyUSB0

A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0x20)

Well, got replacement Huzzah32 replacements from Adafruit being what is used is the same thing. Those loaded the firmware no issue and the units are back up. Warning to all, if you load the wrong firmware you run the risk of not being able to flash the correct it would appear. That or these things are just touchy on accepting a flash via the pins.

This is an ISP programmer, this is the correct programmer to upload code to the EVSE controller, however it will not work to upload code to the WiFi module. To upload to the ESP WiFi module you need a USB to serial UART programmer e.g Programmer - USB to serial UART - Shop | OpenEnergyMonitor

This once should work fine.

That’s strange, there should be nothing stopping you uploading to the original ESP32 WiFi module. Glad your up and running.


Not used that programmer for the wifi side but thought the programmer had a TTL side as well on a different com port.


Apologies, my mistake it looks like you’re right. I’ve not seen a combined ISP AVR and UART serial programmer before, that’s pretty cool!

1 Like