Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
Configuration Client Model

Configuration Client Model. More...

Data Structures

struct  bt_mesh_cfg_cli
 
struct  bt_mesh_cfg_mod_pub
 
struct  bt_mesh_cfg_hb_sub
 
struct  bt_mesh_cfg_hb_pub
 
struct  bt_mesh_comp_p0
 
struct  bt_mesh_comp_p0_elem
 

Macros

#define BT_MESH_MODEL_CFG_CLI(cli_data)
 Generic Configuration Client model composition data entry. More...
 
#define BT_MESH_PUB_PERIOD_100MS(steps)   ((steps) & BIT_MASK(6))
 Helper macro to encode model publication period in units of 100ms. More...
 
#define BT_MESH_PUB_PERIOD_SEC(steps)   (((steps) & BIT_MASK(6)) | (1 << 6))
 Helper macro to encode model publication period in units of 1 second. More...
 
#define BT_MESH_PUB_PERIOD_10SEC(steps)   (((steps) & BIT_MASK(6)) | (2 << 6))
 Helper macro to encode model publication period in units of 10 seconds. More...
 
#define BT_MESH_PUB_PERIOD_10MIN(steps)   (((steps) & BIT_MASK(6)) | (3 << 6))
 Helper macro to encode model publication period in units of 10 minutes. More...
 

Functions

int bt_mesh_cfg_node_reset (uint16_t net_idx, uint16_t addr, bool *status)
 Reset the target node and remove it from the network. More...
 
int bt_mesh_cfg_comp_data_get (uint16_t net_idx, uint16_t addr, uint8_t page, uint8_t *rsp, struct net_buf_simple *comp)
 Get the target node's composition data. More...
 
int bt_mesh_cfg_beacon_get (uint16_t net_idx, uint16_t addr, uint8_t *status)
 Get the target node's network beacon state. More...
 
int bt_mesh_cfg_krp_get (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, uint8_t *status, uint8_t *phase)
 Get the target node's network key refresh phase state. More...
 
int bt_mesh_cfg_krp_set (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, uint8_t transition, uint8_t *status, uint8_t *phase)
 Set the target node's network key refresh phase parameters. More...
 
int bt_mesh_cfg_beacon_set (uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *status)
 Set the target node's network beacon state. More...
 
int bt_mesh_cfg_ttl_get (uint16_t net_idx, uint16_t addr, uint8_t *ttl)
 Get the target node's Time To Live value. More...
 
int bt_mesh_cfg_ttl_set (uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *ttl)
 Set the target node's Time To Live value. More...
 
int bt_mesh_cfg_friend_get (uint16_t net_idx, uint16_t addr, uint8_t *status)
 Get the target node's Friend feature status. More...
 
int bt_mesh_cfg_friend_set (uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *status)
 Set the target node's Friend feature state. More...
 
int bt_mesh_cfg_gatt_proxy_get (uint16_t net_idx, uint16_t addr, uint8_t *status)
 Get the target node's Proxy feature state. More...
 
int bt_mesh_cfg_gatt_proxy_set (uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *status)
 Set the target node's Proxy feature state. More...
 
int bt_mesh_cfg_net_transmit_get (uint16_t net_idx, uint16_t addr, uint8_t *transmit)
 Get the target node's network_transmit state. More...
 
int bt_mesh_cfg_net_transmit_set (uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *transmit)
 Set the target node's network transmit parameters. More...
 
int bt_mesh_cfg_relay_get (uint16_t net_idx, uint16_t addr, uint8_t *status, uint8_t *transmit)
 Get the target node's Relay feature state. More...
 
int bt_mesh_cfg_relay_set (uint16_t net_idx, uint16_t addr, uint8_t new_relay, uint8_t new_transmit, uint8_t *status, uint8_t *transmit)
 Set the target node's Relay parameters. More...
 
int bt_mesh_cfg_net_key_add (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, const uint8_t net_key[16], uint8_t *status)
 Add a network key to the target node. More...
 
int bt_mesh_cfg_net_key_get (uint16_t net_idx, uint16_t addr, uint16_t *keys, size_t *key_cnt)
 Get a list of the target node's network key indexes. More...
 
int bt_mesh_cfg_net_key_del (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, uint8_t *status)
 Delete a network key from the target node. More...
 
int bt_mesh_cfg_app_key_add (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, uint16_t key_app_idx, const uint8_t app_key[16], uint8_t *status)
 Add an application key to the target node. More...
 
int bt_mesh_cfg_app_key_get (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, uint8_t *status, uint16_t *keys, size_t *key_cnt)
 Get a list of the target node's application key indexes for a specific network key. More...
 
int bt_mesh_cfg_app_key_del (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, uint16_t key_app_idx, uint8_t *status)
 Delete an application key from the target node. More...
 
