SimpleOTA client v1.0.0
Shared core of the SimpleOTA Arduino and ESP-IDF clients
Loading...
Searching...
No Matches
simpleota_event_t Struct Reference

One lifecycle event, valid only during the event_cb call. More...

#include <simpleota.h>

Data Fields

simpleota_event_id_t id
 What happened.
 
const char * reason
 A reason token (e.g.
 
uint32_t build_number
 The build the event is about, 0 when none.
 
size_t bytes_done
 DOWNLOAD_PROGRESS only.
 
size_t bytes_total
 DOWNLOAD_PROGRESS, and UPDATE_AVAILABLE (the offer's size); 0 when unknown.
 

Detailed Description

One lifecycle event, valid only during the event_cb call.

reason for SIMPLEOTA_EVENT_UPDATE_FAILED, which the dashboard shows too:

  • downgrade_refused: the offered build is not above the running one.
  • insecure_url: the download URL is not https://.
  • signature_invalid: a required signature is missing or wrong.
  • https_begin_failed: the download connection could not be opened.
  • http_status_<N>: the download returned HTTP N, or a fourth redirect.
  • redirect_not_https, redirect_malformed: a download redirect led to plain HTTP, or had no usable Location.
  • update_begin_failed: no second OTA slot, or the image is too big.
  • update_write_failed: a flash write failed.
  • stream_error, download_stalled, short_read: the download broke, received nothing for CONFIG_SIMPLEOTA_HTTP_TIMEOUT_MS, or ended early.
  • checksum_mismatch: the download did not match its SHA-256.
  • update_end_failed: the image failed ESP-IDF's check, or the boot slot could not be switched.
  • state_save_failed: the trial record could not be saved.

reason for SIMPLEOTA_EVENT_ROLLING_BACK: confirm_timeout, or the reset that ended the trial: panic, int_wdt, task_wdt, watchdog, brownout, power_on, deep_sleep or reset.

For SIMPLEOTA_EVENT_CHECK_DONE it is the server's status, such as up_to_date, which the platform defines.

Field Documentation

◆ reason

const char* simpleota_event_t::reason

A reason token (e.g.

"checksum_mismatch"), the server's status for CHECK_DONE, or NULL.


The documentation for this struct was generated from the following file: