9.4.6.1 Application Development
Compile MCC auto generated project
- Compile the MCC auto generated project as below
- Addressing the mandatory error (if not already done): User action required in app_user_edits.c. Follow the steps mentioned in the note and do the necessary changes. Then comment the #error message as below.
Some configurations of interest in \zigbee\zigbee_device\configs\otauConfig.h
Interval between block requests. This decides the firmware upgrade speed. If the interval is more, then the upgrade will take longer time.
#define ZCL_OTAU_DEFAULT_BLOCK_REQ_PERIOD 1000
AES Key and Init Vector. This is used to decrypting the upgradable image which is encrypted. The key used to encrypt the upgradable image should match with this key value.
#define OTA_IMAGE_CBC_KEY {0x01, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x90, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44}
#define OTA_IMAGE_CBC_IV {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
The current running image checks the version of new image against to this configuration value and expects the new image version is not same as this value.
#define CS_ZCL_OTAU_FILE_VERSION 0X50030700//CS_STACK_VERSION_VALUE
This configuration is image Type and running image checks the upgradable image type against to this value. If the upgradable image type matches to this configuration value or 0xFFFF, only then upgrade happens.
#define OTAU_APP_IMAGE_TYPE OTA_EXTENDED_COLOR_LIGHT_IMAGE_TYPE