arduino-esp32/libraries/Update/examples/HTTPS_OTA_Update
Lucas Saavedra Vaz e403f0b481
ci(json): Add configuration requirements to ci.json files (#10385)
* ci(json): Add support for checking sdkconfig before running tests

* docs(ci): Add explanation about requires field in JSON

* fix(json): Ignore comments when searching requirements

* feat(json): Add extended regex support to requires field

* change(json): Move to using requirements in JSON

* fix(json): Fix requirements for touch tests

* refactor(json): Fix formatting of JSON files

* fix(spi): Fix SPI example and JSON
2024-09-30 13:43:50 +03:00
..
ci.json ci(json): Add configuration requirements to ci.json files (#10385) 2024-09-30 13:43:50 +03:00
HTTPS_OTA_Update.ino refactor(style): Change some style options (#9526) 2024-04-19 18:16:55 +03:00
Readme.md Refactor repository with pre-commit hooks (#9515) 2024-04-15 19:40:56 +03:00

OTA Firmware Upgrade for Arduino

This sketch allows Arduino user to perform Over The Air (OTA) firmware upgrade. It uses HTTPS.

API introduced for OTA

HttpsOTA.begin(const char * url, const char * server_certificate, bool skip_cert_common_name_check)

Main API which starts firmware upgrade

Parameters

  • url : URL for the uploaded firmware image
  • server_certificate : Provide the ota server certificate for authentication via HTTPS
  • skip_cert_common_name_check : Skip any validation of server certificate CN field

The default value provided to skip_cert_common_name_check is true

HttpsOTA.onHttpEvent(function)

This API exposes HTTP Events to the user

Parameter

Function passed has following signature void HttpEvent (HttpEvent_t * event);

HttpsOTA.otaStatus()

It tracks the progress of OTA firmware upgrade.

  • HTTPS_OTA_IDLE : OTA upgrade have not started yet.
  • HTTPS_OTA_UPDATNG : OTA upgrade is in progress.
  • HTTPS_OTA_SUCCESS : OTA upgrade is successful.
  • HTTPS_OTA_FAIL : OTA upgrade failed.
  • HTTPS_OTA_ERR : Error occurred while creating xEventGroup().