NCP firmware list cache#

NCP firmware list cache.

These commands can be used to manipulate the Firmware List cache.

This class is only intended for testing and development purposes with an NCP target. The Distributor SoC example application contains a proper implementation of the Firmware List.

The elem_index parameter in all of the commands and events is the element index of the Distribution Server. This class handles firmware deletion automatically as a response to sl_btmesh_evt_fw_dist_server_fw_delete_req and sl_btmesh_evt_fw_dist_server_fw_delete_all_req. Thus, the sl_btmesh_fw_dist_server_delete_rsp and sl_btmesh_fw_dist_server_delete_all_rsp should not be called explicitly. This class handles adding firmware images automatically as a response to sl_btmesh_evt_fw_dist_server_upload_complete. Thus, when an upload completes, sl_btmesh_ncp_fw_list_add_fw does not need to be called.

Modules#

sl_btmesh_evt_ncp_fw_list_fw_deleted

sl_btmesh_evt_ncp_fw_list_fw_all_deleted

sl_btmesh_evt_ncp_fw_list_fw_added

Functions#

sl_status_t
sl_btmesh_ncp_fw_list_init(uint16_t elem_index)
sl_status_t
sl_btmesh_ncp_fw_list_deinit(uint16_t elem_index)
sl_status_t
sl_btmesh_ncp_fw_list_get_fw_info_by_index(uint16_t elem_index, uint16_t index, uint32_t *size, sl_bt_uuid_64_t *blob_id, size_t max_fwid_size, size_t *fwid_len, uint8_t *fwid)
sl_status_t
sl_btmesh_ncp_fw_list_get_fw_metadata_by_index(uint16_t elem_index, uint16_t index, size_t max_metadata_size, size_t *metadata_len, uint8_t *metadata)
sl_status_t
sl_btmesh_ncp_fw_list_add_fw(uint16_t elem_index, uint32_t size, sl_bt_uuid_64_t blob_id, size_t fwid_len, const uint8_t *fwid, uint16_t *fw_list_index)
sl_status_t
sl_btmesh_ncp_fw_list_set_fw_metadata(uint16_t elem_index, uint16_t fw_list_index, size_t metadata_len, const uint8_t *metadata)

Function Documentation#

sl_btmesh_ncp_fw_list_init#

sl_status_t sl_btmesh_ncp_fw_list_init (uint16_t elem_index)
Parameters
[in]elem_index

Distribution Server model element index

Initializes the Firmware List. Before initializing the Firmware List, the Distribution Server model must have been initialized.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

sl_btmesh_ncp_fw_list_deinit#

sl_status_t sl_btmesh_ncp_fw_list_deinit (uint16_t elem_index)
Parameters
[in]elem_index

Distribution Server model element index

Deinitializes the Firmware List.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

sl_btmesh_ncp_fw_list_get_fw_info_by_index#

sl_status_t sl_btmesh_ncp_fw_list_get_fw_info_by_index (uint16_t elem_index, uint16_t index, uint32_t * size, sl_bt_uuid_64_t * blob_id, size_t max_fwid_size, size_t * fwid_len, uint8_t * fwid)
Parameters
[in]elem_index

Server model element index

[in]index

Firmware list index to check

[out]size

Firmware image size

[out]blob_id

BLOB ID that will be used to transmit the image

[in]max_fwid_size

Size of output buffer passed in fwid

[out]fwid_len

On return, set to the length of output data written to fwid

[out]fwid

Firmware ID of the image

Retrieve information about a stored firmware in the Firmware List.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

sl_btmesh_ncp_fw_list_get_fw_metadata_by_index#

sl_status_t sl_btmesh_ncp_fw_list_get_fw_metadata_by_index (uint16_t elem_index, uint16_t index, size_t max_metadata_size, size_t * metadata_len, uint8_t * metadata)
Parameters
[in]elem_index

Server model element index

[in]index

Firmware list index to check

