Bluetooth Mesh Firmware Update Client Model#
Bluetooth Mesh Firmware Update Client Model.
This class provides the commands and messages to interface with the Firmware Update Client model.
If Firmware Distribution Server is used only the sl_btmesh_fw_update_client_init function shall be called as all of the other functions are called by the Distribution Server inside the BT Mesh stack automatically.
The MBT Client must be initialized before the Update Client.
Modules#
sl_btmesh_evt_fw_update_client_info_status_current_fwid
sl_btmesh_evt_fw_update_client_info_status_update_uri
sl_btmesh_evt_fw_update_client_update_status
sl_btmesh_evt_fw_update_client_metadata_status
Enumerations#
The Additional Information value for the firmware update candidate. This value is reported in the Update Server's Metadata Status message, and in the Update Status message if an update is active. This value indicates what will happen to the Target Node after the new firmware is applied successfully and the node is rebooted.
Functions#
Macros#
Enumeration Documentation#
sl_btmesh_fw_update_client_additional_info_t#
sl_btmesh_fw_update_client_additional_info_t
The Additional Information value for the firmware update candidate. This value is reported in the Update Server's Metadata Status message, and in the Update Status message if an update is active. This value indicates what will happen to the Target Node after the new firmware is applied successfully and the node is rebooted.
Enumerator | |
---|---|
sl_btmesh_fw_update_client_additional_info_none | (0x0) No changes to Device Composition Data. |
sl_btmesh_fw_update_client_additional_info_dcd_change_no_rp | (0x1) Device Composition Data will change, but Remote Provisioning, and thus Composition Data Refresh is not supported. The node will need to be re-provisioned to take its new models into use. |
sl_btmesh_fw_update_client_additional_info_dcd_change_rp_supported | (0x2) Device Composition Data will change, and can be refreshed. |
sl_btmesh_fw_update_client_additional_info_unprovisioned_after_update | (0x3) The node will be unprovisioned after the update. |
13077
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_client_init#
sl_status_t sl_btmesh_fw_update_client_init (uint16_t elem_index)
[in] | elem_index | Client model element index |
Initialize the Firmware Update Client model.
Returns
SL_STATUS_OK if successful. Error code otherwise.
13302
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_fw_update_client_deinit#
sl_status_t sl_btmesh_fw_update_client_deinit (uint16_t elem_index)
[in] | elem_index | Client model element index |
Deinitialize the Firmware Update Client model.
Returns
SL_STATUS_OK if successful. Error code otherwise.
13313
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_fw_update_client_get_info#
sl_status_t sl_btmesh_fw_update_client_get_info (uint16_t elem_index, uint16_t dst, uuid_128 virtual_address, uint16_t appkey_index, uint8_t ttl, uint8_t first_index, uint8_t max_entries)
[in] | elem_index | Client model element index |
[in] | dst | Destination address |
[in] | virtual_address | If the destination address is a VA hash, this needs to contain the full virtual address label UUID. Otherwise, the value of this field will be ignored. |
[in] | appkey_index | Application key index to use for encrypting the message. |
[in] | ttl | The time-to-live value to use. Valid values: 0, range:[2-127] and 255. |
[in] | first_index | Index of the first requested entry |
[in] | max_entries | Maximum number of entries |
Query information about the firmware images installed on a node. The received query result is carried in sl_btmesh_evt_fw_update_client_info_status_current_fwid and sl_btmesh_evt_fw_update_client_info_status_update_uri events.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13341
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_fw_update_client_get_update#
sl_status_t sl_btmesh_fw_update_client_get_update (uint16_t elem_index, uint16_t dst, uuid_128 virtual_address, uint16_t appkey_index, uint8_t ttl)
[in] | elem_index | Client model element index |
[in] | dst | Destination address |
[in] | virtual_address | If the destination address is a VA hash, this needs to contain the full virtual address label UUID. Otherwise, the value of this field will be ignored. |
[in] | appkey_index | Application key index to use for encrypting the message. |
[in] | ttl | The time-to-live value to use. Valid values: 0, range:[2-127] and 255. |
Get the current status of the server. sl_btmesh_evt_fw_update_client_update_status is sent as a response.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13370
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_fw_update_client_start_update#
sl_status_t sl_btmesh_fw_update_client_start_update (uint16_t elem_index, uint16_t dst, uuid_128 virtual_address, uint16_t appkey_index, uint8_t ttl, uint8_t update_ttl, uint16_t update_timeout_base, sl_bt_uuid_64_t blob_id, uint8_t fw_index, size_t metadata_len, const uint8_t * metadata)
[in] | elem_index | Client model element index |
[in] | dst | Destination address |
[in] | virtual_address | If the destination address is a VA hash, this needs to contain the full virtual address label UUID. Otherwise, the value of this field will be ignored. |
[in] | appkey_index | Application key index to use for encrypting the message. |
[in] | ttl | The time-to-live value to use for sending this message. Valid values: 0, range:[2-127] and 255. |
[in] | update_ttl | The time-to-live value the node should use when sending its status responses in the firmware image transfer. Valid values: 0, range:[2-127] and 255. |
[in] | update_timeout_base | Update Timeout Base value to inform to the node. |
[in] | blob_id | The BLOB ID of the firmware image that is going to be transferred. |
[in] | fw_index | Index of the firmware on the node to be updated. |
[in] | metadata_len | Length of data in |
[in] | metadata | Metadata associated with the firmware image to be transferred. |
Start a firmware update on a server. sl_btmesh_evt_fw_update_client_update_status is sent as a response.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13408
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_fw_update_client_cancel_update#
sl_status_t sl_btmesh_fw_update_client_cancel_update (uint16_t elem_index, uint16_t dst, uuid_128 virtual_address, uint16_t appkey_index, uint8_t ttl)
[in] | elem_index | Client model element index |
[in] | dst | Destination address |
[in] | virtual_address | If the destination address is a VA hash, this needs to contain the full virtual address label UUID. Otherwise, the value of this field will be ignored. |
[in] | appkey_index | Application key index to use for encrypting the message. |
[in] | ttl | The time-to-live value to use. Valid values: 0, range:[2-127] and 255. |
Cancel a firmware update and delete any stored information about the update on a server. sl_btmesh_evt_fw_update_client_update_status is sent as a response.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13442
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_fw_update_client_apply_update#
sl_status_t sl_btmesh_fw_update_client_apply_update (uint16_t elem_index, uint16_t dst, uuid_128 virtual_address, uint16_t appkey_index, uint8_t ttl)
[in] | elem_index | Client model element index |
[in] | dst | Destination address |
[in] | virtual_address | If the destination address is a VA hash, this needs to contain the full virtual address label UUID. Otherwise, the value of this field will be ignored. |
[in] | appkey_index | Application key index to use for encrypting the message. |
[in] | ttl | The time-to-live value to use. Valid values: 0, range:[2-127] and 255. |
Apply a firmware image that has been transferred to a server. sl_btmesh_evt_fw_update_client_update_status is sent as a response.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13469
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_fw_update_client_check_metadata#
sl_status_t sl_btmesh_fw_update_client_check_metadata (uint16_t elem_index, uint16_t dst, uuid_128 virtual_address, uint16_t appkey_index, uint8_t ttl, uint8_t fw_index, size_t metadata_len, const uint8_t * metadata)
[in] | elem_index | Client model element index |
[in] | dst | Destination address |
[in] | virtual_address | If the destination address is a VA hash, this needs to contain the full virtual address label UUID. Otherwise, the value of this field will be ignored. |
[in] | appkey_index | Application key index to use for encrypting the message. |
[in] | ttl | The time-to-live value to use. Valid values: 0, range:[2-127] and 255. |
[in] | fw_index | Index of the firmware on the node to check the metadata against. |
[in] | metadata_len | Length of data in |
[in] | metadata | Metadata to check. |
Check whether the node can accept a firmware based on the firmware's metadata. sl_btmesh_evt_fw_update_client_metadata_status is sent as a response.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13501
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_client_init_id#
#define sl_btmesh_cmd_fw_update_client_init_idValue:
0x004a0028
13053
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_client_deinit_id#
#define sl_btmesh_cmd_fw_update_client_deinit_idValue:
0x014a0028
13054
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_client_get_info_id#
#define sl_btmesh_cmd_fw_update_client_get_info_idValue:
0x084a0028
13055
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_client_get_update_id#
#define sl_btmesh_cmd_fw_update_client_get_update_idValue:
0x094a0028
13056
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_client_start_update_id#
#define sl_btmesh_cmd_fw_update_client_start_update_idValue:
0x0a4a0028
13057
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_client_cancel_update_id#
#define sl_btmesh_cmd_fw_update_client_cancel_update_idValue:
0x0b4a0028
13058
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_client_apply_update_id#
#define sl_btmesh_cmd_fw_update_client_apply_update_idValue:
0x0c4a0028
13059
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_client_check_metadata_id#
#define sl_btmesh_cmd_fw_update_client_check_metadata_idValue:
0x0d4a0028
13060
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_client_init_id#
#define sl_btmesh_rsp_fw_update_client_init_idValue:
0x004a0028
13061
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_client_deinit_id#
#define sl_btmesh_rsp_fw_update_client_deinit_idValue:
0x014a0028
13062
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_client_get_info_id#
#define sl_btmesh_rsp_fw_update_client_get_info_idValue:
0x084a0028
13063
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_client_get_update_id#
#define sl_btmesh_rsp_fw_update_client_get_update_idValue:
0x094a0028
13064
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_client_start_update_id#
#define sl_btmesh_rsp_fw_update_client_start_update_idValue:
0x0a4a0028
13065
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_client_cancel_update_id#
#define sl_btmesh_rsp_fw_update_client_cancel_update_idValue:
0x0b4a0028
13066
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_client_apply_update_id#
#define sl_btmesh_rsp_fw_update_client_apply_update_idValue:
0x0c4a0028
13067
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_client_check_metadata_id#
#define sl_btmesh_rsp_fw_update_client_check_metadata_idValue:
0x0d4a0028
13068
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h