Modules#

Bluetooth Apploader OTA DFU

UART XMODEM

BGAPI UART DFU

EZSP-SPI

Utils

Communication#

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.

Functions#

void

Initialize hardware for the BLE Apploader OTA DFU Bootloader communication.

int32_t

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

int32_t
bootloader_apploader_communication_main(ImageProperties_t *imageProps, void *parserContext, void *decryptContext, void *authContext, const BootloaderParserCallbacks_t *parseCb)

Communication main for the BLE Apploader OTA DFU bootloader.

void
bootloader_apploader_get_custom_device_address(sl_apploader_address_t *btAddress)

Get custom device address.

void

Initialize hardware for the UART XMODEM Bootloader communication.

int32_t

Initialize communication between the UART XMODEM bootloader and external host.

int32_t
bootloader_xmodem_communication_main(ImageProperties_t *imageProps, const BootloaderParserCallbacks_t *parseCb)

Communication main for the UART XMODEM bootloader.

void

Initialize hardware for the BGAPI UART DFU Bootloader communication.

int32_t

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

int32_t
bootloader_bgapi_communication_main(ImageProperties_t *imageProps, ParserContext_t *parserContext, const BootloaderParserCallbacks_t *parseCb)

Communication main for the BGAPI UART DFU bootloader.

void

Initialize hardware for the communication component.

int32_t

Initialize communication between the bootloader and external host.

int32_t

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

void

Stop communication between the bootloader and external host.

void

Initialize hardware for the EZSP SPI Bootloader communication.

int32_t

Initialize communication between the EZSP SPI bootloader and external host.

int32_t
bootloader_ezsp_communication_main(ImageProperties_t *imageProps, ParserContext_t *parserContext, const BootloaderParserCallbacks_t *parseCb)

Communication main for the EZSP SPI bootloader.

void

Stop communication between the bootloader and external host.

Function Documentation#

bootloader_apploader_communication_init#

void bootloader_apploader_communication_init (void )

Initialize hardware for the BLE Apploader OTA DFU Bootloader communication.

Parameters
N/A

Definition at line 50 of file platform/bootloader/communication/apploader/btl_apploader.h

bootloader_apploader_communication_start#

int32_t bootloader_apploader_communication_start (void )

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

Parameters
N/A

Returns

  • Error code indicating success or failure.


Definition at line 58 of file platform/bootloader/communication/apploader/btl_apploader.h

bootloader_apploader_communication_main#

int32_t bootloader_apploader_communication_main (ImageProperties_t * imageProps, void * parserContext, void * decryptContext, void * authContext, const BootloaderParserCallbacks_t * parseCb)

Communication main for the BLE Apploader OTA DFU bootloader.

Parameters
N/AimageProps

The image file processed

N/AparserContext

Image parser context

N/AdecryptContext

Image decryption context

N/AauthContext

Image authentication context

N/AparseCb

Bootloader parser callbacks

Returns

  • Error code indicating success or failure.


Definition at line 71 of file platform/bootloader/communication/apploader/btl_apploader.h

bootloader_apploader_get_custom_device_address#

void bootloader_apploader_get_custom_device_address (sl_apploader_address_t * btAddress)

Get custom device address.

Parameters
N/AbtAddress

Device address

The address must be set in little endian format Default implementation of this function reads the address from MFG_CUSTOM_EUI_64 manufacturing token stored in user data page. The function can be overridden if custom implementation is wanted.


Definition at line 85 of file platform/bootloader/communication/apploader/btl_apploader.h

bootloader_xmodem_communication_init#

void bootloader_xmodem_communication_init (void )

Initialize hardware for the UART XMODEM Bootloader communication.

Parameters
N/A

Definition at line 72 of file platform/bootloader/communication/xmodem-uart/btl_comm_xmodem.h

bootloader_xmodem_communication_start#

int32_t bootloader_xmodem_communication_start (void )

Initialize communication between the UART XMODEM bootloader and external host.

Parameters
N/A

Returns

  • Error code indicating success or failure.


Definition at line 80 of file platform/bootloader/communication/xmodem-uart/btl_comm_xmodem.h

bootloader_xmodem_communication_main#

int32_t bootloader_xmodem_communication_main (ImageProperties_t * imageProps, const BootloaderParserCallbacks_t * parseCb)

Communication main for the UART XMODEM bootloader.

Parameters
N/AimageProps

The image file processed

N/AparseCb

Bootloader parser callbacks

Returns

  • Error code indicating success or failure.


Definition at line 90 of file platform/bootloader/communication/xmodem-uart/btl_comm_xmodem.h

bootloader_bgapi_communication_init#

void bootloader_bgapi_communication_init (void )

Initialize hardware for the BGAPI UART DFU Bootloader communication.

Parameters
N/A

Definition at line 159 of file platform/bootloader/communication/bgapi-uart-dfu/btl_comm_bgapi.h

bootloader_bgapi_communication_start#

int32_t bootloader_bgapi_communication_start (void )

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

Parameters
N/A

Returns

  • Error code indicating success or failure.


Definition at line 167 of file platform/bootloader/communication/bgapi-uart-dfu/btl_comm_bgapi.h

bootloader_bgapi_communication_main#

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
N/AimageProps

The image file processed

N/AparserContext

Image parser context

N/AparseCb

Bootloader parser callbacks

Returns

  • Error code indicating success or failure.


Definition at line 178 of file platform/bootloader/communication/bgapi-uart-dfu/btl_comm_bgapi.h

communication_init#

void communication_init (void )

Initialize hardware for the communication component.

Parameters
N/A

Definition at line 41 of file platform/bootloader/communication/btl_communication.h

communication_start#

int32_t communication_start (void )

Initialize communication between the bootloader and external host.

Parameters
N/A

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


Definition at line 51 of file platform/bootloader/communication/btl_communication.h

communication_main#

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.

Parameters
N/A

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


Definition at line 64 of file platform/bootloader/communication/btl_communication.h

communication_shutdown#

void communication_shutdown (void )

Stop communication between the bootloader and external host.

Parameters
N/A

Definition at line 69 of file platform/bootloader/communication/btl_communication.h

bootloader_ezsp_communication_init#

void bootloader_ezsp_communication_init (void )

Initialize hardware for the EZSP SPI Bootloader communication.

Parameters
N/A

Definition at line 197 of file platform/bootloader/communication/ezsp-spi/btl_ezsp_spi.h

bootloader_ezsp_communication_start#

int32_t bootloader_ezsp_communication_start (void )

Initialize communication between the EZSP SPI bootloader and external host.

Parameters
N/A

Returns

  • Error code indicating success or failure.


Definition at line 205 of file platform/bootloader/communication/ezsp-spi/btl_ezsp_spi.h

bootloader_ezsp_communication_main#

int32_t bootloader_ezsp_communication_main (ImageProperties_t * imageProps, ParserContext_t * parserContext, const BootloaderParserCallbacks_t * parseCb)

Communication main for the EZSP SPI bootloader.

Parameters
N/AimageProps

The image file processed

N/AparserContext

Image parser context

N/AparseCb

Bootloader parser callbacks

Returns

  • Error code indicating success or failure.


Definition at line 216 of file platform/bootloader/communication/ezsp-spi/btl_ezsp_spi.h

bootloader_ezsp_communication_shutdown#

void bootloader_ezsp_communication_shutdown (void )

Stop communication between the bootloader and external host.

Parameters
N/A

Definition at line 223 of file platform/bootloader/communication/ezsp-spi/btl_ezsp_spi.h