arduino-esp32/libraries/Update/examples/HTTPS_OTA_Update
Lucas Saavedra Vaz 9f3010f214
ci(json): Improve requirement checking (#10554)
* ci(json): Change requirements for sketches that use WiFi

* ci(checks): Optimize requirement checking

* fix(tests): Additional checks before running tests

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-11-06 18:08:16 +02:00
..
ci.json ci(json): Improve requirement checking (#10554) 2024-11-06 18:08:16 +02: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().