28 #ifndef ZCL_OTA_UPGRADE_H 29 #define ZCL_OTA_UPGRADE_H 37 #define ZCL_CLUST_OTA_UPGRADE 0x0019 61 char ota_header_string[32];
75 #define ZCL_OTA_FILE_ID 0x0BEEF11E 78 #define ZCL_OTA_HEADER_VER 0x0100 81 #define ZCL_OTA_FIELD_CONTROL_SECURITY_CRED (1<<0) 82 #define ZCL_OTA_FIELD_CONTROL_DEVICE_SPECIFIC (1<<1) 83 #define ZCL_OTA_FIELD_CONTROL_HARDWARE_VERSIONS (1<<2) 86 #define ZCL_OTA_IMAGE_TYPE_CLIENT_SECURITY_CREDS 0xFFC0 87 #define ZCL_OTA_IMAGE_TYPE_CLIENT_CONFIG 0xFFC1 88 #define ZCL_OTA_IMAGE_TYPE_SERVER_LOG 0xFFC2 89 #define ZCL_OTA_IMAGE_TYPE_WILDCARD 0xFFFF 92 #define ZCL_OTA_ZIGBEE_STACK_2006 0x0000 93 #define ZCL_OTA_ZIGBEE_STACK_2007 0x0001 94 #define ZCL_OTA_ZIGBEE_STACK_PRO 0x0002 95 #define ZCL_OTA_ZIGBEE_STACK_IP 0x0003 98 #define ZCL_OTA_SECURITY_CRED_SE_10 0x00 99 #define ZCL_OTA_SECURITY_CRED_SE_11 0x01 100 #define ZCL_OTA_SECURITY_CRED_SE_20 0x02 111 #define ZCL_OTA_TAG_ID_UPGRADE_IMAGE 0x0000 112 #define ZCL_OTA_TAG_ID_ECDSA_SIGNATURE 0x0001 113 #define ZCL_OTA_TAG_ID_ECDSA_CERTIFICATE 0x0002 114 #define ZCL_OTA_TAG_ID_IMAGE_INTEGRITY_CODE 0x0003 139 #define ZCL_OTA_ATTR_UPGRADE_SERVER_ID 0x0000 // IEEE Address 140 #define ZCL_OTA_ATTR_FILE_OFFSET 0x0001 // UINT32 141 #define ZCL_OTA_ATTR_CURRENT_FILE_VER 0x0002 // UINT32 142 #define ZCL_OTA_ATTR_CURRENT_ZIGBEE_STACK_VER 0x0003 // UINT16 143 #define ZCL_OTA_ATTR_DOWNLOAD_FILE_VER 0x0004 // UINT32 144 #define ZCL_OTA_ATTR_DOWNLOAD_ZIGBEE_STACK_VER 0x0005 // UINT16 145 #define ZCL_OTA_ATTR_IMAGE_UPGRADE_STATUS 0x0006 // ENUM8 146 #define ZCL_OTA_ATTR_MANUFACTURER_ID 0x0007 // UINT16 147 #define ZCL_OTA_ATTR_IMAGE_TYPE_ID 0x0008 // UINT16 148 #define ZCL_OTA_ATTR_MIN_BLOCK_REQUEST_DELAY 0x0009 // UINT16 149 #define ZCL_OTA_ATTR_IMAGE_STAMP 0x000A // UINT32 152 #define ZCL_OTA_CMD_IMAGE_NOTIFY 0x00 153 #define ZCL_OTA_CMD_QUERY_NEXT_IMAGE_RESP 0x02 154 #define ZCL_OTA_CMD_IMAGE_BLOCK_RESP 0x05 155 #define ZCL_OTA_CMD_UPGRADE_END_RESP 0x07 156 #define ZCL_OTA_CMD_QUERY_SPECIFIC_FILE_RESP 0x09 159 #define ZCL_OTA_CMD_QUERY_NEXT_IMAGE_REQ 0x01 160 #define ZCL_OTA_CMD_IMAGE_BLOCK_REQ 0x03 161 #define ZCL_OTA_CMD_IMAGE_PAGE_REQ 0x04 162 #define ZCL_OTA_CMD_UPGRADE_END_REQ 0x06 163 #define ZCL_OTA_CMD_QUERY_SPECIFIC_FILE_REQ 0x08 167 #define ZCL_OTA_IMAGE_NOTIFY_PAYLOAD_JITTER_ONLY 0x00 // ends at .query_jitter 168 #define ZCL_OTA_IMAGE_NOTIFY_PAYLOAD_INC_MFG_CODE 0x01 // ends at .id.mfg_code_le 169 #define ZCL_OTA_IMAGE_NOTIFY_PAYLOAD_INC_IMAGE_TYPE 0x02 // ends at .id.image_type_le 170 #define ZCL_OTA_IMAGE_NOTIFY_PAYLOAD_INC_FILE_VERSION 0x03 // ends at .id.file_version_le 177 #define ZCL_OTA_QUERY_NEXT_IMAGE_FIELD_HARDWARE_VER (1<<0) 191 #define ZCL_OTA_IMAGE_BLOCK_FIELD_NODE_ADDR (1<<0) 192 #define ZCL_OTA_IMAGE_BLOCK_FIELD_BLOCK_DELAY (1<<1) 196 addr64 request_node_addr_le;
202 #define ZCL_OTA_IMAGE_PAGE_FIELD_NODE_ADDR (1<<0) 208 addr64 request_node_addr_le;
223 zcl_utctime_t current_time_le;
224 zcl_utctime_t request_time_le;
240 zcl_utctime_t current_time_le;
241 zcl_utctime_t upgrade_time_le;
259 #endif // ZCL_OTA_UPGRADE_H defined unsigned long uint32_t
32-bit unsigned integer
Definition: platform_config.h:43
uint32_t zcl_ota_tag_identifier_length(uint16_t id)
The expected length (or 0 for variable) of an OTA file's Sub-Element Tag.
Definition: zcl_ota_upgrade.c:77
WPAN datatypes and support functions, valid for ZigBee and DigiMesh.
Sub-element with signature for the entire file, must be last in the file.
Definition: zcl_ota_upgrade.h:122
#define XBEE_BEGIN_DECLS
Macro defined to.
Definition: platform.h:41
< upgrade image identification
Definition: zcl_ota_upgrade.h:236
< upgrade image identification
Definition: zcl_ota_upgrade.h:198
< upgrade image identification
Definition: zcl_ota_upgrade.h:242
Sub-element with a hash value to verify the integrity of the OTA file.
Definition: zcl_ota_upgrade.h:136
< new image identification
Definition: zcl_ota_upgrade.h:187
const char * zcl_ota_tag_identifier_str(uint16_t id)
Return a description for an OTA header's Sub-Element Tag.
Definition: zcl_ota_upgrade.c:52
unsigned short uint16_t
16-bit unsigned integer
Definition: platform_config.h:41
< upgrade image identification
Definition: zcl_ota_upgrade.h:231
unsigned char uint8_t
8-bit unsigned integer
Definition: platform_config.h:39
Common sequence of fields appearing in multiple frame formats.
Definition: zcl_ota_upgrade.h:44
< upgrade image identification
Definition: zcl_ota_upgrade.h:209
< new image identification
Definition: zcl_ota_upgrade.h:173
const char * zcl_ota_security_credential_ver_str(uint8_t v)
Return a description for an OTA header's Security Credential Version.
Definition: zcl_ota_upgrade.c:41
Header of sub-elements in OTA Upgrade File following zcl_ota_file_header_t.
Definition: zcl_ota_upgrade.h:109
Typedef used to hold a 64-bit IEEE address, represented as 8 bytes, 4 16-bit values or 2 32-bit value...
Definition: types.h:34
< current image identification
Definition: zcl_ota_upgrade.h:181
#define XBEE_END_DECLS
Macro defined to.
Definition: platform.h:42
const char * zcl_ota_zigbee_stack_ver_str(uint16_t v)
Return a description for an OTA header's Zigbee Stack Version.
Definition: zcl_ota_upgrade.c:29
Macros and structures related to the ZCL datatypes.
Sub-element with the certificate used to generate the OTA file's signature.
Definition: zcl_ota_upgrade.h:129