int bt_mesh_cfg_mod_app_bind (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_app_idx, uint16_t mod_id, uint8_t *status)
 Bind an application to a SIG model on the target node. More...
 
int bt_mesh_cfg_mod_app_unbind (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_app_idx, uint16_t mod_id, uint8_t *status)
 Unbind an application from a SIG model on the target node. More...
 
int bt_mesh_cfg_mod_app_bind_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_app_idx, uint16_t mod_id, uint16_t cid, uint8_t *status)
 Bind an application to a vendor model on the target node. More...
 
int bt_mesh_cfg_mod_app_unbind_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_app_idx, uint16_t mod_id, uint16_t cid, uint8_t *status)
 Unbind an application from a vendor model on the target node. More...
 
int bt_mesh_cfg_mod_app_get (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, uint8_t *status, uint16_t *apps, size_t *app_cnt)
 Get a list of all applications bound to a SIG model on the target node. More...
 
int bt_mesh_cfg_mod_app_get_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, uint16_t cid, uint8_t *status, uint16_t *apps, size_t *app_cnt)
 Get a list of all applications bound to a vendor model on the target node. More...
 
int bt_mesh_cfg_mod_pub_get (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, struct bt_mesh_cfg_mod_pub *pub, uint8_t *status)
 Get publish parameters for a SIG model on the target node. More...
 
int bt_mesh_cfg_mod_pub_get_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, uint16_t cid, struct bt_mesh_cfg_mod_pub *pub, uint8_t *status)
 Get publish parameters for a vendor model on the target node. More...
 
int bt_mesh_cfg_mod_pub_set (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, struct bt_mesh_cfg_mod_pub *pub, uint8_t *status)
 Set publish parameters for a SIG model on the target node. More...
 
int bt_mesh_cfg_mod_pub_set_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, uint16_t cid, struct bt_mesh_cfg_mod_pub *pub, uint8_t *status)
 Set publish parameters for a vendor model on the target node. More...
 
int bt_mesh_cfg_mod_sub_add (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t sub_addr, uint16_t mod_id, uint8_t *status)
 Add a group address to a SIG model's subscription list. More...
 
int bt_mesh_cfg_mod_sub_add_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t sub_addr, uint16_t mod_id, uint16_t cid, uint8_t *status)
 Add a group address to a vendor model's subscription list. More...
 
int bt_mesh_cfg_mod_sub_del (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t sub_addr, uint16_t mod_id, uint8_t *status)
 Delete a group address in a SIG model's subscription list. More...
 
int bt_mesh_cfg_mod_sub_del_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t sub_addr, uint16_t mod_id, uint16_t cid, uint8_t *status)
 Delete a group address in a vendor model's subscription list. More...
 
int bt_mesh_cfg_mod_sub_overwrite (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t sub_addr, uint16_t mod_id, uint8_t *status)
 Overwrite all addresses in a SIG model's subscription list with a group address. More...
 
int bt_mesh_cfg_mod_sub_overwrite_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t sub_addr, uint16_t mod_id, uint16_t cid, uint8_t *status)
 Overwrite all addresses in a vendor model's subscription list with a group address. More...
 
int bt_mesh_cfg_mod_sub_va_add (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, const uint8_t label[16], uint16_t mod_id, uint16_t *virt_addr, uint8_t *status)
 Add a virtual address to a SIG model's subscription list. More...
 
int bt_mesh_cfg_mod_sub_va_add_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, const uint8_t label[16], uint16_t mod_id, uint16_t cid, uint16_t *virt_addr, uint8_t *status)
 Add a virtual address to a vendor model's subscription list. More...
 
int bt_mesh_cfg_mod_sub_va_del (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, const uint8_t label[16], uint16_t mod_id, uint16_t *virt_addr, uint8_t *status)
 Delete a virtual address in a SIG model's subscription list. More...
 
int bt_mesh_cfg_mod_sub_va_del_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, const uint8_t label[16], uint16_t mod_id, uint16_t cid, uint16_t *virt_addr, uint8_t *status)
 Delete a virtual address in a vendor model's subscription list. More...
 
int bt_mesh_cfg_mod_sub_va_overwrite (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, const uint8_t label[16], uint16_t mod_id, uint16_t *virt_addr, uint8_t *status)
 Overwrite all addresses in a SIG model's subscription list with a virtual address. More...
 
int bt_mesh_cfg_mod_sub_va_overwrite_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, const uint8_t label[16], uint16_t mod_id, uint16_t cid, uint16_t *virt_addr, uint8_t *status)
 Overwrite all addresses in a vendor model's subscription list with a virtual address. More...
 
int bt_mesh_cfg_mod_sub_get (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, uint8_t *status, uint16_t *subs, size_t *sub_cnt)
 Get the subscription list of a SIG model on the target node. More...
 
int bt_mesh_cfg_mod_sub_get_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, uint16_t cid, uint8_t *status, uint16_t *subs, size_t *sub_cnt)
 Get the subscription list of a vendor model on the target node. More...
 
int bt_mesh_cfg_hb_sub_set (uint16_t net_idx, uint16_t addr, struct bt_mesh_cfg_hb_sub *sub, uint8_t *status)
 Set the target node's Heartbeat subscription parameters. More...
 
int bt_mesh_cfg_hb_sub_get (uint16_t net_idx, uint16_t addr, struct bt_mesh_cfg_hb_sub *sub, uint8_t *status)
 Get the target node's Heartbeta subscription parameters. More...
 
int bt_mesh_cfg_hb_pub_set (uint16_t net_idx, uint16_t addr, const struct bt_mesh_cfg_hb_pub *pub, uint8_t *status)
 Set the target node's Heartbeat publication parameters. More...
 
int bt_mesh_cfg_hb_pub_get (uint16_t net_idx, uint16_t addr, struct bt_mesh_cfg_hb_pub *pub, uint8_t *status)
 Get the target node's Heartbeat publication parameters. More...
 
int bt_mesh_cfg_mod_sub_del_all (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, uint8_t *status)
 Delete all group addresses in a SIG model's subscription list. More...
 
int bt_mesh_cfg_mod_sub_del_all_vnd (uint16_t net_idx, uint16_t addr, uint16_t elem_addr, uint16_t mod_id, uint16_t cid, uint8_t *status)
 Delete all group addresses in a vendor model's subscription list. More...
 
int bt_mesh_cfg_net_key_update (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, const uint8_t net_key[16], uint8_t *status)
 Update a network key to the target node. More...
 
int bt_mesh_cfg_app_key_update (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, uint16_t key_app_idx, const uint8_t app_key[16], uint8_t *status)
 Update an application key to the target node. More...
 
int bt_mesh_cfg_node_identity_set (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, uint8_t new_identity, uint8_t *status, uint8_t *identity)
 Set the Node Identity parameters. More...
 
int bt_mesh_cfg_node_identity_get (uint16_t net_idx, uint16_t addr, uint16_t key_net_idx, uint8_t *status, uint8_t *identity)
 Get the Node Identity parameters. More...
 
int bt_mesh_cfg_lpn_timeout_get (uint16_t net_idx, uint16_t addr, uint16_t unicast_addr, int32_t *polltimeout)
 Get the Low Power Node Polltimeout parameters. More...
 
int32_t bt_mesh_cfg_cli_timeout_get (void)
 Get the current transmission timeout value. More...
 
void bt_mesh_cfg_cli_timeout_set (int32_t timeout)
 Set the transmission timeout value. More...
 
int bt_mesh_comp_p0_get (struct bt_mesh_comp_p0 *comp, struct net_buf_simple *buf)
 Create a composition data page 0 representation from a buffer. More...
 
struct bt_mesh_comp_p0_elembt_mesh_comp_p0_elem_pull (const struct bt_mesh_comp_p0 *comp, struct bt_mesh_comp_p0_elem *elem)
 Pull a composition data page 0 element from a composition data page 0 instance. More...
 
uint16_t bt_mesh_comp_p0_elem_mod (struct bt_mesh_comp_p0_elem *elem, int idx)
 Get a SIG model from the given composition data page 0 element. More...
 
struct bt_mesh_mod_id_vnd bt_mesh_comp_p0_elem_mod_vnd (struct bt_mesh_comp_p0_elem *elem, int idx)
 Get a vendor model from the given composition data page 0 element. More...
 

Detailed Description

Configuration Client Model.

Macro Definition Documentation

◆ BT_MESH_MODEL_CFG_CLI

#define BT_MESH_MODEL_CFG_CLI (   cli_data)

#include <include/bluetooth/mesh/cfg_cli.h>

Value:
BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_CFG_CLI, bt_mesh_cfg_cli_op, NULL, \
cli_data, &bt_mesh_cfg_cli_cb)
#define BT_MESH_MODEL_ID_CFG_CLI
Definition: access.h:106
#define BT_MESH_MODEL_CB(_id, _op, _pub, _user_data, _cb)
Composition data SIG model entry with callback functions.
Definition: access.h:219

Generic Configuration Client model composition data entry.

Parameters
cli_dataPointer to a Configuration Client Model instance.

◆ BT_MESH_PUB_PERIOD_100MS

#define BT_MESH_PUB_PERIOD_100MS (   steps)    ((steps) & BIT_MASK(6))

#include <include/bluetooth/mesh/cfg_cli.h>

Helper macro to encode model publication period in units of 100ms.

Parameters
stepsNumber of 100ms steps.
Returns
Encoded value that can be assigned to bt_mesh_cfg_mod_pub.period

◆ BT_MESH_PUB_PERIOD_10MIN

