Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
main.h File Reference

Bluetooth mesh Profile APIs. More...

Go to the source code of this file.

Data Structures

struct  bt_mesh_dev_capabilities
 
struct  bt_mesh_prov
 
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...
 

Enumerations

enum  bt_mesh_output_action_t {
  BT_MESH_NO_OUTPUT = 0 , BT_MESH_BLINK = BIT(0) , BT_MESH_BEEP = BIT(1) , BT_MESH_VIBRATE = BIT(2) ,
  BT_MESH_DISPLAY_NUMBER = BIT(3) , BT_MESH_DISPLAY_STRING = BIT(4)
}
 
enum  bt_mesh_input_action_t {
  BT_MESH_NO_INPUT = 0 , BT_MESH_PUSH = BIT(0) , BT_MESH_TWIST = BIT(1) , BT_MESH_ENTER_NUMBER = BIT(2) ,
  BT_MESH_ENTER_STRING = BIT(3)
}
 
enum  bt_mesh_prov_bearer_t { BT_MESH_PROV_ADV = BIT(0) , BT_MESH_PROV_GATT = BIT(1) }
 
enum  bt_mesh_prov_oob_info_t {
  BT_MESH_PROV_OOB_OTHER = BIT(0) , BT_MESH_PROV_OOB_URI = BIT(1) , BT_MESH_PROV_OOB_2D_CODE = BIT(2) , BT_MESH_PROV_OOB_BAR_CODE = BIT(3) ,
  BT_MESH_PROV_OOB_NFC = BIT(4) , BT_MESH_PROV_OOB_NUMBER = BIT(5) , BT_MESH_PROV_OOB_STRING = BIT(6) , BT_MESH_PROV_OOB_ON_BOX = BIT(11) ,
  BT_MESH_PROV_OOB_IN_BOX = BIT(12) , BT_MESH_PROV_OOB_ON_PAPER = BIT(13) , BT_MESH_PROV_OOB_IN_MANUAL = BIT(14) , BT_MESH_PROV_OOB_ON_DEV = BIT(15)
}
 

Functions

int bt_mesh_input_string (const char *str)
 Provide provisioning input OOB string. More...
 
int bt_mesh_input_number (uint32_t num)
 Provide provisioning input OOB number. More...
 
int bt_mesh_prov_remote_pub_key_set (const uint8_t public_key[64])
 Provide Device public key. More...
 
int bt_mesh_auth_method_set_input (bt_mesh_input_action_t action, uint8_t size)
 Use Input OOB authentication. More...
 
int bt_mesh_auth_method_set_output (bt_mesh_output_action_t action, uint8_t size)
 Use Output OOB authentication. More...
 
int bt_mesh_auth_method_set_static (const uint8_t *static_val, uint8_t size)
 Use static OOB authentication. More...
 
int bt_mesh_auth_method_set_none (void)
 Don't use OOB authentication. More...
 
int bt_mesh_prov_enable (bt_mesh_prov_bearer_t bearers)
 Enable specific provisioning bearers. More...
 
int bt_mesh_prov_disable (bt_mesh_prov_bearer_t bearers)
 Disable specific provisioning bearers. More...
 
int bt_mesh_provision (const uint8_t net_key[16], uint16_t net_idx, uint8_t flags, uint32_t iv_index, uint16_t addr, const uint8_t dev_key[16])
 Provision the local Mesh Node. More...
 
int bt_mesh_provision_adv (const uint8_t uuid[16], uint16_t net_idx, uint16_t addr, uint8_t attention_duration)
 Provision a Mesh Node using PB-ADV. More...
 
bool bt_mesh_is_provisioned (void)
 Check if the local node has been provisioned. More...
 
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...
 

Detailed Description

Bluetooth mesh Profile APIs.