DMS data types. More...

Data Structures

struct gos_dms_messsage_config_t
DMS Message Configuration. More...

Typedefs

typedef gos_result_t (* gos_dms_telemetry_callback_t ) ( gos_msgpack_context_t *msgpack, uint32_t *pair_count_ptr)
Callback to be invoked before device posts telemetry to DMS. More...

Enumerations

enum gos_dms_query_status_t {
GOS_DMS_QUERY_STATUS_ERROR = 0,
GOS_DMS_QUERY_STATUS_AVAILABLE = 1,
GOS_DMS_QUERY_STATUS_UP_TO_DATE = 2
}
Status of query DMS for firmaware update. More...
enum gos_dfu_status_t {
GOS_DFU_STATUS_NONE = 0,
GOS_DFU_STATUS_SUCCESS = 1,
GOS_DFU_STATUS_FIRST_PASS_SUCCESS = 2,
GOS_DFU_STATUS_UP_TO_DATE = 3,
GOS_DFU_STATUS_PENDING = 4,
GOS_DFU_STATUS_ERRORS_START = 10,
GOS_DFU_STATUS_RECOVERABLE_ERRORS_START = 10,
GOS_DFU_STATUS_DMS_CONNECTION_ERROR = 11,
GOS_DFU_STATUS_DMS_READ_TIMEOUT_ERROR = 12,
GOS_DFU_STATUS_NETWORK_NOT_FOUND = 13,
GOS_DFU_STATUS_NETWORK_JOIN_FAILED = 14,
GOS_DFU_STATUS_MAX_REQUEST_ATTEMPTS = 15,
GOS_DFU_STATUS_XMODEM_INIT_TIMEOUT = 16,
GOS_DFU_STATUS_XMODEM_READ_TIMEOUT = 17,
GOS_DFU_STATUS_XMODEM_MAX_RETRIES = 18,
GOS_DFU_STATUS_MAX_FAULTS = 19,
GOS_DFU_STATUS_RECOVERABLE_ERRORS_END ,
GOS_DFU_STATUS_KERNEL_ERROR = 100,
GOS_DFU_STATUS_APPLICATION_FILE_INVALID = 102,
GOS_DFU_STATUS_DMS_PRODUCT_AUTH_KEY_SIG_INVALID = 103,
GOS_DFU_STATUS_APPLICATION_SIGNATURE_INVALID = 105 ,
GOS_DFU_STATUS_NETWORK_SSID_NOT_SET = 107,
GOS_DFU_STATUS_NETWORK_PASSKEY_NOT_SET = 108,
GOS_DFU_STATUS_NETWORK_SECURITY_NOT_SUPPORTED = 109,
GOS_DFU_STATUS_MAX_UPDATE_ATTEMPTS = 110,
GOS_DFU_STATUS_NO_DEVICE_CERTIFICATE = 111,
GOS_DFU_STATUS_DEVCREDS_FINALIZE_FAILED = 116,
GOS_DFU_STATUS_DMS_NO_AUTHORIZATION = 117,
GOS_DFU_STATUS_APPLICATION_SIGNATURE_CHECK_FAILED = 118,
GOS_DFU_STATUS_DFU_COUNTER_EXCEEDED = 119,
GOS_DFU_STATUS_DEVCREDS_CORRUPT = 120,
GOS_DFU_STATUS_SECOND_STAGE_BOOTLOADER_ERROR = 121,
GOS_DFU_STATUS_EXTENDED_FLASH_INIT_FAILED = 122,
GOS_DFU_STATUS_EXTENDED_FLASH_NOT_ENABLED = 123,
GOS_DFU_STATUS_FLASH_ERASE_ERROR = 124,
GOS_DFU_STATUS_FLASH_WRITE_ERROR = 125,
GOS_DFU_STATUS_FLASH_READ_ERROR = 126,
GOS_DFU_STATUS_CACHE_VERIFY_FAILED = 127,
GOS_DFU_STATUS_DECRYPT_VERIFY_FAILED = 128,
GOS_DFU_STATUS_DMS_BUNDLE_NOT_FOUND = 129,
GOS_DFU_STATUS_UPDATE_DEVCREDS_COPY_FAILED = 130,
GOS_DFU_STATUS_UPDATE_DEVCREDS_SIG_INVALID = 131,
GOS_DFU_STATUS_UPDATE_DEVCREDS_CRC_SIG_INVALID = 132,
GOS_DFU_STATUS_UPDATE_DEVCREDS_DMS_SERVER_CERT_INVALID = 133,
GOS_DFU_STATUS_UPDATE_DEVCREDS_DMS_DEVICE_CERT_INVALID = 134,
GOS_DFU_STATUS_UPDATE_DEVCREDS_DMS_DEVICE_KEY_INVALID = 135,
GOS_DFU_STATUS_UPDATE_DEVCREDS_BUNDLE_VERSION_INVALID = 136,
GOS_DFU_STATUS_UPDATE_DEVCREDS_PRODUCT_KEY_SIG_INVALID = 137,
GOS_DFU_STATUS_UPDATE_DEVCREDS_MISSING_ENTRY = 138,
GOS_DFU_STATUS_UPDATE_KERNEL_SIG_INVALID = 139,
GOS_DFU_STATUS_UPDATE_KERNEL_COPY_FAILED = 140,
GOS_DFU_STATUS_UPDATE_SSB_CRC_INVALID = 141,
GOS_DFU_STATUS_UPDATE_SSB_SIG_INVALID = 142,
GOS_DFU_STATUS_UPDATE_SSB_COPY_FAILED = 143,
GOS_DFU_STATUS_UPDATE_APPLICATION_SIG_INVALID = 144,
GOS_DFU_STATUS_UPDATE_APPLICATION_COPY_FAILED = 145,
GOS_DFU_STATUS_PACKAGE_PROCESSING_ERROR = 146,
GOS_DFU_STATUS_PACKAGE_CODES_START = 150,
GOS_DFU_STATUS_MALFORMED_PACKAGE = 150,
GOS_DFU_STATUS_INVALID_PACKAGE_SIGNATURE = 151,
GOS_DFU_STATUS_INVALID_PACKAGE_CRC = 152,
GOS_DFU_STATUS_MALFORMED_PACKAGE_MANIFEST = 153,
GOS_DFU_STATUS_MALFORMED_PACKAGE_METADATA = 153,
GOS_DFU_STATUS_IS_PRODUCTION_DEVICE = 154,
GOS_DFU_STATUS_IS_DEVELOPMENT_DEVICE = 155,
GOS_DFU_STATUS_PACKAGE_VERSION_NOT_ALLOWED = 156,
GOS_DFU_STATUS_PACKAGE_PRODUCT_NOT_ALLOWED = 157 ,
GOS_DFU_STATUS_PACKAGE_UUID_NOT_ALLOWED = 159,
GOS_DFU_STATUS_BULK_FS_NOT_ENABLED = 160,
GOS_DFU_STATUS_BULK_FS_INIT_FAILED = 161,
GOS_DFU_STATUS_NO_ROOM = 162,
GOS_DFU_STATUS_NO_MULTI_PASS_UPDATES = 163,
GOS_DFU_STATUS_PACKAGE_DATA_OVERFLOW = 164,
GOS_DFU_STATUS_PACKAGE_HEADER_INVALID = 165,
GOS_DFU_STATUS_PACKAGE_INVALID_PRODUCT_AES_KEY = 166,
GOS_DFU_STATUS_PACKAGE_BAD_FILE_ATTRIBUTE = 167
}
Status of DFU. More...

