Communication

Description

Host communication interface.

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

Communication Protocol Implementations

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

BGAPI UART DFU

By enabling the BGAPI communication plugin, the bootloader communication interface implements the UART DFU protocol using BGAPI commands. This plugin 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 plugin, the bootloader communication interface implements the EZSP protocol over SPI. This plugin 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 plugin, the bootloader communication interface implements the XMODEM-CRC protocol over UART. This plugin 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 communication_init (void)
int32_t communication_start (void)
int32_t communication_main (void)
void communication_shutdown (void)

Function Documentation

void communication_init ( void )

Initialize hardware for the communication plugin.

int32_t communication_start ( void )

Initialize communication between the bootloader and external host. E.g. indicate to the external host that we're alive and kicking.

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

This function is not supposed to return until the host signals the end of the current session, or a new image has been flashed and verified.

Returns
Error code indicating sucess 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.