Skip to content

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.
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

### Can I serve a web page during OTA?

Yes. Run a simple HTTP status page on a separate task. Report OTA progress as a JSON endpoint for remote monitoring.

How do I estimate OTA time remaining?

Track bytes per second and compute: remaining = (totalSize - written) / bytesPerSecond. Display as ETA.

Does progress reporting slow down OTA?

Minimal impact. Progress printing adds microseconds per chunk vs seconds for the full transfer. Always include it for user feedback.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro