AWS IoT Over-the-air Update v3.3.0
Client library for AWS IoT OTA

Constants defined in the OTA library. More...


#define LOG2_BITS_PER_BYTE   3U
 Log base 2 of bits per byte.
#define BITS_PER_BYTE   ( ( uint32_t ) 1U << LOG2_BITS_PER_BYTE )
 Number of bits in a byte. This is used by the block bitmap implementation.
#define OTA_FILE_BLOCK_SIZE   ( ( uint32_t ) 1U << otaconfigLOG2_FILE_BLOCK_SIZE )
 Data section size of the file data block message (excludes the header).
#define OTA_MAX_FILES   1U
 [MUST REMAIN 1! Future support.] Maximum number of concurrent OTA files.
 Max allowed number of bytes to track all blocks of an OTA file. Adjust block size if more range is needed.
 Maximum size of the message.
#define OTA_REQUEST_URL_MAX_SIZE   ( 1500 )
 Maximum size of the S3 presigned URL.
 The starting state of a group of erased blocks in the Rx block bitmap.
 The maximum file size supported by the library.
 Number of JSON tokens supported in a single parser call.
#define OTA_MAX_JSON_STR_LEN   256U
 Limit our JSON string compares to something small to avoid going into the weeds.
 The parameter list is backed by a 32 bit longword bitmap by design.
#define OTA_JOB_PARAM_REQUIRED   ( bool ) true
 Used to denote a required document model parameter.
#define OTA_JOB_PARAM_OPTIONAL   ( bool ) false
 Used to denote an optional document model parameter.
#define OTA_DONT_STORE_PARAM   0xffff
 If destOffset in the model is 0xffffffff, do not store the value.
#define OTA_STORE_NESTED_JSON   0x1fffU
 Store the reference to a nested JSON in a separate pointer.
 Header is 19 bytes.
#define OTA_EVT_MASK_JOB_MSG_READY   0x00000001UL
#define OTA_EVT_MASK_DATA_MSG_READY   0x00000002UL
#define OTA_EVT_MASK_SHUTDOWN   0x00000004UL
#define OTA_EVT_MASK_REQ_TIMEOUT   0x00000008UL
#define OTA_EVT_MASK_USER_ABORT   0x000000016UL
#define kOTA_MaxSignatureSize   256 /* Max bytes supported for a file signature (2048 bit RSA is 256 bytes). */
 A composite cryptographic signature structure able to hold our largest supported signature.
#define OTA_JSON_SEPARATOR   "."
 Separator used to define nested keys.
#define OTA_JSON_CLIENT_TOKEN_KEY   "clientToken"
 Client token.
#define OTA_JSON_TIMESTAMP_KEY   "timestamp"
 Used to calculate timeout and time spent on the operation.
#define OTA_JSON_EXECUTION_KEY   "execution"
 Contains job execution parameters .
 Name of the job.
 Current status of the job.
 Specifies if the platform and service is is selftest.
 Parameter to specify update status.
#define OTA_JSON_UPDATED_BY_KEY_ONLY   "updatedBy"
 Specifies if the platform and service is is selftest. Not searched in sub fields.
#define OTA_JSON_SELF_TEST_KEY_ONLY   "self_test"
 Parameter to specify update status. Not searched in sub fields.
 Parameters that specify the nature of the job.
 Protocols over which the download can take place.
 Parameters for specifying file configurations.
 Name of the stream used for download.
#define OTA_JSON_FILE_PATH_KEY   "filepath"
 Path to store the image on the device.
#define OTA_JSON_FILE_SIZE_KEY   "filesize"
 Size of the file to be downloaded.
#define OTA_JSON_FILE_ID_KEY   "fileid"
 Used to identify the file in case of multiple file downloads.
 Additional file attributes.
#define OTA_JSON_FILE_CERT_NAME_KEY   "certfile"
 Location of the certificate on the device to find code signing.
#define OTA_JSON_UPDATE_DATA_URL_KEY   "update_data_url"
 S3 bucket presigned url to fetch the image from .
#define OTA_JSON_AUTH_SCHEME_KEY   "auth_scheme"
 Authentication scheme for downloading a the image over HTTP.
#define OTA_JSON_FILETYPE_KEY   "fileType"
 Used to identify the file in case of multi file type support.

Detailed Description

Constants defined in the OTA library.

Keys in OTA job doc.

The OTA job document contains parameters that are required for us to build the stream request message and manage the OTA process. Including info like file name, size, attributes, etc. The following value specifies the number of parameters that are included in the job document model although some may be optional.

Macro Definition Documentation


#define OTA_EVT_MASK_JOB_MSG_READY   0x00000001UL

Event flag for OTA Job message ready.


#define OTA_EVT_MASK_DATA_MSG_READY   0x00000002UL

Event flag for OTA Data message ready.


#define OTA_EVT_MASK_SHUTDOWN   0x00000004UL

Event flag to request OTA shutdown.


#define OTA_EVT_MASK_REQ_TIMEOUT   0x00000008UL

Event flag indicating the request timer has timed out.


#define OTA_EVT_MASK_USER_ABORT   0x000000016UL

Event flag to indicate user initiated OTA abort.


Event flag to mask indicate all events.