ESP32 OTA Progress Reporting Not Working
DodaTech
Updated 2026-06-26
1 min read
In this tutorial, you'll learn about ESP32 OTA Progress Reporting Not Working. We cover key concepts, practical examples, and best practices.
The Problem
ESP32 OTA update shows no progress or freezes during update.
Quick Fix
Wrong
Update.begin(size);
Update.writeStream(stream); // No progress feedback
Update appears frozen. Users may power off the device.
Right
Update.begin(size);
size_t totalWritten = 0;
uint8_t buf[1024];
while (stream->available() && totalWritten < size) {
int len = stream->readBytes(buf, 1024);
Update.write(buf, len);
totalWritten += len;
int pct = totalWritten * 100 / size;
Serial.printf("\rOTA: %d%% (%d/%d KB)", pct, totalWritten/1024, size/1024);
// Blink LED for visual feedback
digitalWrite(2, !digitalRead(2));
}
if (Update.end()) {
Serial.println("\nComplete! Rebooting...");
}
OTA: 0% (0/1024 KB)
OTA: 25% (256/1024 KB)
OTA: 50% (512/1024 KB)
OTA: 75% (768/1024 KB)
OTA: 100% (1024/1024 KB)
Complete! Rebooting...
Prevention
Print progress percentage and written bytes. Blink an LED during OTA for visual feedback. Use carriage return to update the same line. Report HTTP download progress before OTA begins. Use Update.progress() for ESP-IDF progress API.
DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro