Bluetooth Mesh Test Utilities#

Bluetooth Mesh Test Utilities.

These commands are meant for development and testing. Do not use in production software.

Modules#

sl_btmesh_evt_test_local_heartbeat_subscription_complete

sl_btmesh_evt_test_replay_protection_list_entry_set

sl_btmesh_evt_test_replay_protection_list_entry_cleared

sl_btmesh_evt_test_replay_protection_list_saved

sl_btmesh_evt_test_replay_protection_list_full

Enumerations#

enum
sl_btmesh_test_key_type_net = 0x0
sl_btmesh_test_key_type_app = 0x1
}

Specify the type of a key in key manipulation commands.

Functions#

sl_status_t
sl_btmesh_test_get_nettx(uint8_t *count, uint8_t *interval)
sl_status_t
sl_btmesh_test_set_nettx(uint8_t count, uint8_t interval)
sl_status_t
sl_btmesh_test_get_relay(uint8_t *enabled, uint8_t *count, uint8_t *interval)
sl_status_t
sl_btmesh_test_set_relay(uint8_t enabled, uint8_t count, uint8_t interval)
sl_status_t
sl_status_t
sl_status_t
sl_status_t
sl_btmesh_test_bind_local_model_app(uint16_t elem_index, uint16_t appkey_index, uint16_t vendor_id, uint16_t model_id)
sl_status_t
sl_btmesh_test_unbind_local_model_app(uint16_t elem_index, uint16_t appkey_index, uint16_t vendor_id, uint16_t model_id)
sl_status_t
sl_btmesh_test_add_local_model_sub(uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint16_t sub_address)
sl_status_t
sl_btmesh_test_remove_local_model_sub(uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint16_t sub_address)
sl_status_t
sl_btmesh_test_add_local_model_sub_va(uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, size_t sub_address_len, const uint8_t *sub_address)
sl_status_t
sl_btmesh_test_remove_local_model_sub_va(uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, size_t sub_address_len, const uint8_t *sub_address)
sl_status_t
sl_btmesh_test_get_local_model_sub(uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, size_t max_addresses_size, size_t *addresses_len, uint8_t *addresses)
sl_status_t
sl_btmesh_test_set_local_model_pub(uint16_t elem_index, uint16_t appkey_index, uint16_t vendor_id, uint16_t model_id, uint16_t pub_address, uint8_t ttl, uint8_t period, uint8_t retrans, uint8_t credentials)
sl_status_t
sl_btmesh_test_set_local_model_pub_va(uint16_t elem_index, uint16_t appkey_index, uint16_t vendor_id, uint16_t model_id, uint8_t ttl, uint8_t period, uint8_t retrans, uint8_t credentials, size_t pub_address_len, const uint8_t *pub_address)
sl_status_t
sl_btmesh_test_get_local_model_pub(uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint16_t *appkey_index, uint16_t *pub_address, uint8_t *ttl, uint8_t *period, uint8_t *retrans, uint8_t *credentials)
sl_status_t
sl_btmesh_test_set_local_heartbeat_subscription(uint16_t subscription_source, uint16_t subscription_destination, uint8_t period_log)
sl_status_t
sl_btmesh_test_get_local_heartbeat_subscription(uint16_t *count, uint8_t *hop_min, uint8_t *hop_max)
sl_status_t
sl_btmesh_test_get_local_heartbeat_publication(uint16_t *publication_address, uint8_t *count, uint8_t *period_log, uint8_t *ttl, uint16_t *features, uint16_t *publication_netkey_index)
sl_status_t
sl_btmesh_test_set_local_heartbeat_publication(uint16_t publication_address, uint8_t count_log, uint8_t period_log, uint8_t ttl, uint16_t features, uint16_t publication_netkey_index)
sl_status_t
sl_btmesh_test_add_local_key(uint8_t key_type, aes_key_128 key, uint16_t key_index, uint16_t netkey_index)
sl_status_t
sl_btmesh_test_remove_local_key(uint8_t key_type, uint16_t key_index)
sl_status_t
sl_btmesh_test_update_local_key(uint8_t key_type, aes_key_128 key, uint16_t key_index)
sl_status_t
sl_status_t
sl_btmesh_test_prov_get_device_key(uint16_t address, aes_key_128 *device_key)
sl_status_t
sl_btmesh_test_prov_prepare_key_refresh(aes_key_128 net_key, size_t app_keys_len, const uint8_t *app_keys)
sl_status_t
sl_btmesh_test_cancel_segmented_tx(uint16_t src_addr, uint16_t dst_addr)
sl_status_t
sl_btmesh_test_set_iv_index(uint32_t iv_index)
sl_status_t
sl_btmesh_test_set_element_seqnum(uint16_t elem_index, uint32_t seqnum)
sl_status_t
sl_btmesh_test_set_model_option(uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint8_t option, uint32_t value)
sl_status_t
sl_btmesh_test_get_local_model_app_bindings(uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, size_t max_appkeys_size, size_t *appkeys_len, uint8_t *appkeys)
sl_status_t
sl_btmesh_test_get_replay_protection_list_entry(uint16_t address, uint32_t *seq, uint32_t *seq_ivindex)
sl_status_t
sl_btmesh_test_get_model_option(uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint8_t option, uint32_t *value)
sl_status_t
sl_status_t
sl_btmesh_test_set_default_ttl(uint8_t set_value, uint8_t *value)
sl_status_t
sl_status_t
sl_btmesh_test_set_gatt_proxy(uint8_t set_value, uint8_t *value)
sl_status_t
sl_btmesh_test_get_identity(uint16_t get_netkey_index, uint16_t *netkey_index, uint8_t *value)
sl_status_t
sl_btmesh_test_set_identity(uint16_t set_netkey_index, uint8_t set_value, uint16_t *netkey_index, uint8_t *value)
sl_status_t
sl_status_t
sl_btmesh_test_set_friend(uint8_t set_value, uint8_t *value)
sl_status_t
sl_status_t
sl_btmesh_test_set_beacon(uint8_t set_value, uint8_t *value)
sl_status_t
sl_btmesh_test_get_private_identity(uint16_t get_netkey_index, uint16_t *netkey_index, uint8_t *value)
sl_status_t
sl_btmesh_test_set_private_identity(uint16_t set_netkey_index, uint8_t set_value, uint16_t *netkey_index, uint8_t *value)
sl_status_t
sl_btmesh_test_set_adv_provisioning_bearer_timing(uint16_t pbadv_interval_ms, uint16_t pbadv_variation_ms)
sl_status_t
sl_btmesh_test_update_keyrefresh_phase(uint16_t network_key_index, uint8_t *phase)
sl_status_t
sl_btmesh_test_set_adv_params(uint16_t adv_interval_min, uint16_t adv_interval_max, uint8_t adv_repeat_packets, uint8_t adv_channel_map)
sl_status_t
sl_btmesh_test_set_scan_params(uint16_t scan_interval, uint16_t scan_window)
sl_status_t

