How do I perform OTA updates for my devices?
Enable OTA with a single call (recommended):
esp_rmaker_ota_enable_default();
This uses OTA over topics, the default server certificate, and the default callback. For custom config:
esp_rmaker_ota_config_t ota_config = {
.server_cert = ESP_RMAKER_OTA_DEFAULT_SERVER_CERT,
};
esp_rmaker_ota_enable(&ota_config, OTA_USING_TOPICS);
Key APIs (only for advanced use cases): esp_rmaker_ota_fetch() to query for pending OTA, esp_rmaker_ota_report_status() for progress, esp_rmaker_ota_mark_valid() / esp_rmaker_ota_mark_invalid() for rollback support. Ensure project name and firmware version are correctly set—the cloud matches by project name and version. OTA can be triggered from the Dashboard. For details, see OTA Firmware Upgrades.