#define BT_MESH_PUB_PERIOD_10MIN (   steps)    (((steps) & BIT_MASK(6)) | (3 << 6))

#include <include/bluetooth/mesh/cfg_cli.h>

Helper macro to encode model publication period in units of 10 minutes.

Parameters
stepsNumber of 10 minute steps.
Returns
Encoded value that can be assigned to bt_mesh_cfg_mod_pub.period

◆ BT_MESH_PUB_PERIOD_10SEC

#define BT_MESH_PUB_PERIOD_10SEC (   steps)    (((steps) & BIT_MASK(6)) | (2 << 6))

#include <include/bluetooth/mesh/cfg_cli.h>

Helper macro to encode model publication period in units of 10 seconds.

Parameters
stepsNumber of 10 second steps.
Returns
Encoded value that can be assigned to bt_mesh_cfg_mod_pub.period

◆ BT_MESH_PUB_PERIOD_SEC

#define BT_MESH_PUB_PERIOD_SEC (   steps)    (((steps) & BIT_MASK(6)) | (1 << 6))

#include <include/bluetooth/mesh/cfg_cli.h>

Helper macro to encode model publication period in units of 1 second.

Parameters
stepsNumber of 1 second steps.
Returns
Encoded value that can be assigned to bt_mesh_cfg_mod_pub.period

Function Documentation

◆ bt_mesh_cfg_app_key_add()

int bt_mesh_cfg_app_key_add ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
uint16_t  key_app_idx,
const uint8_t  app_key[16],
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Add an application key to the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index the application key belongs to.
key_app_idxApplication key index.
app_keyApplication key.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_app_key_del()

int bt_mesh_cfg_app_key_del ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
uint16_t  key_app_idx,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Delete an application key from the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index the application key belongs to.
key_app_idxApplication key index.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_app_key_get()

int bt_mesh_cfg_app_key_get ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
uint8_t status,
uint16_t keys,
size_t *  key_cnt 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get a list of the target node's application key indexes for a specific network key.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index to request the app key indexes of.
statusStatus response parameter.
keysApp key index list response parameter. Will be filled with all the returned application key indexes it can fill.
key_cntApp key index list length. Should be set to the capacity of the keys list when calling. Will return the number of returned application key indexes upon success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_app_key_update()

int bt_mesh_cfg_app_key_update ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
uint16_t  key_app_idx,
const uint8_t  app_key[16],
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Update an application key to the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index the application key belongs to.
key_app_idxApplication key index.
app_keyApplication key.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_beacon_get()

