Example Path: examples/Wifi/ESP32/WifiOtaUpload
ESP32-C5 WiFi – Browser-Upload OTA Example
Overview
This example has the same WiFi bring-up as Wifi Basic, with OTA driven entirely from a web browser. No firmware image is compiled into the application; instead you upload an encrypted .enc.bin from a web form and the device pushes it to the ESP32-C5.
How it works
- Browse to http://<device-ip>/upload.html and choose a .enc.bin image produced by the ESP-IDF build under platform/esp32_c5_wifi_mod/c5/ (e.g. build/esp32_c5_wifi_bridge.enc.bin).
- The multipart POST is handled by ota_upload.cpp (registered at /api/ota/upload, form field firmware): it buffers the upload (capped at a few MB), then hands it to ESP32C5_PerformOTA() via ESP32EncryptedBufferImage.
- The request task blocks while the bytes stream to the ESP32-C5 (~10 s for a 1 MB image); the page then reloads with a success or failure message.
A wrong-key or tampered image is rejected by the ESP32-C5 (GCM tag mismatch), and the existing firmware is left in place.
Serial Console Commands
The application prints a menu on the serial debug port (115200 baud). OTA is performed from the web page, not the console:
| Key | Function |
| N | Start a WiFi scan |
| R | Show last scan results |
| I | Show interface info (STA/AP state, IPs, ESP32 firmware version) |
| W | Push the current config to the ESP32 |
Provisioning
Same as Wifi Basic: web UI at http://<device-ip>/wifi; default provisioning AP SSID NetBurnerC5Wifi (5 GHz).
Supported Platforms
Related Examples
- Wifi Basic – minimal WiFi bring-up, no OTA.
- Wifi Web UI – build your own WiFi setup web UI on the public ESP32C5 API instead of using the library's /wifi page.
- Wifi OTA Auto – auto-update to the NNDK-bundled firmware at boot.