bt_mesh_subnet_update() function
Update the given Subnet. Starts the Key Refresh procedure for this Subnet by adding a second set of encryption keys. The Subnet will continue sending with the old key (but receiving messages using both) until the Subnet enters Key Refresh phase 2. This allows a network configurator to replace old network and application keys for the entire network, effectively removing access for all nodes that aren't given the new keys.
Syntax
uint8_t bt_mesh_subnet_update(uint16_t net_idx,
const uint8_t key[16]);
Arguments
key
New root network key of the Subnet.
Return value
STATUS_SUCCESS The Subnet was updated with a second key. STATUS_INVALID_NETKEY The NetIdx is unknown. STATUS_IDX_ALREADY_STORED The @c key value is the same as the current key. STATUS_CANNOT_UPDATE The Subnet cannot be updated for some reason.