mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-07 09:32:36 +00:00
Make it possible to provision devices over advertising bearer (PB-ADV). Many messages in the provisioning protocol are the same for provisioner and device so much of the code could be reused by only changing when they are expected to arrive. This introduces to concept of local and remote device keys. The models for cfg_cli and cfg_srv have been updated to reflect this concept. Both the send and receive path in the transport layer have been updated to support encrypting/decrypting with local and remote device keys. When a node has been provisioned it is stored in bt_mesh_net.nodes. If CONFIG_BT_SETTINGS is enabled, they are also saved to settings. If the callback node_added in bt_mesh_prov has been set, it will be called for every node that gets provisioned. This includes when they are retrieved from settings. The configuration CONFIG_BT_MESH_NODE_COUNT controls how many nodes that can be provisioned. Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
11 lines
290 B
C
11 lines
290 B
C
/*
|
|
* Copyright (c) 2019 Tobias Svehagen
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
struct bt_mesh_node *bt_mesh_node_find(u16_t addr);
|
|
struct bt_mesh_node *bt_mesh_node_alloc(u16_t addr, u8_t num_elem,
|
|
u16_t net_idx);
|
|
void bt_mesh_node_del(struct bt_mesh_node *node, bool store);
|