CommunicationComponents

Description

Host communication interface.

The Communication component provides an interface for implementing communication with a host device, such as a computer or a microcontroller.

Communication Protocol Implementations

Several components implement the communication interface, using different transports and protocols.

Bluetooth Apploader OTA DFU

By enabling the Apploader communication component, the bootloader communication interface implements Bluetooth Apploader over-the-air (OTA) device firmware upgrade (DFU) protocol.

BGAPI UART DFU

By enabling the BGAPI communication component, the bootloader communication interface implements the UART DFU protocol using BGAPI commands. This component makes the bootloader compatible with the legacy UART bootloader that was previously released with the Silicon Labs Bluetooth stack.

EZSP-SPI

By enabling the EZSP-SPI communication component, the bootloader communication interface implements the EZSP protocol over SPI. This component makes the bootloader compatible with the legacy ezsp-spi-bootloader that was previously released with the EmberZnet and SL-Thread wireless stacks.

UART XMODEM

By enabling the UART XMODEM communication component, the bootloader communication interface implements the XMODEM-CRC protocol over UART. This component makes the bootloader compatible with the legacy serial-uart-bootloader that was previously released with the EmberZnet and SL-Thread wireless stacks.

Modules

Utils

Functions

void bootloader_apploader_communication_init (void)
int32_t bootloader_apploader_communication_start (void)
int32_t bootloader_apploader_communication_main ( ImageProperties_t *imageProps, ParserContext_t *parserContext, DecryptContext_t *decryptContext, AuthContext_t *authContext, const BootloaderParserCallbacks_t *parseCb)
void bootloader_bgapi_communication_init (void)
int32_t bootloader_bgapi_communication_start (void)
int32_t bootloader_bgapi_communication_main ( ImageProperties_t *imageProps, ParserContext_t *parserContext, const BootloaderParserCallbacks_t *parseCb)
void communication_init (void)
int32_t communication_start (void)
int32_t communication_main (void)
void communication_shutdown (void)
void bootloader_ezsp_communication_init (void)
int32_t bootloader_ezsp_communication_start (void)
int32_t bootloader_ezsp_communication_main ( ImageProperties_t *imageProps, ParserContext_t *parserContext, const BootloaderParserCallbacks_t *parseCb)
void bootloader_ezsp_communication_shutdown (void)
void bootloader_xmodem_communication_init (void)
int32_t bootloader_xmodem_communication_start (void)
int32_t bootloader_xmodem_communication_main ( ImageProperties_t *imageProps, const BootloaderParserCallbacks_t *parseCb)

Function Documentation

void bootloader_apploader_communication_init ( void )

Initialize hardware for the BLE Apploader OTA DFU Bootloader communication.

int32_t bootloader_apploader_communication_start ( void )

Initialize communication between the BLE Apploader OTA DFU bootloader and external host.

Returns
Error code indicating success or failure.
int32_t bootloader_apploader_communication_main ( ImageProperties_t * imageProps,
ParserContext_t * parserContext,
DecryptContext_t * decryptContext,
AuthContext_t * authContext,
const BootloaderParserCallbacks_t * parseCb
)

Communication main for the BLE Apploader OTA DFU bootloader.

Parameters
imageProps The image file processed
parserContext Image parser context
decryptContext Image decryption context
authContext Image authentication context
parseCb Bootloader parser callbacks
Returns
Error code indicating success or failure.
void bootloader_bgapi_communication_init ( void )

Initialize hardware for the BGAPI UART DFU Bootloader communication.

int32_t bootloader_bgapi_communication_start ( void )

Initialize communication between the BGAPI UART DFU bootloader and external host.

Returns
Error code indicating success or failure.
int32_t bootloader_bgapi_communication_main ( ImageProperties_t * imageProps,
ParserContext_t * parserContext,
const BootloaderParserCallbacks_t * parseCb
)

Communication main for the BGAPI UART DFU bootloader.

Parameters
imageProps The image file processed
parserContext Image parser context
parseCb Bootloader parser callbacks
Returns
Error code indicating success or failure.
void communication_init ( void )

Initialize hardware for the communication component.

int32_t communication_start ( void )

Initialize communication between the bootloader and external host. For example, indicate that all is well to the external host.

Returns
Error code indicating success or failure
Return values
BOOTLOADER_OK on success
BOOTLOADER_ERROR_COMMUNICATION_START on failure
int32_t communication_main ( void )

Not supposed to return until either the host signals the end of the current session or a new image has been flashed and verified.

Returns
Error code indicating success or failure
Return values
BOOTLOADER_OK when a new image was flashed
BOOTLOADER_ERROR_COMMUNICATION_ERROR on communication error
BOOTLOADER_ERROR_COMMUNICATION_DONE when no image was received
BOOTLOADER_ERROR_COMMUNICATION_IMAGE_ERROR when received image is invalid
void communication_shutdown ( void )

Stop communication between the bootloader and external host.

void bootloader_ezsp_communication_init ( void )

Initialize hardware for the EZSP SPI Bootloader communication.

int32_t bootloader_ezsp_communication_start ( void )

Initialize communication between the EZSP SPI bootloader and external host.

Returns
Error code indicating success or failure.
int32_t bootloader_ezsp_communication_main ( ImageProperties_t * imageProps,
ParserContext_t * parserContext,
const BootloaderParserCallbacks_t * parseCb
)

Communication main for the EZSP SPI bootloader.

Parameters
imageProps The image file processed
parserContext Image parser context
parseCb Bootloader parser callbacks
Returns
Error code indicating success or failure.
void bootloader_ezsp_communication_shutdown ( void )

Stop communication between the bootloader and external host.

void bootloader_xmodem_communication_init ( void )

Initialize hardware for the UART XMODEM Bootloader communication.

int32_t bootloader_xmodem_communication_start ( void )

Initialize communication between the UART XMODEM bootloader and external host.

Returns
Error code indicating success or failure.
int32_t bootloader_xmodem_communication_main ( ImageProperties_t * imageProps,
const BootloaderParserCallbacks_t * parseCb
)

Communication main for the UART XMODEM bootloader.

Parameters
imageProps The image file processed
parseCb Bootloader parser callbacks
Returns
Error code indicating success or failure.