Detailed Description

DMS data types.

Typedef Documentation

gos_dms_telemetry_callback_t

typedef gos_result_t (* gos_dms_telemetry_callback_t) ( gos_msgpack_context_t *msgpack, uint32_t *pair_count_ptr)

Callback to be invoked before device posts telemetry to DMS.

This callback is registered by gos_dms_set_telemetry_callback()

When this callback executes, the supplied msgpack_context argument should be populated with custom information using the MessagePack APIs.

If the callback returns GOS_SUCCESS , the telemetry information will be posted to the DMS.

Note
A root 'dictionary' marker is prepended to the context. The callback should simply add key/values to the root dictionary. i.e. An initial gos_msgpack_write_dict_marker() is NOT required
Parameters
[in] msgpack msgpack context to populate, see gos_msgpack_context_t
[out] pair_count_ptr Number of key/value pairs added to root directory

Enumeration Type Documentation

gos_dfu_status_t

Status of DFU.

Enumerator
GOS_DFU_STATUS_NONE

No status, default value on power-up.

GOS_DFU_STATUS_SUCCESS

DFU successfully completed.

GOS_DFU_STATUS_FIRST_PASS_SUCCESS

DFU successfully completed the 'first pass'.

GOS_DFU_STATUS_UP_TO_DATE

DFU successfully completed, firmware already up-to-date.

GOS_DFU_STATUS_PENDING

DFU currently active.

GOS_DFU_STATUS_ERRORS_START

All codes below here are considered DFU failures.

GOS_DFU_STATUS_RECOVERABLE_ERRORS_START

Start of codes that if occurred, the device will NOT abort DFU mode.

GOS_DFU_STATUS_DMS_CONNECTION_ERROR

Error while issuing DMS HTTP request.

GOS_DFU_STATUS_DMS_READ_TIMEOUT_ERROR

Timed-out while receiving DMS HTTP response.

GOS_DFU_STATUS_NETWORK_NOT_FOUND

The configured network was not found.

GOS_DFU_STATUS_NETWORK_JOIN_FAILED

Failed to connect to network.

GOS_DFU_STATUS_MAX_REQUEST_ATTEMPTS

Max attempts at issuing OTA DFU requests to DMS exceeded.

GOS_DFU_STATUS_XMODEM_INIT_TIMEOUT

Max attempts at initializing Xmodem interface exceeded.

GOS_DFU_STATUS_XMODEM_READ_TIMEOUT

Timeout out while trying to receive Xmodem packet.

GOS_DFU_STATUS_XMODEM_MAX_RETRIES

Max attempts at retransmitting an Xmodem packet exceeded.

GOS_DFU_STATUS_MAX_FAULTS

Max system faults exceeded.

GOS_DFU_STATUS_RECOVERABLE_ERRORS_END

All error codes below here abort DFU mode on occurrence.

GOS_DFU_STATUS_KERNEL_ERROR

Unknown Kernel error occurred.

GOS_DFU_STATUS_APPLICATION_FILE_INVALID

The application file on internal flash is invalid.

GOS_DFU_STATUS_DMS_PRODUCT_AUTH_KEY_SIG_INVALID

The product auth key was improperly signed by the current platform auth key.

GOS_DFU_STATUS_APPLICATION_SIGNATURE_INVALID

The application's signature on bootload is not valid against the product auth key.

GOS_DFU_STATUS_NETWORK_SSID_NOT_SET

No network SSID is set.

GOS_DFU_STATUS_NETWORK_PASSKEY_NOT_SET

No network password is set.

GOS_DFU_STATUS_NETWORK_SECURITY_NOT_SUPPORTED

The configured network security is not supported.

GOS_DFU_STATUS_MAX_UPDATE_ATTEMPTS

Max Kernel attempts of updating firmware exceeded.

GOS_DFU_STATUS_NO_DEVICE_CERTIFICATE

No device DMS certificate was found on the device's internal memory.

GOS_DFU_STATUS_DEVCREDS_FINALIZE_FAILED

Failed to finalize the device credentials update on internal memory.

GOS_DFU_STATUS_DMS_NO_AUTHORIZATION

The device does not have access to the firmware on the DMS.

GOS_DFU_STATUS_APPLICATION_SIGNATURE_CHECK_FAILED

Application signature on internal memory is not valid during DFU.

GOS_DFU_STATUS_DFU_COUNTER_EXCEEDED

The DFU NVM counter has been exceeded, serial DFUs are now prohibited.

GOS_DFU_STATUS_DEVCREDS_CORRUPT

Device credential memory corrupted.

GOS_DFU_STATUS_SECOND_STAGE_BOOTLOADER_ERROR

Unknown error in SSB.

GOS_DFU_STATUS_EXTENDED_FLASH_INIT_FAILED

Failed to initialize flash in SSB.

GOS_DFU_STATUS_EXTENDED_FLASH_NOT_ENABLED

Extended flash is required but not enabled in SSB, likely a chip select was not specified in the DFU package.

GOS_DFU_STATUS_FLASH_ERASE_ERROR

Error while erasing flash in SSB.

GOS_DFU_STATUS_FLASH_WRITE_ERROR

Error while writing flash in SSB.

GOS_DFU_STATUS_FLASH_READ_ERROR

Error while reading flash in SSB.

GOS_DFU_STATUS_CACHE_VERIFY_FAILED

Failed to verify CRC of encrypted image in SSB.

GOS_DFU_STATUS_DECRYPT_VERIFY_FAILED

Failed to verify CRC of decrypted image in SSB.

GOS_DFU_STATUS_DMS_BUNDLE_NOT_FOUND

Requested bundle not found on DMS.

GOS_DFU_STATUS_UPDATE_DEVCREDS_COPY_FAILED

Failed to copy device credentials from extended to internal flash.

GOS_DFU_STATUS_UPDATE_DEVCREDS_SIG_INVALID

Device credentials signature is invalid against current product auth key.

GOS_DFU_STATUS_UPDATE_DEVCREDS_CRC_SIG_INVALID

Failed to verify CRC when copying device credentials from extended to internal flash.

GOS_DFU_STATUS_UPDATE_DEVCREDS_DMS_SERVER_CERT_INVALID

Server cert in device credentials is invalid.

GOS_DFU_STATUS_UPDATE_DEVCREDS_DMS_DEVICE_CERT_INVALID

