Standalone Bootloader Common#
API and Callbacks for the Standalone Bootloader Common Component.
Code common to both the client and server of the Silicon Labs standalone bootload protocol.
Modules#
API#
uint8_t
sl_zigbee_af_standalone_bootloader_common_make_header(uint8_t *message, uint8_t type)
Make bootloader header.
sl_zigbee_af_standalone_bootloader_common_send_message(bool isBroadcast, sl_802154_long_addr_t targetEui, uint8_t length, uint8_t *message)
Send message.
bool
sl_zigbee_af_standalone_bootloader_common_check_incoming_message(uint8_t length, uint8_t *message)
Check incoming message.
Macros#
#define
BOOTLOAD_OTA_SIZE 64
#define
MAX_BOOTLOAD_MESSAGE_SIZE (BOOTLOAD_OTA_SIZE + 6)
#define
BOOTLOAD_PROTOCOL_VERSION 1
#define
CHALLENGE_REQUEST_VERSION 0x01
#define
BOOTLOAD_MESSAGE_OVERHEAD 2
#define
OFFSET_VERSION 0
#define
OFFSET_MESSAGE_TYPE 1
#define
OFFSET_DEVICE_TYPE 2
#define
OFFSET_BLOCK_NUMBER 2
#define
OFFSET_ERROR_TYPE 2
#define
OFFSET_BLOCK_NUMBER_CHECK 3
#define
OFFSET_ERROR_BLOCK 3
#define
OFFSET_IMAGE_CONTENT 4
#define
QUERY_RESPONSE_LENGTH (BOOTLOAD_MESSAGE_OVERHEAD + 11)
#define
QRESP_OFFSET_BL_ACTIVE 2
#define
QRESP_OFFSET_MFG_ID 3
#define
QRESP_OFFSET_HARDWARE_TAG 5
#define
QRESP_OFFSET_BL_CAPS 21
#define
QRESP_OFFSET_PLATFORM 22
#define
QRESP_OFFSET_MICRO 23
#define
QRESP_OFFSET_PHY 24
#define
QRESP_OFFSET_BL_VERSION 25
#define
OFFSET_MFG_ID 2
#define
OFFSET_HARDWARE_TAG 4
#define
OFFSET_AUTH_CHALLENGE 2
#define
OFFSET_AUTH_RESPONSE 2
#define
XMODEM_QUERY 0x51
#define
XMODEM_QRESP 0x52
#define
XMODEM_CC 0x03
#define
XMODEM_LAUNCH_REQUEST 0x4c
#define
XMODEM_AUTH_CHALLENGE 0x63
#define
XMODEM_AUTH_RESPONSE 0x72
#define
BOOTLOAD_AUTH_COMMON_SIZE 16
#define
BOOTLOAD_AUTH_CHALLENGE_SIZE BOOTLOAD_AUTH_COMMON_SIZE
#define
BOOTLOAD_AUTH_RESPONSE_SIZE BOOTLOAD_AUTH_COMMON_SIZE
#define
QUERY_REQUEST_LENGTH (BOOTLOAD_MESSAGE_OVERHEAD)
#define
LAUNCH_REQUEST_LENGTH (BOOTLOAD_MESSAGE_OVERHEAD + 18)
#define
XMODEM_AUTH_CHALLENGE_LENGTH (BOOTLOAD_MESSAGE_OVERHEAD + 15)
#define
XMODEM_AUTH_CHALLENGE_REQUEST_INDEX (BOOTLOAD_MESSAGE_OVERHEAD)
#define
XMODEM_AUTH_RESPONSE_LENGTH (BOOTLOAD_MESSAGE_OVERHEAD + 16)
#define
bootloadPrintln (...)
#define
bootloadPrint (...)
API Documentation#
sl_zigbee_af_standalone_bootloader_common_make_header#
uint8_t sl_zigbee_af_standalone_bootloader_common_make_header (uint8_t * message, uint8_t type)
Make bootloader header.
Parameters
N/A | message | Ver.: always |
N/A | type | Ver.: always |
Returns
unit8_t
Definition at line
147
of file app/framework/plugin/standalone-bootloader-common/bootloader-protocol.h
sl_zigbee_af_standalone_bootloader_common_send_message#
sl_status_t sl_zigbee_af_standalone_bootloader_common_send_message (bool isBroadcast, sl_802154_long_addr_t targetEui, uint8_t length, uint8_t * message)
Send message.
Parameters
N/A | isBroadcast | Ver.: always |
N/A | targetEui | Ver.: always |
N/A | length | Ver.: always |
N/A | message | Ver.: always |
Returns
sl_status_t status code
Definition at line
159
of file app/framework/plugin/standalone-bootloader-common/bootloader-protocol.h
sl_zigbee_af_standalone_bootloader_common_check_incoming_message#
bool sl_zigbee_af_standalone_bootloader_common_check_incoming_message (uint8_t length, uint8_t * message)
Check incoming message.
Parameters
N/A | length | Ver.: always |
N/A | message | Ver.: always |
Returns
bool true is success
Definition at line
172
of file app/framework/plugin/standalone-bootloader-common/bootloader-protocol.h