Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Bluetooth mesh. More...
Modules | |
Access layer | |
Access layer. | |
Configuration Client Model | |
Configuration Client Model. | |
Configuration Server Model | |
Configuration Server Model. | |
Health Client Model | |
Health Client Model. | |
Health Server Model | |
Health Server Model. | |
Health faults | |
List of specification defined Health fault values. | |
Heartbeat | |
Heartbeat. | |
Message | |
Message. | |
Provisioning | |
Provisioning. | |
Proxy | |
Proxy. | |
Runtime Configuration | |
Runtime Configuration. | |
Data Structures | |
struct | bt_mesh_lpn_cb |
struct | bt_mesh_friend_cb |
Macros | |
#define | BT_MESH_NET_PRIMARY 0x000 |
#define | BT_MESH_FEAT_RELAY BIT(0) |
#define | BT_MESH_FEAT_PROXY BIT(1) |
#define | BT_MESH_FEAT_FRIEND BIT(2) |
#define | BT_MESH_FEAT_LOW_POWER BIT(3) |
#define | BT_MESH_FEAT_SUPPORTED |
#define | BT_MESH_LPN_CB_DEFINE(_name) |
Register a callback structure for Friendship events. More... | |
#define | BT_MESH_FRIEND_CB_DEFINE(_name) |
Register a callback structure for Friendship events. More... | |
Functions | |
int | bt_mesh_init (const struct bt_mesh_prov *prov, const struct bt_mesh_comp *comp) |
Initialize Mesh support. More... | |
void | bt_mesh_reset (void) |
Reset the state of the local Mesh node. More... | |
int | bt_mesh_suspend (void) |
Suspend the Mesh network temporarily. More... | |
int | bt_mesh_resume (void) |
Resume a suspended Mesh network. More... | |
void | bt_mesh_iv_update_test (bool enable) |
Toggle the IV Update test mode. More... | |
bool | bt_mesh_iv_update (void) |
Toggle the IV Update state. More... | |
int | bt_mesh_lpn_set (bool enable) |
Toggle the Low Power feature of the local device. More... | |
int | bt_mesh_lpn_poll (void) |
Send out a Friend Poll message. More... | |
int | bt_mesh_friend_terminate (uint16_t lpn_addr) |
Terminate Friendship. More... | |
void | bt_mesh_rpl_pending_store (uint16_t addr) |
Store pending RPL entry(ies) in the persistent storage. More... | |
Bluetooth mesh.
#define BT_MESH_FEAT_FRIEND BIT(2) |
#include <include/bluetooth/mesh/main.h>
Friend feature
#define BT_MESH_FEAT_LOW_POWER BIT(3) |
#include <include/bluetooth/mesh/main.h>
Low Power Node feature
#define BT_MESH_FEAT_PROXY BIT(1) |
#include <include/bluetooth/mesh/main.h>
GATT Proxy feature
#define BT_MESH_FEAT_RELAY BIT(0) |
#include <include/bluetooth/mesh/main.h>
Relay feature
#define BT_MESH_FEAT_SUPPORTED |
#include <include/bluetooth/mesh/main.h>
#define BT_MESH_FRIEND_CB_DEFINE | ( | _name | ) |
#include <include/bluetooth/mesh/main.h>
Register a callback structure for Friendship events.
Registers a callback structure that will be called whenever Friendship gets established or terminated.
_name | Name of callback structure. |
#define BT_MESH_LPN_CB_DEFINE | ( | _name | ) |
#include <include/bluetooth/mesh/main.h>
Register a callback structure for Friendship events.
_name | Name of callback structure. |
#define BT_MESH_NET_PRIMARY 0x000 |
#include <include/bluetooth/mesh/main.h>
int bt_mesh_friend_terminate | ( | uint16_t | lpn_addr | ) |
#include <include/bluetooth/mesh/main.h>
Terminate Friendship.
Terminated Friendship for given LPN.
lpn_addr | Low Power Node address. |
int bt_mesh_init | ( | const struct bt_mesh_prov * | prov, |
const struct bt_mesh_comp * | comp | ||
) |
#include <include/bluetooth/mesh/main.h>
Initialize Mesh support.
After calling this API, the node will not automatically advertise as unprovisioned, rather the bt_mesh_prov_enable() API needs to be called to enable unprovisioned advertising on one or more provisioning bearers.
prov | Node provisioning information. |
comp | Node Composition. |
#include <include/bluetooth/mesh/main.h>
Toggle the IV Update state.
This API is only available if the IV Update test mode has been enabled in Kconfig. It is needed for passing most of the IV Update qualification test cases.
#include <include/bluetooth/mesh/main.h>
Toggle the IV Update test mode.
This API is only available if the IV Update test mode has been enabled in Kconfig. It is needed for passing most of the IV Update qualification test cases.
enable | true to enable IV Update test mode, false to disable it. |
int bt_mesh_lpn_poll | ( | void | ) |
#include <include/bluetooth/mesh/main.h>
Send out a Friend Poll message.
Send a Friend Poll message to the Friend of this node. If there is no established Friendship the function will return an error.
int bt_mesh_lpn_set | ( | bool | enable | ) |
#include <include/bluetooth/mesh/main.h>
Toggle the Low Power feature of the local device.
Enables or disables the Low Power feature of the local device. This is exposed as a run-time feature, since the device might want to change this e.g. based on being plugged into a stable power source or running from a battery power source.
enable | true to enable LPN functionality, false to disable it. |
#include <include/bluetooth/mesh/main.h>
Reset the state of the local Mesh node.
Resets the state of the node, which means that it needs to be reprovisioned to become an active node in a Mesh network again.
After calling this API, the node will not automatically advertise as unprovisioned, rather the bt_mesh_prov_enable() API needs to be called to enable unprovisioned advertising on one or more provisioning bearers.
int bt_mesh_resume | ( | void | ) |
#include <include/bluetooth/mesh/main.h>
Resume a suspended Mesh network.
This API resumes the local node, after it has been suspended using the bt_mesh_suspend() API.
#include <include/bluetooth/mesh/main.h>
Store pending RPL entry(ies) in the persistent storage.
This API allows the user to store pending RPL entry(ies) in the persistent storage without waiting for the timeout.
addr | Address of the node which RPL entry needs to be stored or BT_MESH_ADDR_ALL_NODES to store all pending RPL entries. |
int bt_mesh_suspend | ( | void | ) |
#include <include/bluetooth/mesh/main.h>
Suspend the Mesh network temporarily.
This API can be used for power saving purposes, but the user should be aware that leaving the local node suspended for a long period of time may cause it to become permanently disconnected from the Mesh network. If at all possible, the Friendship feature should be used instead, to make the node into a Low Power Node.