Device cert in device credentials is invalid.

GOS_DFU_STATUS_UPDATE_DEVCREDS_DMS_DEVICE_KEY_INVALID

Device cert key in device credentials is invalid.

GOS_DFU_STATUS_UPDATE_DEVCREDS_BUNDLE_VERSION_INVALID

Bundle version is invalid in device credentials.

GOS_DFU_STATUS_UPDATE_DEVCREDS_PRODUCT_KEY_SIG_INVALID

Product auth key signature in device credentials is not valid against platform auth key.

GOS_DFU_STATUS_UPDATE_DEVCREDS_MISSING_ENTRY

Device credentials is missing one or more required entries.

GOS_DFU_STATUS_UPDATE_KERNEL_SIG_INVALID

Kernel's signature is invalid against platform auth key.

GOS_DFU_STATUS_UPDATE_KERNEL_COPY_FAILED

Failed to copy kernel from extended to internal flash.

GOS_DFU_STATUS_UPDATE_SSB_CRC_INVALID

CRC verification of SSB failed (i.e. CRC appended to SSB binary does not match calculated value)

GOS_DFU_STATUS_UPDATE_SSB_SIG_INVALID

SSB's signature is invalid against current product auth key.

GOS_DFU_STATUS_UPDATE_SSB_COPY_FAILED

Error while copying SSB from extended to internal flash.

GOS_DFU_STATUS_UPDATE_APPLICATION_SIG_INVALID

Application's signature is invalid against product auth key.

GOS_DFU_STATUS_UPDATE_APPLICATION_COPY_FAILED

Error while copying application from extended to internal flash.

GOS_DFU_STATUS_PACKAGE_PROCESSING_ERROR

General error while processing the DFU package.

GOS_DFU_STATUS_PACKAGE_CODES_START

The following codes are errors in the given DFU package.

GOS_DFU_STATUS_MALFORMED_PACKAGE

The sections within the package are not valid.

GOS_DFU_STATUS_INVALID_PACKAGE_SIGNATURE

The signature of the package data is not valid against the product auth key.

GOS_DFU_STATUS_INVALID_PACKAGE_CRC

The package's CRC is not valid.

GOS_DFU_STATUS_MALFORMED_PACKAGE_MANIFEST

The package's manifest is not valid.

GOS_DFU_STATUS_MALFORMED_PACKAGE_METADATA

The package's metadata field is not valid.

GOS_DFU_STATUS_IS_PRODUCTION_DEVICE

Given package with 'development' credentials, but device has 'production' credentials.

GOS_DFU_STATUS_IS_DEVELOPMENT_DEVICE

Given package with 'production' credentials, but device has 'development' credentials.

GOS_DFU_STATUS_PACKAGE_VERSION_NOT_ALLOWED

The device's current version is not allowed by the package's 'allowed versions' field.

GOS_DFU_STATUS_PACKAGE_PRODUCT_NOT_ALLOWED

The device's current product is not allowed by the package's 'allowed product' field.

GOS_DFU_STATUS_PACKAGE_UUID_NOT_ALLOWED

The device's UUID does not match the package's 'uuid' field.

GOS_DFU_STATUS_BULK_FS_NOT_ENABLED

The package's has files destined to bulk flash, but the manifest does not specify the bulk flash chip select configuration.

GOS_DFU_STATUS_BULK_FS_INIT_FAILED

Failed to initialize the bulk flash based on the chip select configuration in the package manifest.

GOS_DFU_STATUS_NO_ROOM

There isn't enough room on extended/bulk flash to cache the package (even with multi-pass updates enabled)

GOS_DFU_STATUS_NO_MULTI_PASS_UPDATES

The package requires 'multi-pass' updates to perform the update, but 'multi-pass' was not enabled.

GOS_DFU_STATUS_PACKAGE_DATA_OVERFLOW

The package body contains more files than what was specified in the manifest.

GOS_DFU_STATUS_PACKAGE_HEADER_INVALID

The factory DFU image contains an invalid header.

GOS_DFU_STATUS_PACKAGE_INVALID_PRODUCT_AES_KEY

Cannot decrypt the package with the device's current product AES key.

GOS_DFU_STATUS_PACKAGE_BAD_FILE_ATTRIBUTE

A file in the DFU package manifest has an invalid attribute.

gos_dms_query_status_t

Status of query DMS for firmaware update.

Enumerator
GOS_DMS_QUERY_STATUS_ERROR

There was an error querying DMS for firmware update.

GOS_DMS_QUERY_STATUS_AVAILABLE

Newer firmware is available on the DMS.

GOS_DMS_QUERY_STATUS_UP_TO_DATE

The current firmware is up-to-date.