Macros#

#define
sl_btmesh_cmd_test_get_nettx_id 0x00220028
#define
sl_btmesh_cmd_test_set_nettx_id 0x01220028
#define
sl_btmesh_cmd_test_get_relay_id 0x02220028
#define
sl_btmesh_cmd_test_set_relay_id 0x03220028
#define
sl_btmesh_cmd_test_set_ivupdate_test_mode_id 0x05220028
#define
sl_btmesh_cmd_test_get_ivupdate_test_mode_id 0x06220028
#define
sl_btmesh_cmd_test_set_ivupdate_state_id 0x08220028
#define
sl_btmesh_cmd_test_send_beacons_id 0x09220028
#define
sl_btmesh_cmd_test_bind_local_model_app_id 0x0a220028
#define
sl_btmesh_cmd_test_unbind_local_model_app_id 0x0b220028
#define
sl_btmesh_cmd_test_add_local_model_sub_id 0x0c220028
#define
sl_btmesh_cmd_test_remove_local_model_sub_id 0x0d220028
#define
sl_btmesh_cmd_test_add_local_model_sub_va_id 0x0e220028
#define
sl_btmesh_cmd_test_remove_local_model_sub_va_id 0x0f220028
#define
sl_btmesh_cmd_test_get_local_model_sub_id 0x10220028
#define
sl_btmesh_cmd_test_set_local_model_pub_id 0x11220028
#define
sl_btmesh_cmd_test_set_local_model_pub_va_id 0x12220028
#define
sl_btmesh_cmd_test_get_local_model_pub_id 0x13220028
#define
sl_btmesh_cmd_test_set_local_heartbeat_subscription_id 0x14220028
#define
sl_btmesh_cmd_test_get_local_heartbeat_subscription_id 0x15220028
#define
sl_btmesh_cmd_test_get_local_heartbeat_publication_id 0x16220028
#define
sl_btmesh_cmd_test_set_local_heartbeat_publication_id 0x17220028
#define
sl_btmesh_cmd_test_add_local_key_id 0x1a220028
#define
sl_btmesh_cmd_test_remove_local_key_id 0x1b220028
#define
sl_btmesh_cmd_test_update_local_key_id 0x1c220028
#define
sl_btmesh_cmd_test_set_adv_bearer_state_id 0x1f220028
#define
sl_btmesh_cmd_test_prov_get_device_key_id 0x23220028
#define
sl_btmesh_cmd_test_prov_prepare_key_refresh_id 0x24220028
#define
sl_btmesh_cmd_test_cancel_segmented_tx_id 0x25220028
#define
sl_btmesh_cmd_test_set_iv_index_id 0x26220028
#define
sl_btmesh_cmd_test_set_element_seqnum_id 0x27220028
#define
sl_btmesh_cmd_test_set_model_option_id 0x28220028
#define
sl_btmesh_cmd_test_get_local_model_app_bindings_id 0x29220028
#define
sl_btmesh_cmd_test_get_replay_protection_list_entry_id 0x2a220028
#define
sl_btmesh_cmd_test_clear_replay_protection_list_entry_id 0x2b220028
#define
sl_btmesh_cmd_test_set_replay_protection_list_diagnostics_id 0x2c220028
#define
sl_btmesh_cmd_test_get_model_option_id 0x2d220028
#define
sl_btmesh_cmd_test_get_default_ttl_id 0x2e220028
#define
sl_btmesh_cmd_test_set_default_ttl_id 0x2f220028
#define
sl_btmesh_cmd_test_get_gatt_proxy_id 0x30220028
#define
sl_btmesh_cmd_test_set_gatt_proxy_id 0x31220028
#define
sl_btmesh_cmd_test_get_identity_id 0x32220028
#define
sl_btmesh_cmd_test_set_identity_id 0x33220028
#define
sl_btmesh_cmd_test_get_friend_id 0x34220028
#define
sl_btmesh_cmd_test_set_friend_id 0x35220028
#define
sl_btmesh_cmd_test_get_beacon_id 0x36220028
#define
sl_btmesh_cmd_test_set_beacon_id 0x37220028
#define
sl_btmesh_cmd_test_get_private_identity_id 0x38220028
#define
sl_btmesh_cmd_test_set_private_identity_id 0x39220028
#define
sl_btmesh_cmd_test_set_adv_provisioning_bearer_timing_id 0x3a220028
#define
sl_btmesh_cmd_test_update_keyrefresh_phase_id 0x3b220028
#define
sl_btmesh_cmd_test_send_private_beacons_id 0x3c220028
#define
sl_btmesh_cmd_test_set_adv_params_id 0x3d220028
#define
sl_btmesh_cmd_test_set_scan_params_id 0x3e220028
#define
sl_btmesh_cmd_test_adv_use_random_address_id 0x3f220028
#define
sl_btmesh_rsp_test_get_nettx_id 0x00220028
#define
sl_btmesh_rsp_test_set_nettx_id 0x01220028
#define
sl_btmesh_rsp_test_get_relay_id 0x02220028
#define
sl_btmesh_rsp_test_set_relay_id 0x03220028
#define
sl_btmesh_rsp_test_set_ivupdate_test_mode_id 0x05220028
#define
sl_btmesh_rsp_test_get_ivupdate_test_mode_id 0x06220028
#define
sl_btmesh_rsp_test_set_ivupdate_state_id 0x08220028
#define
sl_btmesh_rsp_test_send_beacons_id 0x09220028
#define
sl_btmesh_rsp_test_bind_local_model_app_id 0x0a220028
#define
sl_btmesh_rsp_test_unbind_local_model_app_id 0x0b220028
#define
sl_btmesh_rsp_test_add_local_model_sub_id 0x0c220028
#define
sl_btmesh_rsp_test_remove_local_model_sub_id 0x0d220028
#define
sl_btmesh_rsp_test_add_local_model_sub_va_id 0x0e220028
#define
sl_btmesh_rsp_test_remove_local_model_sub_va_id 0x0f220028
#define
sl_btmesh_rsp_test_get_local_model_sub_id 0x10220028
#define
sl_btmesh_rsp_test_set_local_model_pub_id 0x11220028
#define
sl_btmesh_rsp_test_set_local_model_pub_va_id 0x12220028
#define
sl_btmesh_rsp_test_get_local_model_pub_id 0x13220028
#define
sl_btmesh_rsp_test_set_local_heartbeat_subscription_id 0x14220028
#define
sl_btmesh_rsp_test_get_local_heartbeat_subscription_id 0x15220028
#define
sl_btmesh_rsp_test_get_local_heartbeat_publication_id 0x16220028
#define
sl_btmesh_rsp_test_set_local_heartbeat_publication_id 0x17220028
#define
sl_btmesh_rsp_test_add_local_key_id 0x1a220028
#define
sl_btmesh_rsp_test_remove_local_key_id 0x1b220028
#define
sl_btmesh_rsp_test_update_local_key_id 0x1c220028
#define
sl_btmesh_rsp_test_set_adv_bearer_state_id 0x1f220028
#define
sl_btmesh_rsp_test_prov_get_device_key_id 0x23220028
#define
sl_btmesh_rsp_test_prov_prepare_key_refresh_id 0x24220028
#define
sl_btmesh_rsp_test_cancel_segmented_tx_id 0x25220028
#define
sl_btmesh_rsp_test_set_iv_index_id 0x26220028
#define
sl_btmesh_rsp_test_set_element_seqnum_id 0x27220028
#define
sl_btmesh_rsp_test_set_model_option_id 0x28220028
#define
sl_btmesh_rsp_test_get_local_model_app_bindings_id 0x29220028
#define
sl_btmesh_rsp_test_get_replay_protection_list_entry_id 0x2a220028
#define
sl_btmesh_rsp_test_clear_replay_protection_list_entry_id 0x2b220028
#define
sl_btmesh_rsp_test_set_replay_protection_list_diagnostics_id 0x2c220028
#define
sl_btmesh_rsp_test_get_model_option_id 0x2d220028
#define
sl_btmesh_rsp_test_get_default_ttl_id 0x2e220028
#define
sl_btmesh_rsp_test_set_default_ttl_id 0x2f220028
#define
sl_btmesh_rsp_test_get_gatt_proxy_id 0x30220028
#define
sl_btmesh_rsp_test_set_gatt_proxy_id 0x31220028
#define
sl_btmesh_rsp_test_get_identity_id 0x32220028
#define
sl_btmesh_rsp_test_set_identity_id 0x33220028
#define
sl_btmesh_rsp_test_get_friend_id 0x34220028
#define
sl_btmesh_rsp_test_set_friend_id 0x35220028
#define
sl_btmesh_rsp_test_get_beacon_id 0x36220028
#define
sl_btmesh_rsp_test_set_beacon_id 0x37220028
#define
sl_btmesh_rsp_test_get_private_identity_id 0x38220028
#define
sl_btmesh_rsp_test_set_private_identity_id 0x39220028
#define
sl_btmesh_rsp_test_set_adv_provisioning_bearer_timing_id 0x3a220028
#define
sl_btmesh_rsp_test_update_keyrefresh_phase_id 0x3b220028
#define
sl_btmesh_rsp_test_send_private_beacons_id 0x3c220028
#define
sl_btmesh_rsp_test_set_adv_params_id 0x3d220028
#define
sl_btmesh_rsp_test_set_scan_params_id 0x3e220028
#define
sl_btmesh_rsp_test_adv_use_random_address_id 0x3f220028

Enumeration Documentation#

sl_btmesh_test_key_type_t#

sl_btmesh_test_key_type_t

Specify the type of a key in key manipulation commands.

Enumerator
sl_btmesh_test_key_type_net

(0x0) Network key

sl_btmesh_test_key_type_app

(0x1) Application key


Function Documentation#

sl_btmesh_test_get_nettx#

sl_status_t sl_btmesh_test_get_nettx (uint8_t * count, uint8_t * interval)
Parameters
TypeDirectionArgument NameDescription
uint8_t *[out]count

Number of network layer transmissions beyond the initial one. Range: 0-7.

uint8_t *[out]interval

Transmit interval steps. The interval between transmissions is a random value between 10*(1+steps) and 10*(2+steps) milliseconds. For example, for a value of 2, the interval is between 30 and 40 milliseconds. Range: 0-31.

Get the network transmit state of a node.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_nettx#

sl_status_t sl_btmesh_test_set_nettx (uint8_t count, uint8_t interval)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]count

Number of network layer transmissions beyond the initial one. Range: 0-7.

uint8_t[in]interval

Transmit interval steps. The interval between transmissions is a random value between 10*(1+steps) and 10*(2+steps) milliseconds. For example, for a value of 2 the interval would be between 30 and 40 milliseconds. Range: 0-31.

