I recently ordered the Indoor Pro Kit and the Outdoor Kit Presoldered (V1.1), and am having issues trying to flash new code to it. It was working fine and reporting to the dashboard with the factory firmware on it.
My indoor pro is working fine heh, esphome is working well on it.
After trying to apply a basic esphome config to the Outdoor it went into a boot loop, and since then I have not been able to flash it again. I’ve tried flashing directly from the browser from the kit page with the default image (The AirGradient Open Air Outdoor Air Quality Monitor (Presoldered-Version, PCB Version 1.1)), and it does the following every time :
- Erases in about 60 seconds
- Flashes the device in about 10 seconds
- Says the flash is successful, but nothing happens, the airgradient just sits there and does not connect to the WiFi or create the fallback hotspot.
- Check logs, they are blank. When I reset the device, I get these logs :
Build:Feb 7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x4 (DOWNLOAD(USB/UART0/1))
Saved PC:0x400462e2
waiting for download
I’ve also tried flashing direct from esphome-flasher
locally after building an image in legacy format from the web interface / esphome docker image, and get the following :
Using 'COM9' as serial port.
Connecting...
Detecting chip type... ESP32-C3
Connecting...
Chip Info:
- Chip Family: ESP32
- Chip Model: ESP32-C3 (revision 4)
- Number of Cores: 1
- Max CPU Frequency: 80MHz
- Has Bluetooth: NO
- Has Embedded Flash: NO
- Has Factory-Calibrated ADC: NO
- MAC Address: 34:85:18:29:30:B0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
- Flash Size: 4MB
- Flash Mode: qio
- Flash Frequency: 80MHz
Erasing flash (this may take a while)...
Chip erase completed successfully in 19.1s
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00133fff...
Compressed 17392 bytes to 11186...
Writing at 0x00001000... (100 %)Wrote 17392 bytes (11186 compressed) at 0x00001000 in 0.1 seconds (effective 1224.8 kbit/s)...
File md5: 2613d22b69813404709aa85ac2e6ed03
Flash md5: 2fa1740520bfd87515fed6c0e6a8d801
MD5 of 0xFF is b870ee124b86c03bbf0d109d3dc8b26c
Unexpected error: Error while writing flash: MD5 of file does not match data in flash!
If I then reboot the device, I get errors similar to the following
[17:22:37]ESP-ROM:esp32c3-api1-20210207
[17:22:37]Build:Feb 7 2021
[17:22:37]rst:0x7 (TG0WDT_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
[17:22:37]Saved PC:0x4004d1f8
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
[17:22:37]invalid header: 0xffffffff
<snip lots of repeated lines>
Things i’ve tried
- putting the module into flash mode by holding the button during boot
- trying DIO flash mode, no difference
- various configs from the forums / github -
https://github.com/ajfriesen/ESPHome-AirGradient/blob/main/air-gradient-open-air.yaml
https://devices.esphome.io/devices/AirGradient-DIY
- modified for platform: esp32
, board:esp32-c3-devkitm-1
DIO flash mode notes
esphome:
...
platformio_options:
board_build.flash_mode: dio