Bluetooth Mesh Firmware Update Server Model#

Bluetooth Mesh Firmware Update Server Model.

This class provides the commands and messages to interface with the Firmware Update Server model.

The MBT Server must be initialized before the Update Server.

Modules#

sl_btmesh_evt_fw_update_server_check_fw_metadata_req

sl_btmesh_evt_fw_update_server_update_start_req

sl_btmesh_evt_fw_update_server_verify_fw_req

sl_btmesh_evt_fw_update_server_apply

sl_btmesh_evt_fw_update_server_update_cancelled

sl_btmesh_evt_fw_update_server_distributor_self_update_req

Enumerations#

enum
sl_btmesh_fw_update_server_update_phase_idle = 0x0
sl_btmesh_fw_update_server_update_phase_transfer_error = 0x1
sl_btmesh_fw_update_server_update_phase_transfer_in_progress = 0x2
sl_btmesh_fw_update_server_update_phase_verifying_update = 0x3
sl_btmesh_fw_update_server_update_phase_verification_success = 0x4
sl_btmesh_fw_update_server_update_phase_verification_failed = 0x5
sl_btmesh_fw_update_server_update_phase_apply_in_progress = 0x6
}

The Update Phase of the Firmware Update Server.

enum
sl_btmesh_fw_update_server_update_status_success = 0x0
sl_btmesh_fw_update_server_update_status_out_of_resources = 0x1
sl_btmesh_fw_update_server_update_status_wrong_phase = 0x2
sl_btmesh_fw_update_server_update_status_internal_error = 0x3
sl_btmesh_fw_update_server_update_status_wrong_fw_index = 0x4
sl_btmesh_fw_update_server_update_status_metadata_check_failed = 0x5
sl_btmesh_fw_update_server_update_status_temporarily_unable = 0x6
sl_btmesh_fw_update_server_update_status_blob_transfer_busy = 0x7
}

Status codes reported by the Firmware Update Server.

enum
sl_btmesh_fw_update_server_update_start_response_type_accept = 0x0
sl_btmesh_fw_update_server_update_start_response_type_fw_already_exists = 0x1
sl_btmesh_fw_update_server_update_start_response_type_reject_out_of_resources = 0x2
sl_btmesh_fw_update_server_update_start_response_type_reject_internal_error = 0x3
sl_btmesh_fw_update_server_update_start_response_type_reject_metadata_check_failed = 0x4
sl_btmesh_fw_update_server_update_start_response_type_reject_temporarily_unable = 0x5
}

Used by the implementation to accept or reject the image and select the status code reported by the Firmware Update Server.

Functions#

sl_status_t
sl_btmesh_fw_update_server_init(uint16_t elem_index, uint8_t num_installed_fw, uint8_t max_metadata_len)
sl_status_t
sl_status_t
sl_btmesh_fw_update_server_check_fw_metadata_rsp(uint16_t elem_index, uint8_t response_type, uint8_t additional_information, uint8_t fw_index)
sl_status_t
sl_btmesh_fw_update_server_update_start_rsp(uint16_t elem_index, uint8_t response_type, uint8_t additional_information)
sl_status_t
sl_btmesh_fw_update_server_verify_fw_rsp(uint16_t elem_index, uint8_t accept)
sl_status_t
sl_btmesh_fw_update_server_distributor_self_update_rsp(uint16_t elem_index, uint8_t response_type, uint8_t additional_information)

Enumeration Documentation#

sl_btmesh_fw_update_server_update_phase_t#

sl_btmesh_fw_update_server_update_phase_t

The Update Phase of the Firmware Update Server.

Enumerator
sl_btmesh_fw_update_server_update_phase_idle

(0x0) No firmware transfer is in progress.

sl_btmesh_fw_update_server_update_phase_transfer_error

(0x1) Error occurred during firmware image BLOB transfer.

sl_btmesh_fw_update_server_update_phase_transfer_in_progress

(0x2) Firmware image BLOB transfer is in progress.

sl_btmesh_fw_update_server_update_phase_verifying_update

(0x3) Firmware image transfer completed, and the node is verifying the image.

sl_btmesh_fw_update_server_update_phase_verification_success

(0x4) Firmware image verification succeeded.

sl_btmesh_fw_update_server_update_phase_verification_failed

(0x5) Firmware image verification failed.

