Timed out when uploading

The board I use is similar to this one:
If you can understand Chinese, I use this board exactly:

I always get the following error. But I can upload successfully 1 out of 10 tries.

Uploading: [== ] 4%
ERROR Error sending data: timed out

Is there any reason?

How much memory are you using?

Do you still get the issue when trying to flash a minimal config?

Memory of HA or the board?

Do you still get the issue when trying to flash a minimal config?

Yes.I will get the error if I flash via WIFI, and won’t if I flash through USB.

I don’t know if the following info will help you:

Compiling .pioenvs/esphome-web-048154/src/main.cpp.o
Linking .pioenvs/esphome-web-048154/firmware.elf
RAM:   [=         ]  11.1% (used 36284 bytes from 327680 bytes)
Flash: [=====     ]  48.7% (used 893288 bytes from 1835008 bytes)
Building .pioenvs/esphome-web-048154/firmware.bin
Creating esp32c3 image...
Successfully created esp32c3 image.
esp32_create_combined_bin([".pioenvs/esphome-web-048154/firmware.bin"], [".pioenvs/esphome-web-048154/firmware.elf"])
Wrote 0xed920 bytes to file /data/build/esphome-web-048154/.pioenvs/esphome-web-048154/firmware-factory.bin, ready to flash to offset 0x0
========================= [SUCCESS] Took 22.25 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of esphome-web-048154.local
INFO  ->
INFO Uploading /data/build/esphome-web-048154/.pioenvs/esphome-web-048154/firmware.bin (907552 bytes)
Uploading: [=                                                           ] 2% 
ERROR Error sending data: timed out

I think I may have had a similar issue when this was a fair bit higher than yours.

It’s still probably worth commenting out all but a basic config and see if that changes anything. But beyond that I don’t know.

If you have connected a lot of devices to the ESP, or there is a lot of processing done by the ESP, you can add the reboot in safe mode button (Safe Mode Button — ESPHome) and hit this button first before you do the OTA update. I use this solution for some of my ESP’s where I experienced the same kind of issues.

1 Like