Set the network transmit state of a node locally. Normally, the network transmit state is controlled by the Provisioner. This command overrides any setting done by the Provisioner.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_relay#

sl_status_t sl_btmesh_test_get_relay (uint8_t * enabled, uint8_t * count, uint8_t * interval)
Parameters
TypeDirectionArgument NameDescription
uint8_t *[out]enabled

State value indicating whether the relay functionality is not enabled on the node (0), is enabled on the node (1), or is not available (2).

uint8_t *[out]count

Number of relay transmissions beyond the initial one. Range: 0-7.

uint8_t *[out]interval

Relay retransmit interval steps. The interval between transmissions is 10*(1+steps) milliseconds. Range: 0-31.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_relay#

sl_status_t sl_btmesh_test_set_relay (uint8_t enabled, uint8_t count, uint8_t interval)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]enabled

Indicates whether the relay functionality is enabled on the node (1) or not (0); value indicating disabled (2) can't be set.

uint8_t[in]count

Number of relay transmissions beyond the initial one. Range: 0-7.

uint8_t[in]interval

Relay retransmit interval steps. The interval between transmissions is 10*(1+steps) milliseconds. Range: 0-31.

Set the relay state and the relay retransmit state of a node locally. Normally, these states are controlled by the Provisioner. This command overrides any settings done by the Provisioner.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_ivupdate_test_mode#

sl_status_t sl_btmesh_test_set_ivupdate_test_mode (uint8_t mode)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]mode

Whether test mode is enabled (1) or disabled (0).

By default, IV index update is limited in how often the update procedure can be performed. This test command can be called to set IV update test mode where any time limits are ignored.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_ivupdate_test_mode#

sl_status_t sl_btmesh_test_get_ivupdate_test_mode (uint8_t * mode)
Parameters
TypeDirectionArgument NameDescription
uint8_t *[out]mode

Indicates whether test mode is enabled (1) or disabled (0).

Get the current IV update test mode. See sl_btmesh_test_set_ivupdate_test_mode for details.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_ivupdate_state#

sl_status_t sl_btmesh_test_set_ivupdate_state (uint8_t state)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]state

Indicates whether IV update state should be entered (1) or exited (0).

Forcefully change the IV update state on the device. Normally, the state changes as a result of an IV index update procedure progressing from one state to the next.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_send_beacons#

sl_status_t sl_btmesh_test_send_beacons ()

Send secure network beacons for every network key on the device, regardless of beacon configuration state or how many beacons sent by other devices have been observed.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_bind_local_model_app#

sl_status_t sl_btmesh_test_bind_local_model_app (uint16_t elem_index, uint16_t appkey_index, uint16_t vendor_id, uint16_t model_id)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target Element, 0 is primary element

uint16_t[in]appkey_index

The Appkey to use for binding

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for SIG models.

uint16_t[in]model_id

Model ID

Bind a Model to an Appkey locally.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_unbind_local_model_app#

sl_status_t sl_btmesh_test_unbind_local_model_app (uint16_t elem_index, uint16_t appkey_index, uint16_t vendor_id, uint16_t model_id)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is primary element

uint16_t[in]appkey_index

The Appkey to use for binding

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for SIG models.

uint16_t[in]model_id

Model ID

Remove a binding between a model and an application key locally.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_add_local_model_sub#

sl_status_t sl_btmesh_test_add_local_model_sub (uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint16_t sub_address)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is the primary element

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for Bluetooth SIG models.

uint16_t[in]model_id

Model ID

uint16_t[in]sub_address

The address to add to the subscription list

Add an address to a local model's subscription list.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_remove_local_model_sub#

sl_status_t sl_btmesh_test_remove_local_model_sub (uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint16_t sub_address)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is the primary element

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for Bluetooth SIG models.

uint16_t[in]model_id

Model ID

uint16_t[in]sub_address

The address to remove from the subscription list

Remove an address from a local model's subscription list.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_add_local_model_sub_va#

sl_status_t sl_btmesh_test_add_local_model_sub_va (uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, size_t sub_address_len, const uint8_t * sub_address)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is the primary element

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for Bluetooth SIG models.

uint16_t[in]model_id

Model ID

size_t[in]sub_address_len

Length of data in sub_address

const uint8_t *[in]sub_address

The Label UUID to add to the subscription list. The array must be exactly 16 bytes long.

Add a virtual address to a local model's subscription list.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_remove_local_model_sub_va#

sl_status_t sl_btmesh_test_remove_local_model_sub_va (uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, size_t sub_address_len, const uint8_t * sub_address)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is the primary element

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for Bluetooth SIG models.

uint16_t[in]model_id

Model ID

size_t[in]sub_address_len

Length of data in sub_address

const uint8_t *[in]sub_address

The Label UUID to remove from the subscription list. The array must be exactly 16 bytes long.

Remove a virtual address from a local model's subscription list.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_local_model_sub#

sl_status_t sl_btmesh_test_get_local_model_sub (uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, size_t max_addresses_size, size_t * addresses_len, uint8_t * addresses)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is the primary element

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for Bluetooth SIG models.

uint16_t[in]model_id

Model ID

size_t[in]max_addresses_size

Size of output buffer passed in addresses

size_t *[out]addresses_len

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

uint8_t *[out]addresses

List of 16-bit Mesh addresses; empty if not subscribed to any address. Ignore if the result code is non-zero.

Get all entries in a local model's subscription list.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_local_model_pub#

sl_status_t sl_btmesh_test_set_local_model_pub (uint16_t elem_index, uint16_t appkey_index, uint16_t vendor_id, uint16_t model_id, uint16_t pub_address, uint8_t ttl, uint8_t period, uint8_t retrans, uint8_t credentials)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, where 0 is the primary element

uint16_t[in]appkey_index

The application key index to use for the application messages published

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for Bluetooth SIG models.

uint16_t[in]model_id

Model ID

uint16_t[in]pub_address

The address to publish to

uint8_t[in]ttl

Time-to-Live value for published messages. Valid values: range[0 - 127] and 255.

uint8_t[in]period

Publication period encoded as step count and step resolution. The encoding is as follows:

  • Bits 0..5: Step count

  • Bits 6..7: Step resolution:

    • 00: 100 milliseconds

    • 01: 1 second

    • 10: 10 seconds

    • 11: 10 minutes

uint8_t[in]retrans

Retransmission count and interval, which controls number of times that the model re-publishes the same message after the initial publish transmission and the cadence of retransmissions.

Retransmission count is encoded in the three low bits of the value, ranging from 0 to 7. Default value is 0 (no retransmissions).

Retransmission interval is encoded in the five high bits of the value, ranging from 0 to 31, in 50-millisecond units. Value of 0 corresponds to 50 ms, while value of 31 corresponds to 1600 ms.

uint8_t[in]credentials

Friendship credentials flag

Set a local model's publication address, key, and parameters.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_local_model_pub_va#

sl_status_t sl_btmesh_test_set_local_model_pub_va (uint16_t elem_index, uint16_t appkey_index, uint16_t vendor_id, uint16_t model_id, uint8_t ttl, uint8_t period, uint8_t retrans, uint8_t credentials, size_t pub_address_len, const uint8_t * pub_address)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is the primary element

uint16_t[in]appkey_index

The application key index to use for the published messages

uint16_t[in]vendor_id

Vendor ID of the configured model. Use 0xffff for Bluetooth SIG models.

uint16_t[in]model_id

Model ID of the configured model

uint8_t[in]ttl

Publication time-to-live value. Valid values: range[0 - 127] and 255.

uint8_t[in]period

Publication period encoded as step count and step resolution. The encoding is as follows:

  • Bits 0..5: Step count

  • Bits 6..7: Step resolution:

    • 00: 100 milliseconds

    • 01: 1 second

    • 10: 10 seconds

    • 11: 10 minutes

uint8_t[in]retrans

See documentation of sl_btmesh_test_set_local_model_pub for details.

uint8_t[in]credentials

Friendship credentials flag

size_t[in]pub_address_len

Length of data in pub_address

const uint8_t *[in]pub_address

The Label UUID to publish to. The byte array must be exactly 16 bytes long.

Set a model's publication virtual address, key, and parameters.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_local_model_pub#

sl_status_t sl_btmesh_test_get_local_model_pub (uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint16_t * appkey_index, uint16_t * pub_address, uint8_t * ttl, uint8_t * period, uint8_t * retrans, uint8_t * credentials)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is the primary element

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for Bluetooth SIG models.

uint16_t[in]model_id

Model ID

uint16_t *[out]appkey_index

The application key index used for the application messages published

uint16_t *[out]pub_address

The address published to

uint8_t *[out]ttl

Time-to-Live value for published messages

uint8_t *[out]period

Publication period encoded as step count and step resolution. The encoding is as follows:

  • Bits 0..5: Step count

  • Bits 6..7: Step resolution:

    • 00: 100 milliseconds

    • 01: 1 second

    • 10: 10 seconds

    • 11: 10 minutes

uint8_t *[out]retrans

See documentation of sl_btmesh_test_set_local_model_pub for details.

uint8_t *[out]credentials

Friendship credentials flag

Get a local model's publication address, key, and parameters.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_local_heartbeat_subscription#

sl_status_t sl_btmesh_test_set_local_heartbeat_subscription (uint16_t subscription_source, uint16_t subscription_destination, uint8_t period_log)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]subscription_source

Source address for heartbeat messages. Must be either a unicast address or the unassigned address, in which case heartbeat messages are not processed.

uint16_t[in]subscription_destination

Destination address for heartbeat messages. The address must be either the unicast address of the primary element of the node, a group address, or the unassigned address. If it is the unassigned address, heartbeat messages are not processed.

uint8_t[in]period_log

Heartbeat subscription period setting. Valid values are as follows:

  • 0x00: Heartbeat messages are not received

  • 0x01 .. 0x11: Node will receive heartbeat messages for 2^(n-1) seconds

  • 0x12 .. 0xff: Prohibited

Set local node heartbeat subscription parameters. Normally heartbeat subscription is controlled by the Provisioner.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_local_heartbeat_subscription#

sl_status_t sl_btmesh_test_get_local_heartbeat_subscription (uint16_t * count, uint8_t * hop_min, uint8_t * hop_max)
Parameters
TypeDirectionArgument NameDescription
uint16_t *[out]count

Number of received heartbeat messages

uint8_t *[out]hop_min

Minimum observed hop count in heartbeat messages

uint8_t *[out]hop_max

Maximum observed hop count in heartbeat messages

Get the local node heartbeat subscription state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_local_heartbeat_publication#

sl_status_t sl_btmesh_test_get_local_heartbeat_publication (uint16_t * publication_address, uint8_t * count, uint8_t * period_log, uint8_t * ttl, uint16_t * features, uint16_t * publication_netkey_index)
Parameters
TypeDirectionArgument NameDescription
uint16_t *[out]publication_address

Heartbeat publication address

uint8_t *[out]count

Heartbeat publication remaining count

uint8_t *[out]period_log

Heartbeat publication period setting. Valid values are as follows:

  • 0x00: Heartbeat messages are not sent

  • 0x01 .. 0x11: Node will send a heartbeat message every 2^(n-1) seconds

  • 0x12 .. 0xff: Prohibited

uint8_t *[out]ttl

Time-to-live parameter for heartbeat messages

uint16_t *[out]features

Heartbeat trigger setting

uint16_t *[out]publication_netkey_index

Index of the network key used to encrypt heartbeat messages

Get the heartbeat publication state of a local node.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_local_heartbeat_publication#

sl_status_t sl_btmesh_test_set_local_heartbeat_publication (uint16_t publication_address, uint8_t count_log, uint8_t period_log, uint8_t ttl, uint16_t features, uint16_t publication_netkey_index)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]publication_address

Heartbeat publication address. The address can't be a virtual address. Note that it can be the unassigned address, in which case the heartbeat publishing is disabled.

uint8_t[in]count_log

Heartbeat publication count setting. Valid values are as follows:

  • 0x00: Heartbeat messages are not sent

  • 0x01 .. 0x11: Node will send 2^(n-1) heartbeat messages

  • 0x12 .. 0xfe: Prohibited

  • 0xff: Hearbeat messages are sent indefinitely

uint8_t[in]period_log

Heartbeat publication period setting. Valid values are as follows:

  • 0x00: Heartbeat messages are not sent

  • 0x01 .. 0x11: Node will send a heartbeat message every 2^(n-1) seconds

  • 0x12 .. 0xff: Prohibited

uint8_t[in]ttl

Time-to-live parameter for heartbeat messages. Valid values: range[0 - 127].

uint16_t[in]features

Heartbeat trigger setting. For bits set in the bitmask, reconfiguration of the node feature associated with the bit will result in the node emitting a heartbeat message. Valid values are as follows:

  • Bit 0: Relay feature

  • Bit 1: Proxy feature

  • Bit 2: Friend feature

  • Bit 3: Low power feature

Remaining bits are reserved for future use.

uint16_t[in]publication_netkey_index

Index of the network key used to encrypt heartbeat messages

Set the heartbeat publication state of a local node.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_add_local_key#

sl_status_t sl_btmesh_test_add_local_key (uint8_t key_type, aes_key_128 key, uint16_t key_index, uint16_t netkey_index)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]key_type

Enum sl_btmesh_test_key_type_t. 0 for network key, 1 for application key

aes_key_128[in]key

Key data

uint16_t[in]key_index

Index for the added key (must be unused)

uint16_t[in]netkey_index

Network key index to which the application key is bound; ignored for network keys

Add a network or application key locally.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_remove_local_key#

sl_status_t sl_btmesh_test_remove_local_key (uint8_t key_type, uint16_t key_index)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]key_type

Enum sl_btmesh_test_key_type_t. 0 for network key, 1 for application key

uint16_t[in]key_index

Index of the key to delete

Delete a network or application key locally.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_update_local_key#

sl_status_t sl_btmesh_test_update_local_key (uint8_t key_type, aes_key_128 key, uint16_t key_index)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]key_type

Enum sl_btmesh_test_key_type_t. 0 for network key, 1 for application key

aes_key_128[in]key

Key data

uint16_t[in]key_index

Index for the key to update

Update the network or application key value locally.

Copies the existing network key value to the old value and replaces the current value with the given key data.

Note that the standard way to update keys on the Provisioner as well as on nodes is to run the key refresh procedure. This command is for debugging only.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_adv_bearer_state#

sl_status_t sl_btmesh_test_set_adv_bearer_state (uint8_t state)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]state

0: disable advertisement, 1: enable advertisement.

Disable or enable advertisement bearer for sending.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_prov_get_device_key#

sl_status_t sl_btmesh_test_prov_get_device_key (uint16_t address, aes_key_128 * device_key)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]address

Address of the node

aes_key_128 *[out]device_key

Device key, 16-bytes

Get the device key with the address of the node's primary element.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_prov_prepare_key_refresh#

sl_status_t sl_btmesh_test_prov_prepare_key_refresh (aes_key_128 net_key, size_t app_keys_len, const uint8_t * app_keys)
Parameters
TypeDirectionArgument NameDescription
aes_key_128[in]net_key

New net key

size_t[in]app_keys_len

Length of data in app_keys

const uint8_t *[in]app_keys

list of new application keys, 16-bytes each

Prepare the key refresh by feeding the new network key and all needed application keys. The function can be called multiple times to include more application keys. The network key must be the same in all calls. If the network key is changed, the network key from the 1st command is used. Sending application key data with length zero results in all initialization data being forgotten unless this is done in the first prepare command i.e., trying to update only the network key. Also starting the key refresh procedure results in all the preparation data being forgotten.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_cancel_segmented_tx#

sl_status_t sl_btmesh_test_cancel_segmented_tx (uint16_t src_addr, uint16_t dst_addr)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]src_addr

Source address for the segmented message

uint16_t[in]dst_addr

Destination address for the segmented message

Cancel sending a segmented message.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_iv_index#

sl_status_t sl_btmesh_test_set_iv_index (uint32_t iv_index)
Parameters
TypeDirectionArgument NameDescription
uint32_t[in]iv_index

IV Index value to use

Set the IV index value of the node.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_element_seqnum#

sl_status_t sl_btmesh_test_set_element_seqnum (uint16_t elem_index, uint32_t seqnum)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is the primary element

uint32_t[in]seqnum

Sequence number to set on the target element

Set the current sequence number of an element.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_model_option#

sl_status_t sl_btmesh_test_set_model_option (uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint8_t option, uint32_t value)
Parameters
TypeDirectionArgument NameDescription
uint16_tN/Aelem_index
uint16_tN/Avendor_id
uint16_tN/Amodel_id
uint8_tN/Aoption
uint32_tN/Avalue

sl_btmesh_test_get_local_model_app_bindings#

sl_status_t sl_btmesh_test_get_local_model_app_bindings (uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, size_t max_appkeys_size, size_t * appkeys_len, uint8_t * appkeys)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]elem_index

The index of the target element, 0 is the primary element

uint16_t[in]vendor_id

Vendor ID for vendor-specific models. Use 0xffff for Bluetooth SIG models.

uint16_t[in]model_id

Model ID

size_t[in]max_appkeys_size

Size of output buffer passed in appkeys

size_t *[out]appkeys_len

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

uint8_t *[out]appkeys

List of 16-bit application key indices; empty if model has not been bound to any application key.

Get the application key bindings of a model.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_replay_protection_list_entry#

sl_status_t sl_btmesh_test_get_replay_protection_list_entry (uint16_t address, uint32_t * seq, uint32_t * seq_ivindex)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]address

Source address to check

uint32_t *[out]seq

Stored sequence number for the address; not a valid value if the result is not SL_STATUS_OK.

uint32_t *[out]seq_ivindex

IV index in use at the time the sequence number was stored in the replay protection list; not a valid value if result is not SL_STATUS_OK.

Get the replay protection list entry for an address.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_clear_replay_protection_list_entry#

sl_status_t sl_btmesh_test_clear_replay_protection_list_entry (uint16_t address)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]address

Source address to use in finding the entry

Clear the replay protection list entry for an address. Use this command carefully because it may expose the node to replay attacks when misused.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_replay_protection_list_diagnostics#

sl_status_t sl_btmesh_test_set_replay_protection_list_diagnostics (uint8_t enable)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]enable

Enable (nonzero) or disable (zero) diagnostic events for replay protection list

Enable or disable replay protection list diagnostic events. When enabled, events related to the replay protection list changes are generated.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_model_option#

sl_status_t sl_btmesh_test_get_model_option (uint16_t elem_index, uint16_t vendor_id, uint16_t model_id, uint8_t option, uint32_t * value)
Parameters
TypeDirectionArgument NameDescription
uint16_tN/Aelem_index
uint16_tN/Avendor_id
uint16_tN/Amodel_id
uint8_tN/Aoption
uint32_t *N/Avalue

sl_btmesh_test_get_default_ttl#

sl_status_t sl_btmesh_test_get_default_ttl (uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint8_t *[out]value

Default time-to-live value. Valid value range is from 2 to 127 for relayed PDUs, and 0 to indicate non-relayed PDUs

Get node default TTL state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_default_ttl#

sl_status_t sl_btmesh_test_set_default_ttl (uint8_t set_value, uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]set_value

Default time-to-live value. See sl_btmesh_test_get_default_ttl for details.

uint8_t *[out]value

Default time-to-live value. See sl_btmesh_test_get_default_ttl for details.

Set node default TTL state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_gatt_proxy#

sl_status_t sl_btmesh_test_get_gatt_proxy (uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint8_t *[out]value

GATT proxy value of the node. Valid values are:

  • 0: GATT proxy feature is disabled

  • 1: GATT proxy feature is enabled

  • 2: GATT proxy feature is not supported

Get node GATT proxy state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_gatt_proxy#

sl_status_t sl_btmesh_test_set_gatt_proxy (uint8_t set_value, uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]set_value

GATT proxy value to set. Valid values are:

  • 0: Proxy feature is disabled

  • 1: Proxy feature is enabled

uint8_t *[out]value

GATT proxy state value. See sl_btmesh_test_get_gatt_proxy for details.

Set node GATT proxy state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


sl_btmesh_test_get_identity#

sl_status_t sl_btmesh_test_get_identity (uint16_t get_netkey_index, uint16_t * netkey_index, uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]get_netkey_index

Network key index for which the state is queried

uint16_t *[out]netkey_index

Network key index for which the state is queried

uint8_t *[out]value

Identity state of the node for the used network index. Valid values are as follows:

  • 0: Node identity advertising is disabled

  • 1: Node identity advertising is enabled

  • 2: Node identity advertising is not supported

Get node identity state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_identity#

sl_status_t sl_btmesh_test_set_identity (uint16_t set_netkey_index, uint8_t set_value, uint16_t * netkey_index, uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]set_netkey_index

Network key index for which the state is configured

uint8_t[in]set_value

Identity value to set. Valid values are:

  • 0: Node identity advertising is disabled

  • 1: Node identity advertising is enabled

uint16_t *[out]netkey_index

Network key index for which the state is set

uint8_t *[out]value

Identity state of the node for the used network index. See sl_btmesh_test_get_identity for details

Set node identity state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_friend#

sl_status_t sl_btmesh_test_get_friend (uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint8_t *[out]value

Friend state value. Valid values are:

  • 0: Friend feature is not enabled

  • 1: Friend feature is enabled

  • 2: Friend feature is not supported

Get node friend state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_friend#

sl_status_t sl_btmesh_test_set_friend (uint8_t set_value, uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]set_value

Friend value to set. Valid values are:

  • 0: Friend feature is not enabled

  • 1: Friend feature is enabled

uint8_t *[out]value

Friend state value. See sl_btmesh_test_get_friend for detais.

Set node friend state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_beacon#

sl_status_t sl_btmesh_test_get_beacon (uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint8_t *[out]value

Secure network beacon value. Valid values are:

  • 0: Node is not broadcasting secure network beacons

  • 1: Node is broadcasting secure network beacons

Get node secure network beacon state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_beacon#

sl_status_t sl_btmesh_test_set_beacon (uint8_t set_value, uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]set_value

Secure network beacon value to set. Valid values are:

  • 0: Node is not broadcasting secure network beacons

  • 1: Node is broadcasting secure network beacons

uint8_t *[out]value

Secure network beacon value of the node.

Set node secure network beacon state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_get_private_identity#

sl_status_t sl_btmesh_test_get_private_identity (uint16_t get_netkey_index, uint16_t * netkey_index, uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]get_netkey_index

Network key index for which the state is queried

uint16_t *[out]netkey_index

Network key index for which the state is queried

uint8_t *[out]value

Private identity state of the node for the used network index. Valid values are as follows:

  • 0: Node private identity advertising is disabled

  • 1: Node private identity advertising is enabled

  • 2: Node private identity advertising is not supported

Get node private identity state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_private_identity#

sl_status_t sl_btmesh_test_set_private_identity (uint16_t set_netkey_index, uint8_t set_value, uint16_t * netkey_index, uint8_t * value)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]set_netkey_index

Network key index for which the state is configured

uint8_t[in]set_value

Identity value to set. Valid values are:

  • 0: Node private identity advertising is disabled

  • 1: Node private identity advertising is enabled

uint16_t *[out]netkey_index

Network key index for which the state is set

uint8_t *[out]value

Identity state of the node for the used network index. See sl_btmesh_test_get_private_identity for details

Set node private identity state.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_adv_provisioning_bearer_timing#

sl_status_t sl_btmesh_test_set_adv_provisioning_bearer_timing (uint16_t pbadv_interval_ms, uint16_t pbadv_variation_ms)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]pbadv_interval_ms

PB-ADV Tx interval. Value is in milliseconds. Range: 10 to 1000.

uint16_t[in]pbadv_variation_ms

PB-ADV Tx interval variation. A random delay between 0 and this value is added to the PB-ADV Tx interval when transmitting a PB-ADV PDU. Value is in milliseconds. Range: 10 to 1000.

Set PB-ADV provisioning bearer timing. This controls how PB-ADV provisioning PDUs are transmitted by the device; each transmission is preceded by a delay that is computed by adding together a minimum interval with a random variation.

If this setting is not applied, a default interval of 20 ms and a default variation of 30 ms is used, meaning that a single advertisement is sent with a delay ranging from 20 to 50 ms.

Note that using a non-default setting is against the Mesh specification and should only used for troubleshooting.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_update_keyrefresh_phase#

sl_status_t sl_btmesh_test_update_keyrefresh_phase (uint16_t network_key_index, uint8_t * phase)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]network_key_index

Index for the key to put into next phase

uint8_t *[out]phase

Key refresh phase state of the node for the given network key. Valid values are:

  • 0: Normal operation

  • 1: First phase of key refresh procedure

  • 2: Second phase of key refresh procedure

Change keyrefresh phase of of a network id.

Update is done with following logic depending on current keyrefresh phase:

  • Phase 0 : return an errorcode for wrong phase

  • Phase 1 : set phase to 2

  • Phase 2 : set phase to 3

  • Phase 3 : Leave phase 3 as is

This command is for debugging only

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_send_private_beacons#

sl_status_t sl_btmesh_test_send_private_beacons ()

Send private network beacons for every network key on the device, regardless of beacon configuration state or how many beacons sent by other devices have been observed.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_adv_params#

sl_status_t sl_btmesh_test_set_adv_params (uint16_t adv_interval_min, uint16_t adv_interval_max, uint8_t adv_repeat_packets, uint8_t adv_channel_map)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]adv_interval_min

Minimum advertisement interval. Value is in units of 0.625 ms. Default value is 32 (20 ms). Must be equal to or greater than 32.

uint16_t[in]adv_interval_max

Maximum advertisement interval. Value is in units of 0.625 ms. Must be equal to or greater than the minimum interval. Default value is 32 (20 ms). Must be equal to or less than 16384.

uint8_t[in]adv_repeat_packets

Number of times to repeat each packet on all selected advertisement channels. Range: 1-5. Default value is 1.

uint8_t[in]adv_channel_map

Advertisement channel selection bitmask. Range: 0x1-0x7. Default value: 7 (all channels)

Set the non-default advertisement parameters used in mesh communications. Call this command before sl_btmesh_node_init or sl_btmesh_prov_init for the settings to take effect.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_set_scan_params#

sl_status_t sl_btmesh_test_set_scan_params (uint16_t scan_interval, uint16_t scan_window)
Parameters
TypeDirectionArgument NameDescription
uint16_t[in]scan_interval

Scan interval. Value is in units of 0.625 ms. Range: 0x0004 to 0x4000 (time range of 2.5 ms to 10.24 s). Default value is 160 (100 ms).

uint16_t[in]scan_window

Scan window. Value is in units of 0.625 ms. Must be equal to or less than the scan interval.

Set the non-default scanning parameters used in mesh communications. Call this command before sl_btmesh_node_init or sl_btmesh_prov_init for the settings to take effect.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_test_adv_use_random_address#

sl_status_t sl_btmesh_test_adv_use_random_address (uint8_t address_type)
Parameters
TypeDirectionArgument NameDescription
uint8_t[in]address_type

Address type:

  • 0: Reset random address usage. Public address will used for advertisements.

  • 1: Set random address usage. New random address will be generated and taken into use.

Set advertiser to use ramdom or public address. New setting will take effect with the next advertisement.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.