OTA Server#

Callbacks for OTA Server Component.

Callbacks#

void
sl_zigbee_af_ota_server_send_upgrade_command_cb(sl_802154_short_addr_t dest, uint8_t endpoint, const sl_zigbee_af_ota_image_id_t *id)

Called via 'ota-server upgrade' CLI command or direct call when the server needs to send an upgrade command.

void
sl_zigbee_af_ota_server_block_sent_cb(uint8_t actualLength, uint16_t manufacturerId, uint16_t imageTypeId, uint32_t firmwareVersion)

Called when a block is sent to a device.

void
sl_zigbee_af_ota_server_update_started_cb(uint16_t manufacturerId, uint16_t imageTypeId, uint32_t firmwareVersion, uint8_t maxDataSize, uint32_t offset)

Called when an update has started.

void
sl_zigbee_af_ota_server_update_complete_cb(uint16_t manufacturerId, uint16_t imageTypeId, uint32_t firmwareVersion, sl_802154_short_addr_t source, uint8_t status)

Called when an OTA update has finished.

Callbacks Documentation#

sl_zigbee_af_ota_server_send_upgrade_command_cb#

void sl_zigbee_af_ota_server_send_upgrade_command_cb (sl_802154_short_addr_t dest, uint8_t endpoint, const sl_zigbee_af_ota_image_id_t * id)

Called via 'ota-server upgrade' CLI command or direct call when the server needs to send an upgrade command.

Parameters
TypeDirectionArgument NameDescription
sl_802154_short_addr_t[out]dest

The destination node ID.

uint8_t[out]endpoint

The destination endpoint.

const sl_zigbee_af_ota_image_id_t *[out]id

The identifier that contains information about the upgrade image.

The application must call this function to send an upgrade end response and complete the OTA.


sl_zigbee_af_ota_server_block_sent_cb#

void sl_zigbee_af_ota_server_block_sent_cb (uint8_t actualLength, uint16_t manufacturerId, uint16_t imageTypeId, uint32_t firmwareVersion)

Called when a block is sent to a device.

Parameters
TypeDirectionArgument NameDescription
uint8_t[out]actualLength

The block length.

uint16_t[out]manufacturerId

The manufacturer ID.

uint16_t[out]imageTypeId

The image Type ID.

uint32_t[out]firmwareVersion

Firmware Version.

This function will be called when a block is sent to a device.


sl_zigbee_af_ota_server_update_started_cb#

void sl_zigbee_af_ota_server_update_started_cb (uint16_t manufacturerId, uint16_t imageTypeId, uint32_t firmwareVersion, uint8_t maxDataSize, uint32_t offset)

Called when an update has started.

Parameters
TypeDirectionArgument NameDescription
uint16_t[out]manufacturerId

The manufacturer ID.

uint16_t[out]imageTypeId

The image Type ID.

uint32_t[out]firmwareVersion

Firmware Version.

uint8_t[out]maxDataSize

Maximum data size.

uint32_t[out]offset

Offset.

This function will be called when an update has started.


sl_zigbee_af_ota_server_update_complete_cb#

void sl_zigbee_af_ota_server_update_complete_cb (uint16_t manufacturerId, uint16_t imageTypeId, uint32_t firmwareVersion, sl_802154_short_addr_t source, uint8_t status)

Called when an OTA update has finished.

Parameters
TypeDirectionArgument NameDescription
uint16_t[out]manufacturerId

The manufacturer ID.

uint16_t[out]imageTypeId

The image Type ID.

uint32_t[out]firmwareVersion

Firmware Version.

sl_802154_short_addr_t[out]source

The source node ID.

uint8_t[out]status

An update status.

This function will be called when an OTA update has finished.