sl_btmesh_fw_update_server_update_phase_apply_in_progress

(0x6) The node is applying the firmware image.


Definition at line 15636 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_fw_update_server_update_status_t#

sl_btmesh_fw_update_server_update_status_t

Status codes reported by the Firmware Update Server.

Enumerator
sl_btmesh_fw_update_server_update_status_success

(0x0) The message was processed successfully.

sl_btmesh_fw_update_server_update_status_out_of_resources

(0x1) Insufficient resources on the node.

sl_btmesh_fw_update_server_update_status_wrong_phase

(0x2) The operation cannot be performed while the server is in the current phase.

sl_btmesh_fw_update_server_update_status_internal_error

(0x3) An internal error occurred on the node.

sl_btmesh_fw_update_server_update_status_wrong_fw_index

(0x4) The message contained a firmware index value that is not expected.

sl_btmesh_fw_update_server_update_status_metadata_check_failed

(0x5) The firmware metadata check failed.

sl_btmesh_fw_update_server_update_status_temporarily_unable

(0x6) The server cannot start a firmware update right now.

sl_btmesh_fw_update_server_update_status_blob_transfer_busy

(0x7) The local MBT Server model is busy with another BLOB transfer.


Definition at line 15701 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_fw_update_server_update_start_response_type_t#

sl_btmesh_fw_update_server_update_start_response_type_t

Used by the implementation to accept or reject the image and select the status code reported by the Firmware Update Server.

Enumerator
sl_btmesh_fw_update_server_update_start_response_type_accept

(0x0) Accept; the MBT Server will start receiving the image.

sl_btmesh_fw_update_server_update_start_response_type_fw_already_exists

(0x1) Accept; the MBT Server will not start receiving the image, as the image has already been received.

sl_btmesh_fw_update_server_update_start_response_type_reject_out_of_resources

(0x2) Reject; insufficient resources on the node.

sl_btmesh_fw_update_server_update_start_response_type_reject_internal_error

(0x3) Reject; An internal error occurred on the node.

sl_btmesh_fw_update_server_update_start_response_type_reject_metadata_check_failed

(0x4) Reject; the firmware metadata indicated that the image is not suitable for this node.

sl_btmesh_fw_update_server_update_start_response_type_reject_temporarily_unable

(0x5) Reject; The server cannot start a firmware update right now.


Definition at line 15791 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

Function Documentation#

sl_btmesh_fw_update_server_init#

sl_status_t sl_btmesh_fw_update_server_init (uint16_t elem_index, uint8_t num_installed_fw, uint8_t max_metadata_len)
Parameters
[in]elem_index

Server model element index

[in]num_installed_fw

Number of installed FWs

[in]max_metadata_len

Maximum length of metadata supported. Any request with a larger metadata value will be rejected automatically.

Initializes the Firmware Update Server model.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 16051 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_fw_update_server_deinit#

sl_status_t sl_btmesh_fw_update_server_deinit (uint16_t elem_index)
Parameters
[in]elem_index

Server model element index

Deinitializes the Firmware Update Server model.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 16064 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_fw_update_server_check_fw_metadata_rsp#

sl_status_t sl_btmesh_fw_update_server_check_fw_metadata_rsp (uint16_t elem_index, uint8_t response_type, uint8_t additional_information, uint8_t fw_index)
Parameters
[in]elem_index

Server model element index

[in]response_type

Enum sl_btmesh_fw_update_server_update_start_response_type_t. The status code to indicate to the client.

[in]additional_information

Enum sl_btmesh_fw_update_client_additional_info_t. Additional information about what will happen to the node after the update is applied. 0 = no changes to DCD; 1 = DCD will change but Composition Data Refresh is not supported; 2 = DCD change and Composition Data Refresh is supported; 3 = node will become unprovisioned.

[in]fw_index

Index of the firmware to be updated.

Response for the sl_btmesh_evt_fw_update_server_check_fw_metadata_req event. Report whether a server can accept a firmware update.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 16086 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_fw_update_server_update_start_rsp#

sl_status_t sl_btmesh_fw_update_server_update_start_rsp (uint16_t elem_index, uint8_t response_type, uint8_t additional_information)
Parameters
[in]elem_index

Server model element index

[in]response_type

Enum sl_btmesh_fw_update_server_update_start_response_type_t. Accept or reject the image.

[in]additional_information

