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#

enum
sl_btmesh_fw_update_client_additional_info_none = 0x0
sl_btmesh_fw_update_client_additional_info_dcd_change_no_rp = 0x1
sl_btmesh_fw_update_client_additional_info_dcd_change_rp_supported = 0x2
sl_btmesh_fw_update_client_additional_info_unprovisioned_after_update = 0x3
}

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#

sl_status_t
sl_btmesh_fw_update_client_init(uint16_t elem_index)
sl_status_t
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)
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)
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)
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)
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)
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)

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.


Definition at line 12999 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[in]elem_index

Client model element index

Initialize the Firmware Update Client model.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 13224 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[in]elem_index

Client model element index

Deinitialize the Firmware Update Client model.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 13235 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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


Definition at line 13263 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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


Definition at line 13292 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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 metadata

[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


Definition at line 13330 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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


Definition at line 13364 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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


Definition at line 13391 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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 metadata

[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


Definition at line 13423 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x004a0028

Definition at line 12975 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x014a0028

Definition at line 12976 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x084a0028

Definition at line 12977 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x094a0028

Definition at line 12978 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x0a4a0028

Definition at line 12979 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x0b4a0028

Definition at line 12980 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x0c4a0028

Definition at line 12981 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x0d4a0028

Definition at line 12982 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x004a0028

Definition at line 12983 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x014a0028

Definition at line 12984 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x084a0028

Definition at line 12985 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x094a0028

Definition at line 12986 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x0a4a0028

Definition at line 12987 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x0b4a0028

Definition at line 12988 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x0c4a0028

Definition at line 12989 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x0d4a0028

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