bt_mesh_subnet_add() function
Add a Subnet. Adds a subnet with the given network index and network key to the list of known Subnets. All messages sent on the given Subnet will be processed by this node, and the node may send and receive Network Beacons on the given Subnet.
Syntax
uint8_t bt_mesh_subnet_add(uint16_t net_idx,
const uint8_t key[16]);
Arguments
key
Root network key of the Subnet. All other keys are derived from this.
Return value
STATUS_SUCCESS The Subnet was successfully added. STATUS_INSUFF_RESOURCES No room for this Subnet. STATUS_UNSPECIFIED The Subnet couldn't be created for some reason.
bt_mesh_subnet_add() is called by 1 function and calls 4 functions:
![]()
bt_mesh_subnet_add()
bt_mesh_subnet_add() reads 6 variables and writes 3 variables:
![]()
bt_mesh_subnet_add()