OTA Firmware Upgrade Usage Guide
Firmware Usage Guide
about
OTA firmware upgrades is one of the most important functions of any IoT System. It helps add features and fix bugs for devices in fields. ESP RainMaker offers a rich OTA Upgrades interface with many options and flexibility.
Usage Guide
Enable OTA Upgrades in the Firmware
The recommended API to enable OTA functionality is to call this single API:
esp_rmaker_ota_enable_default();
This internally maps to "OTA Using Topics", uses the ESP x509 Certificate Bundle for server authentication and sets the default OTA callback.
信息
For more details about OTA C APIs, click here
Setup OTA Upgrade Image
Compile an OTA upgrade firmware image as you would normally do, but ensure the following:
- The project name should be the same as that used for the firmware already flashed on the node(s).
- The firmware version should be different than what the nodes already have.
(check
set(PROJECT_VER "1.0")
in the example'sCMakeLists.txt
file)
disclaimer
If you miss out any of the above, the OTA upgrade will fail.
Bypass version & project name check (Not Recommended)
This is done in the following configuration option.
Again, this is not recommended.
CONFIG_ESP_RMAKER_SKIP_VERSION_CHECK=y
CONFIG_ESP_RMAKER_SKIP_PROJECT_NAME_CHECK=y