Enum sl_btmesh_fw_update_client_additional_info_t. Additional information about what will happen to the node after the update is applied. 0 = no changes to DCD; 1 = DCD will change but Composition Data Refresh is not supported; 2 = DCD change and Composition Data Refresh is supported; 3 = node will become unprovisioned.

Response for the sl_btmesh_evt_fw_update_server_update_start_req event. After the firmware BLOB Transfer reception is complete, the event sl_btmesh_evt_fw_update_server_verify_fw_req will be generated.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16114 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_fw_update_server_verify_fw_rsp#

sl_status_t sl_btmesh_fw_update_server_verify_fw_rsp (uint16_t elem_index, uint8_t accept)
Parameters
[in]elem_index

Server model element index

[in]accept

0 to reject the firmware image, nonzero to accept. If rejected, the server will indicate verification failure to the client when queried. If accepted, the server will wait for an apply command from the client.

Response for the sl_btmesh_evt_fw_update_server_verify_fw_req event. If the image was accepted, the event sl_btmesh_evt_fw_update_server_apply will be generated when the Update Client asks the node to apply the new firmware and reboot.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16137 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_fw_update_server_distributor_self_update_rsp#

sl_status_t sl_btmesh_fw_update_server_distributor_self_update_rsp (uint16_t elem_index, uint8_t response_type, uint8_t additional_information)
Parameters
[in]elem_index

Server model element index

[in]response_type

Enum sl_btmesh_fw_update_server_update_start_response_type_t. Accept or reject the image.

[in]additional_information

Enum sl_btmesh_fw_update_client_additional_info_t. Additional information about what will happen to the node after the update is applied. 0 = no changes to DCD; 1 = DCD will change but Composition Data Refresh is not supported; 2 = DCD change and Composition Data Refresh is supported; 3 = node will become unprovisioned.

Response for the sl_btmesh_evt_fw_update_server_distributor_self_update_req event. This command can only be used if both Distribution Server and Update Server functionality are used on the same node. If the self-update is accepted, the event sl_btmesh_evt_fw_update_server_verify_fw_req will be generated to confirm that the firmware image passed the application-specific checks, just like in a regular update.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16167 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

Macro Definition Documentation#

sl_btmesh_cmd_fw_update_server_init_id#

#define sl_btmesh_cmd_fw_update_server_init_id
Value:
0x00570028

Definition at line 15620 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_fw_update_server_deinit_id#

#define sl_btmesh_cmd_fw_update_server_deinit_id
Value:
0x01570028

Definition at line 15621 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_fw_update_server_check_fw_metadata_rsp_id#

#define sl_btmesh_cmd_fw_update_server_check_fw_metadata_rsp_id
Value:
0x02570028

Definition at line 15622 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_fw_update_server_update_start_rsp_id#

#define sl_btmesh_cmd_fw_update_server_update_start_rsp_id
Value:
0x03570028

Definition at line 15623 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_fw_update_server_verify_fw_rsp_id#

#define sl_btmesh_cmd_fw_update_server_verify_fw_rsp_id
Value:
0x04570028

Definition at line 15624 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_fw_update_server_distributor_self_update_rsp_id#

#define sl_btmesh_cmd_fw_update_server_distributor_self_update_rsp_id
Value:
0x05570028

Definition at line 15625 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_fw_update_server_init_id#

#define sl_btmesh_rsp_fw_update_server_init_id
Value:
0x00570028

Definition at line 15626 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_fw_update_server_deinit_id#

#define sl_btmesh_rsp_fw_update_server_deinit_id
Value:
0x01570028

Definition at line 15627 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_fw_update_server_check_fw_metadata_rsp_id#

#define sl_btmesh_rsp_fw_update_server_check_fw_metadata_rsp_id
Value:
0x02570028

Definition at line 15628 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_fw_update_server_update_start_rsp_id#

#define sl_btmesh_rsp_fw_update_server_update_start_rsp_id
Value:
0x03570028

Definition at line 15629 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_fw_update_server_verify_fw_rsp_id#

#define sl_btmesh_rsp_fw_update_server_verify_fw_rsp_id
Value:
0x04570028

Definition at line 15630 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_fw_update_server_distributor_self_update_rsp_id#

#define sl_btmesh_rsp_fw_update_server_distributor_self_update_rsp_id
Value:
0x05570028

Definition at line 15631 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h