[in]max_metadata_size

Size of output buffer passed in metadata

[out]metadata_len

On return, set to the length of output data written to metadata

[out]metadata

Metadata of firmware image

Retrieve information about a stored firmware metadata in the Firmware List.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

sl_btmesh_ncp_fw_list_add_fw#

sl_status_t sl_btmesh_ncp_fw_list_add_fw (uint16_t elem_index, uint32_t size, sl_bt_uuid_64_t blob_id, size_t fwid_len, const uint8_t * fwid, uint16_t * fw_list_index)
Parameters
[in]elem_index

Server model element index

[in]size

Size of the image

[in]blob_id

BLOB ID that will be used to transmit the image

[in]fwid_len

Length of data in fwid

[in]fwid

Firmware ID of the image

[out]fw_list_index

Firmware List Index that was assigned to the image

Add a firmware image to the Firmware List. This command is used to inform the stack that a image already exists on the local device. For example, it may have been stored via Upload previously, and the device has been reset.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

sl_btmesh_ncp_fw_list_set_fw_metadata#

sl_status_t sl_btmesh_ncp_fw_list_set_fw_metadata (uint16_t elem_index, uint16_t fw_list_index, size_t metadata_len, const uint8_t * metadata)
Parameters
[in]elem_index

Server model element index

[in]fw_list_index

Firmware List Index for which to set the metadata

[in]metadata_len

Length of data in metadata

[in]metadata

Metadata of the image. May be zero-length.

Set the metadata of a image in the Firmware List. This command is used to set the metadata for images added with the add_fw command. NOTE: this should not be used to modify the metadata of images received via Upload!

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 20367 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_ncp_fw_list_init_id#

#define sl_btmesh_cmd_ncp_fw_list_init_id
Value:
0x00610028

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

sl_btmesh_cmd_ncp_fw_list_deinit_id#

#define sl_btmesh_cmd_ncp_fw_list_deinit_id
Value:
0x01610028

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

sl_btmesh_cmd_ncp_fw_list_get_fw_info_by_index_id#

#define sl_btmesh_cmd_ncp_fw_list_get_fw_info_by_index_id
Value:
0x02610028

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

sl_btmesh_cmd_ncp_fw_list_get_fw_metadata_by_index_id#

#define sl_btmesh_cmd_ncp_fw_list_get_fw_metadata_by_index_id
Value:
0x03610028

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

sl_btmesh_cmd_ncp_fw_list_add_fw_id#

#define sl_btmesh_cmd_ncp_fw_list_add_fw_id
Value:
0x04610028

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

sl_btmesh_cmd_ncp_fw_list_set_fw_metadata_id#

#define sl_btmesh_cmd_ncp_fw_list_set_fw_metadata_id
Value:
0x05610028

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

sl_btmesh_rsp_ncp_fw_list_init_id#

#define sl_btmesh_rsp_ncp_fw_list_init_id
Value:
0x00610028

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

sl_btmesh_rsp_ncp_fw_list_deinit_id#

#define sl_btmesh_rsp_ncp_fw_list_deinit_id
Value:
0x01610028

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

sl_btmesh_rsp_ncp_fw_list_get_fw_info_by_index_id#

#define sl_btmesh_rsp_ncp_fw_list_get_fw_info_by_index_id
Value:
0x02610028

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

sl_btmesh_rsp_ncp_fw_list_get_fw_metadata_by_index_id#

#define sl_btmesh_rsp_ncp_fw_list_get_fw_metadata_by_index_id
Value:
0x03610028

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

sl_btmesh_rsp_ncp_fw_list_add_fw_id#

#define sl_btmesh_rsp_ncp_fw_list_add_fw_id
Value:
0x04610028

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

sl_btmesh_rsp_ncp_fw_list_set_fw_metadata_id#

#define sl_btmesh_rsp_ncp_fw_list_set_fw_metadata_id
Value:
0x05610028

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