OTA firmware update over HTTP/HTTPS for the ESP32 family.
- OTA triggered through public API or optional AT command
- HTTP and HTTPS support via
esp_https_ota - Non-blocking background task
- Guard against concurrent OTA attempts
- Auto-restart on success
- Optional internal logs
esp_ota_init(log_enabled, at_enabled) controls optional behavior.
log_enabled- enables OTA logs
at_enabled- registers
AT+OTAandAT+OTA?
- registers
WiFi must already be connected before starting OTA.
Recommended companion:
rodrigo-s-lange/esp_network
#include "esp_at.h"
#include "esp_ota.h"
nvs_flash_init();
ESP_ERROR_CHECK(esp_at_init(false));
ESP_ERROR_CHECK(esp_network_init());
ESP_ERROR_CHECK(esp_network_start());
ESP_ERROR_CHECK(esp_ota_init(false, true));esp_ota_init(log_enabled, at_enabled)esp_ota_deinit()esp_ota_is_initialized()esp_ota_is_running()esp_ota_start(url)
When at_enabled=true:
AT+OTA?AT+OTAAT+OTA="http://host/firmware.bin"
- Only one OTA session may run at a time.
esp_ota_deinit()refuses to run while OTA is active.- OTA task stack is
8192bytes with priority5.