int bt_mesh_cfg_beacon_get ( uint16_t  net_idx,
uint16_t  addr,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's network beacon state.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
statusStatus response parameter, returns one of BT_MESH_BEACON_DISABLED or BT_MESH_BEACON_ENABLED on success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_beacon_set()

int bt_mesh_cfg_beacon_set ( uint16_t  net_idx,
uint16_t  addr,
uint8_t  val,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the target node's network beacon state.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
valNew network beacon state, should be one of BT_MESH_BEACON_DISABLED or BT_MESH_BEACON_ENABLED.
statusStatus response parameter. Returns one of BT_MESH_BEACON_DISABLED or BT_MESH_BEACON_ENABLED on success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_cli_timeout_get()

int32_t bt_mesh_cfg_cli_timeout_get ( void  )

#include <include/bluetooth/mesh/cfg_cli.h>

Get the current transmission timeout value.

Returns
The configured transmission timeout in milliseconds.

◆ bt_mesh_cfg_cli_timeout_set()

void bt_mesh_cfg_cli_timeout_set ( int32_t  timeout)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the transmission timeout value.

Parameters
timeoutThe new transmission timeout.

◆ bt_mesh_cfg_comp_data_get()

int bt_mesh_cfg_comp_data_get ( uint16_t  net_idx,
uint16_t  addr,
uint8_t  page,
uint8_t rsp,
struct net_buf_simple comp 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's composition data.

If the other device does not have the given composition data page, it will return the largest page number it supports that is less than the requested page index. The actual page the device responds with is returned in rsp.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
pageComposition data page, or 0xff to request the first available page.
rspReturn parameter for the returned page number, or NULL.
compComposition data buffer to fill.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_friend_get()

int bt_mesh_cfg_friend_get ( uint16_t  net_idx,
uint16_t  addr,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's Friend feature status.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
statusStatus response parameter. Returns one of BT_MESH_FRIEND_DISABLED, BT_MESH_FRIEND_ENABLED or BT_MESH_FRIEND_NOT_SUPPORTED on success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_friend_set()

int bt_mesh_cfg_friend_set ( uint16_t  net_idx,
uint16_t  addr,
uint8_t  val,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the target node's Friend feature state.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
valNew Friend feature state. Should be one of BT_MESH_FRIEND_DISABLED or BT_MESH_FRIEND_ENABLED.
statusStatus response parameter. Returns one of BT_MESH_FRIEND_DISABLED, BT_MESH_FRIEND_ENABLED or BT_MESH_FRIEND_NOT_SUPPORTED on success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_gatt_proxy_get()

int bt_mesh_cfg_gatt_proxy_get ( uint16_t  net_idx,
uint16_t  addr,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's Proxy feature state.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
statusStatus response parameter. Returns one of BT_MESH_GATT_PROXY_DISABLED, BT_MESH_GATT_PROXY_ENABLED or BT_MESH_GATT_PROXY_NOT_SUPPORTED on success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_gatt_proxy_set()

int bt_mesh_cfg_gatt_proxy_set ( uint16_t  net_idx,
uint16_t  addr,
uint8_t  val,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the target node's Proxy feature state.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
valNew Proxy feature state. Must be one of BT_MESH_GATT_PROXY_DISABLED or BT_MESH_GATT_PROXY_ENABLED.
statusStatus response parameter. Returns one of BT_MESH_GATT_PROXY_DISABLED, BT_MESH_GATT_PROXY_ENABLED or BT_MESH_GATT_PROXY_NOT_SUPPORTED on success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_hb_pub_get()

int bt_mesh_cfg_hb_pub_get ( uint16_t  net_idx,
uint16_t  addr,
struct bt_mesh_cfg_hb_pub pub,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's Heartbeat publication parameters.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
pubHeartbeat publication parameter return buffer.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_hb_pub_set()

int bt_mesh_cfg_hb_pub_set ( uint16_t  net_idx,
uint16_t  addr,
const struct bt_mesh_cfg_hb_pub pub,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the target node's Heartbeat publication parameters.

Note
The target node must already have received the specified network key.
Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
pubNew Heartbeat publication parameters.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_hb_sub_get()

int bt_mesh_cfg_hb_sub_get ( uint16_t  net_idx,
uint16_t  addr,
struct bt_mesh_cfg_hb_sub sub,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's Heartbeta subscription parameters.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
subHeartbeat subscription parameter return buffer.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_hb_sub_set()

int bt_mesh_cfg_hb_sub_set ( uint16_t  net_idx,
uint16_t  addr,
struct bt_mesh_cfg_hb_sub sub,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the target node's Heartbeat subscription parameters.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
subNew Heartbeat subscription parameters.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_krp_get()

int bt_mesh_cfg_krp_get ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
uint8_t status,
uint8_t phase 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's network key refresh phase state.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index.
statusStatus response parameter.
phasePointer to the Key Refresh variable to fill.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_krp_set()

int bt_mesh_cfg_krp_set ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
uint8_t  transition,
uint8_t status,
uint8_t phase 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the target node's network key refresh phase parameters.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index.
transitionTransition parameter.
statusStatus response parameter.
phasePointer to the new Key Refresh phase. Will return the actual Key Refresh phase after updating.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_lpn_timeout_get()

int bt_mesh_cfg_lpn_timeout_get ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  unicast_addr,
int32_t polltimeout 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the Low Power Node Polltimeout parameters.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
unicast_addrLPN unicast address.
polltimeoutPoltimeout response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_app_bind()

int bt_mesh_cfg_mod_app_bind ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_app_idx,
uint16_t  mod_id,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Bind an application to a SIG model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_app_idxApplication index to bind.
mod_idModel ID.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_app_bind_vnd()

int bt_mesh_cfg_mod_app_bind_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_app_idx,
uint16_t  mod_id,
uint16_t  cid,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Bind an application to a vendor model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_app_idxApplication index to bind.
mod_idModel ID.
cidCompany ID of the model.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_app_get()

int bt_mesh_cfg_mod_app_get ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
uint8_t status,
uint16_t apps,
size_t *  app_cnt 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get a list of all applications bound to a SIG model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
statusStatus response parameter.
appsApp index list response parameter. Will be filled with all the returned application key indexes it can fill.
app_cntApp index list length. Should be set to the capacity of the apps list when calling. Will return the number of returned application key indexes upon success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_app_get_vnd()

int bt_mesh_cfg_mod_app_get_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
uint16_t  cid,
uint8_t status,
uint16_t apps,
size_t *  app_cnt 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get a list of all applications bound to a vendor model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
cidCompany ID of the model.
statusStatus response parameter.
appsApp index list response parameter. Will be filled with all the returned application key indexes it can fill.
app_cntApp index list length. Should be set to the capacity of the apps list when calling. Will return the number of returned application key indexes upon success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_app_unbind()

int bt_mesh_cfg_mod_app_unbind ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_app_idx,
uint16_t  mod_id,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Unbind an application from a SIG model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_app_idxApplication index to unbind.
mod_idModel ID.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_app_unbind_vnd()

int bt_mesh_cfg_mod_app_unbind_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_app_idx,
uint16_t  mod_id,
uint16_t  cid,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Unbind an application from a vendor model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_app_idxApplication index to unbind.
mod_idModel ID.
cidCompany ID of the model.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_pub_get()

int bt_mesh_cfg_mod_pub_get ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
struct bt_mesh_cfg_mod_pub pub,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get publish parameters for a SIG model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
pubPublication parameter return buffer.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_pub_get_vnd()

int bt_mesh_cfg_mod_pub_get_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
uint16_t  cid,
struct bt_mesh_cfg_mod_pub pub,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get publish parameters for a vendor model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
cidCompany ID of the model.
pubPublication parameter return buffer.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_pub_set()

int bt_mesh_cfg_mod_pub_set ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
struct bt_mesh_cfg_mod_pub pub,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set publish parameters for a SIG model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
pubPublication parameters.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_pub_set_vnd()

int bt_mesh_cfg_mod_pub_set_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
uint16_t  cid,
struct bt_mesh_cfg_mod_pub pub,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set publish parameters for a vendor model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
cidCompany ID of the model.
pubPublication parameters.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_add()

int bt_mesh_cfg_mod_sub_add ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  sub_addr,
uint16_t  mod_id,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Add a group address to a SIG model's subscription list.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
sub_addrGroup address to add to the subscription list.
mod_idModel ID.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_add_vnd()

int bt_mesh_cfg_mod_sub_add_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  sub_addr,
uint16_t  mod_id,
uint16_t  cid,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Add a group address to a vendor model's subscription list.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
sub_addrGroup address to add to the subscription list.
mod_idModel ID.
cidCompany ID of the model.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_del()

int bt_mesh_cfg_mod_sub_del ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  sub_addr,
uint16_t  mod_id,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Delete a group address in a SIG model's subscription list.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
sub_addrGroup address to add to the subscription list.
mod_idModel ID.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_del_all()

int bt_mesh_cfg_mod_sub_del_all ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Delete all group addresses in a SIG model's subscription list.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_del_all_vnd()

int bt_mesh_cfg_mod_sub_del_all_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
uint16_t  cid,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Delete all group addresses in a vendor model's subscription list.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
cidCompany ID of the model.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_del_vnd()

int bt_mesh_cfg_mod_sub_del_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  sub_addr,
uint16_t  mod_id,
uint16_t  cid,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Delete a group address in a vendor model's subscription list.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
sub_addrGroup address to add to the subscription list.
mod_idModel ID.
cidCompany ID of the model.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_get()

int bt_mesh_cfg_mod_sub_get ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
uint8_t status,
uint16_t subs,
size_t *  sub_cnt 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the subscription list of a SIG model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
statusStatus response parameter.
subsSubscription list response parameter. Will be filled with all the returned subscriptions it can fill.
sub_cntSubscription list element count. Should be set to the capacity of the subs list when calling. Will return the number of returned subscriptions upon success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_get_vnd()

int bt_mesh_cfg_mod_sub_get_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  mod_id,
uint16_t  cid,
uint8_t status,
uint16_t subs,
size_t *  sub_cnt 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the subscription list of a vendor model on the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
mod_idModel ID.
cidCompany ID of the model.
statusStatus response parameter.
subsSubscription list response parameter. Will be filled with all the returned subscriptions it can fill.
sub_cntSubscription list element count. Should be set to the capacity of the subs list when calling. Will return the number of returned subscriptions upon success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_overwrite()

int bt_mesh_cfg_mod_sub_overwrite ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  sub_addr,
uint16_t  mod_id,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Overwrite all addresses in a SIG model's subscription list with a group address.

Deletes all subscriptions in the model's subscription list, and adds a single group address instead.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
sub_addrGroup address to add to the subscription list.
mod_idModel ID.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_overwrite_vnd()

int bt_mesh_cfg_mod_sub_overwrite_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
uint16_t  sub_addr,
uint16_t  mod_id,
uint16_t  cid,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Overwrite all addresses in a vendor model's subscription list with a group address.

Deletes all subscriptions in the model's subscription list, and adds a single group address instead.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
sub_addrGroup address to add to the subscription list.
mod_idModel ID.
cidCompany ID of the model.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_va_add()

int bt_mesh_cfg_mod_sub_va_add ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
const uint8_t  label[16],
uint16_t  mod_id,
uint16_t virt_addr,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

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

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
labelVirtual address label to add to the subscription list.
mod_idModel ID.
virt_addrVirtual address response parameter.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_va_add_vnd()

int bt_mesh_cfg_mod_sub_va_add_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
const uint8_t  label[16],
uint16_t  mod_id,
uint16_t  cid,
uint16_t virt_addr,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

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

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
labelVirtual address label to add to the subscription list.
mod_idModel ID.
cidCompany ID of the model.
virt_addrVirtual address response parameter.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_va_del()

int bt_mesh_cfg_mod_sub_va_del ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
const uint8_t  label[16],
uint16_t  mod_id,
uint16_t virt_addr,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Delete a virtual address in a SIG model's subscription list.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
labelVirtual address parameter to add to the subscription list.
mod_idModel ID.
virt_addrVirtual address response parameter.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_va_del_vnd()

int bt_mesh_cfg_mod_sub_va_del_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
const uint8_t  label[16],
uint16_t  mod_id,
uint16_t  cid,
uint16_t virt_addr,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Delete a virtual address in a vendor model's subscription list.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
labelVirtual address label to add to the subscription list.
mod_idModel ID.
cidCompany ID of the model.
virt_addrVirtual address response parameter.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_va_overwrite()

int bt_mesh_cfg_mod_sub_va_overwrite ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
const uint8_t  label[16],
uint16_t  mod_id,
uint16_t virt_addr,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Overwrite all addresses in a SIG model's subscription list with a virtual address.

Deletes all subscriptions in the model's subscription list, and adds a single group address instead.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
labelVirtual address label to add to the subscription list.
mod_idModel ID.
virt_addrVirtual address response parameter.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_mod_sub_va_overwrite_vnd()

int bt_mesh_cfg_mod_sub_va_overwrite_vnd ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  elem_addr,
const uint8_t  label[16],
uint16_t  mod_id,
uint16_t  cid,
uint16_t virt_addr,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Overwrite all addresses in a vendor model's subscription list with a virtual address.

Deletes all subscriptions in the model's subscription list, and adds a single group address instead.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
elem_addrElement address the model is in.
labelVirtual address label to add to the subscription list.
mod_idModel ID.
cidCompany ID of the model.
virt_addrVirtual address response parameter.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_net_key_add()

int bt_mesh_cfg_net_key_add ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
const uint8_t  net_key[16],
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Add a network key to the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index.
net_keyNetwork key.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_net_key_del()

int bt_mesh_cfg_net_key_del ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Delete a network key from the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_net_key_get()

int bt_mesh_cfg_net_key_get ( uint16_t  net_idx,
uint16_t  addr,
uint16_t keys,
size_t *  key_cnt 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get a list of the target node's network key indexes.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
keysNet key index list response parameter. Will be filled with all the returned network key indexes it can fill.
key_cntNet key index list length. Should be set to the capacity of the keys list when calling. Will return the number of returned network key indexes upon success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_net_key_update()

int bt_mesh_cfg_net_key_update ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
const uint8_t  net_key[16],
uint8_t status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Update a network key to the target node.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index.
net_keyNetwork key.
statusStatus response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_net_transmit_get()

int bt_mesh_cfg_net_transmit_get ( uint16_t  net_idx,
uint16_t  addr,
uint8_t transmit 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's network_transmit state.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
transmitNetwork transmit response parameter. Returns the encoded network transmission parameters on success. Decoded with BT_MESH_TRANSMIT_COUNT and BT_MESH_TRANSMIT_INT.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_net_transmit_set()

int bt_mesh_cfg_net_transmit_set ( uint16_t  net_idx,
uint16_t  addr,
uint8_t  val,
uint8_t transmit 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the target node's network transmit parameters.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
valNew encoded network transmit parameters.
See also
BT_MESH_TRANSMIT.
Parameters
transmitNetwork transmit response parameter. Returns the encoded network transmission parameters on success. Decoded with BT_MESH_TRANSMIT_COUNT and BT_MESH_TRANSMIT_INT.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_node_identity_get()

int bt_mesh_cfg_node_identity_get ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
uint8_t status,
uint8_t identity 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the Node Identity parameters.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
key_net_idxNetwork key index the application key belongs to.
statusStatus response parameter.
identityIdentity response parameter. Must be one of BT_MESH_NODE_IDENTITY_STOPPED or BT_MESH_NODE_IDENTITY_RUNNING
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_node_identity_set()

int bt_mesh_cfg_node_identity_set ( uint16_t  net_idx,
uint16_t  addr,
uint16_t  key_net_idx,
uint8_t  new_identity,
uint8_t status,
uint8_t identity 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the Node Identity parameters.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
new_identityNew identity state. Must be one of BT_MESH_NODE_IDENTITY_STOPPED or BT_MESH_NODE_IDENTITY_RUNNING
key_net_idxNetwork key index the application key belongs to.
statusStatus response parameter.
identityIdentity response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_node_reset()

int bt_mesh_cfg_node_reset ( uint16_t  net_idx,
uint16_t  addr,
bool status 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Reset the target node and remove it from the network.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
statusStatus response parameter
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_relay_get()

int bt_mesh_cfg_relay_get ( uint16_t  net_idx,
uint16_t  addr,
uint8_t status,
uint8_t transmit 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's Relay feature state.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
statusStatus response parameter. Returns one of BT_MESH_RELAY_DISABLED, BT_MESH_RELAY_ENABLED or BT_MESH_RELAY_NOT_SUPPORTED on success.
transmitTransmit response parameter. Returns the encoded relay transmission parameters on success. Decoded with BT_MESH_TRANSMIT_COUNT and BT_MESH_TRANSMIT_INT.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_relay_set()

int bt_mesh_cfg_relay_set ( uint16_t  net_idx,
uint16_t  addr,
uint8_t  new_relay,
uint8_t  new_transmit,
uint8_t status,
uint8_t transmit 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the target node's Relay parameters.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
new_relayNew relay state. Must be one of BT_MESH_RELAY_DISABLED or BT_MESH_RELAY_ENABLED.
new_transmitNew encoded relay transmit parameters.
See also
BT_MESH_TRANSMIT.
Parameters
statusStatus response parameter. Returns one of BT_MESH_RELAY_DISABLED, BT_MESH_RELAY_ENABLED or BT_MESH_RELAY_NOT_SUPPORTED on success.
transmitTransmit response parameter. Returns the encoded relay transmission parameters on success. Decoded with BT_MESH_TRANSMIT_COUNT and BT_MESH_TRANSMIT_INT.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_ttl_get()

int bt_mesh_cfg_ttl_get ( uint16_t  net_idx,
uint16_t  addr,
uint8_t ttl 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get the target node's Time To Live value.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
ttlTTL response buffer.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_cfg_ttl_set()

int bt_mesh_cfg_ttl_set ( uint16_t  net_idx,
uint16_t  addr,
uint8_t  val,
uint8_t ttl 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Set the target node's Time To Live value.

Parameters
net_idxNetwork index to encrypt with.
addrTarget node address.
valNew Time To Live value.
ttlTTL response buffer.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_comp_p0_elem_mod()

uint16_t bt_mesh_comp_p0_elem_mod ( struct bt_mesh_comp_p0_elem elem,
int  idx 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get a SIG model from the given composition data page 0 element.

Parameters
elemElement to read the model from.
idxIndex of the SIG model to read.
Returns
The Model ID of the SIG model at the given index, or 0xffff if the index is out of bounds.

◆ bt_mesh_comp_p0_elem_mod_vnd()

struct bt_mesh_mod_id_vnd bt_mesh_comp_p0_elem_mod_vnd ( struct bt_mesh_comp_p0_elem elem,
int  idx 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Get a vendor model from the given composition data page 0 element.

Parameters
elemElement to read the model from.
idxIndex of the vendor model to read.
Returns
The model ID of the vendor model at the given index, or {0xffff, 0xffff} if the index is out of bounds.

◆ bt_mesh_comp_p0_elem_pull()

struct bt_mesh_comp_p0_elem * bt_mesh_comp_p0_elem_pull ( const struct bt_mesh_comp_p0 comp,
struct bt_mesh_comp_p0_elem elem 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Pull a composition data page 0 element from a composition data page 0 instance.

Each call to this function will pull out a new element from the composition data page, until all elements have been pulled.

Parameters
compComposition data page
elemElement to fill.
Returns
A pointer to elem on success, or NULL if no more elements could be pulled.

◆ bt_mesh_comp_p0_get()

int bt_mesh_comp_p0_get ( struct bt_mesh_comp_p0 comp,
struct net_buf_simple buf 
)

#include <include/bluetooth/mesh/cfg_cli.h>

Create a composition data page 0 representation from a buffer.

The composition data page object will take ownership over the buffer, which should not be manipulated directly after this call.

This function can be used in combination with bt_mesh_cfg_comp_data_get to read out composition data page 0 from other devices:

struct bt_mesh_comp_p0 comp;
err = bt_mesh_cfg_comp_data_get(net_idx, addr, 0, &page, &buf);
if (!err) {
bt_mesh_comp_p0_get(&comp, &buf);
}
#define BT_MESH_RX_SDU_MAX
Definition: access.h:65
int bt_mesh_comp_p0_get(struct bt_mesh_comp_p0 *comp, struct net_buf_simple *buf)
Create a composition data page 0 representation from a buffer.
int bt_mesh_cfg_comp_data_get(uint16_t net_idx, uint16_t addr, uint8_t page, uint8_t *rsp, struct net_buf_simple *comp)
Get the target node's composition data.
#define NET_BUF_SIMPLE_DEFINE(_name, _size)
Define a net_buf_simple stack variable.
Definition: buf.h:46
Definition: cfg_cli.h:1078
Parameters
bufNetwork buffer containing composition data.
compComposition data structure to fill.
Returns
0 on success, or (negative) error code on failure.