10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_MAIN_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_MAIN_H_
450#define BT_MESH_NET_PRIMARY 0x000
453#define BT_MESH_FEAT_RELAY BIT(0)
455#define BT_MESH_FEAT_PROXY BIT(1)
457#define BT_MESH_FEAT_FRIEND BIT(2)
459#define BT_MESH_FEAT_LOW_POWER BIT(3)
460#define BT_MESH_FEAT_SUPPORTED (BT_MESH_FEAT_RELAY | \
461 BT_MESH_FEAT_PROXY | \
462 BT_MESH_FEAT_FRIEND | \
463 BT_MESH_FEAT_LOW_POWER)
601#define BT_MESH_LPN_CB_DEFINE(_name) \
602 static const STRUCT_SECTION_ITERABLE(bt_mesh_lpn_cb, \
603 _CONCAT(bt_mesh_lpn_cb_, \
654#define BT_MESH_FRIEND_CB_DEFINE(_name) \
655 static const STRUCT_SECTION_ITERABLE(bt_mesh_friend_cb, \
656 _CONCAT(bt_mesh_friend_cb_, \
void
Definition: eswifi_shell.c:15
bool bt_mesh_is_provisioned(void)
Check if the local node has been provisioned.
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.
int bt_mesh_input_string(const char *str)
Provide provisioning input OOB string.
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.
bt_mesh_output_action_t
Definition: main.h:25
int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers)
Enable specific provisioning bearers.
int bt_mesh_auth_method_set_static(const uint8_t *static_val, uint8_t size)
Use static OOB authentication.
int bt_mesh_auth_method_set_input(bt_mesh_input_action_t action, uint8_t size)
Use Input OOB authentication.
bt_mesh_prov_bearer_t
Definition: main.h:44
int bt_mesh_auth_method_set_none(void)
Don't use OOB authentication.
int bt_mesh_prov_disable(bt_mesh_prov_bearer_t bearers)
Disable specific provisioning bearers.
int bt_mesh_input_number(uint32_t num)
Provide provisioning input OOB number.
int bt_mesh_auth_method_set_output(bt_mesh_output_action_t action, uint8_t size)
Use Output OOB authentication.
int bt_mesh_prov_remote_pub_key_set(const uint8_t public_key[64])
Provide Device public key.
bt_mesh_input_action_t
Definition: main.h:35
bt_mesh_prov_oob_info_t
Definition: main.h:50
@ BT_MESH_DISPLAY_NUMBER
Definition: main.h:30
@ BT_MESH_DISPLAY_STRING
Definition: main.h:31
@ BT_MESH_VIBRATE
Definition: main.h:29
@ BT_MESH_BLINK
Definition: main.h:27
@ BT_MESH_NO_OUTPUT
Definition: main.h:26
@ BT_MESH_BEEP
Definition: main.h:28
@ BT_MESH_PROV_GATT
Definition: main.h:46
@ BT_MESH_PROV_ADV
Definition: main.h:45
@ BT_MESH_ENTER_STRING
Definition: main.h:40
@ BT_MESH_ENTER_NUMBER
Definition: main.h:39
@ BT_MESH_NO_INPUT
Definition: main.h:36
@ BT_MESH_TWIST
Definition: main.h:38
@ BT_MESH_PUSH
Definition: main.h:37
@ BT_MESH_PROV_OOB_ON_PAPER
Definition: main.h:61
@ BT_MESH_PROV_OOB_2D_CODE
Definition: main.h:53
@ BT_MESH_PROV_OOB_OTHER
Definition: main.h:51
@ BT_MESH_PROV_OOB_IN_MANUAL
Definition: main.h:62
@ BT_MESH_PROV_OOB_STRING
Definition: main.h:57
@ BT_MESH_PROV_OOB_ON_DEV
Definition: main.h:63
@ BT_MESH_PROV_OOB_BAR_CODE
Definition: main.h:54
@ BT_MESH_PROV_OOB_NUMBER
Definition: main.h:56
@ BT_MESH_PROV_OOB_URI
Definition: main.h:52
@ BT_MESH_PROV_OOB_NFC
Definition: main.h:55
@ BT_MESH_PROV_OOB_ON_BOX
Definition: main.h:59
@ BT_MESH_PROV_OOB_IN_BOX
Definition: main.h:60
int bt_mesh_friend_terminate(uint16_t lpn_addr)
Terminate Friendship.
int bt_mesh_lpn_poll(void)
Send out a Friend Poll message.
void bt_mesh_iv_update_test(bool enable)
Toggle the IV Update test mode.
int bt_mesh_init(const struct bt_mesh_prov *prov, const struct bt_mesh_comp *comp)
Initialize Mesh support.
void bt_mesh_rpl_pending_store(uint16_t addr)
Store pending RPL entry(ies) in the persistent storage.
void bt_mesh_reset(void)
Reset the state of the local Mesh node.
int bt_mesh_suspend(void)
Suspend the Mesh network temporarily.
int bt_mesh_lpn_set(bool enable)
Toggle the Low Power feature of the local device.
int bt_mesh_resume(void)
Resume a suspended Mesh network.
bool bt_mesh_iv_update(void)
Toggle the IV Update state.
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition: util_macro.h:44
flags
Definition: http_parser.h:131
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
bt_mesh_output_action_t output_actions
Definition: main.h:81
uint8_t output_size
Definition: main.h:87
bt_mesh_input_action_t input_actions
Definition: main.h:84
uint16_t algorithms
Definition: main.h:72
uint8_t pub_key_type
Definition: main.h:75
uint8_t static_oob
Definition: main.h:78
uint8_t input_size
Definition: main.h:90
uint8_t elem_count
Definition: main.h:69
void(* terminated)(uint16_t net_idx, uint16_t lpn_addr)
Friendship terminated.
Definition: main.h:629
void(* polled)(uint16_t net_idx, uint16_t lpn_addr)
Friend Poll Request.
Definition: main.h:642
void(* established)(uint16_t net_idx, uint16_t lpn_addr, uint8_t recv_delay, uint32_t polltimeout)
Friendship established.
Definition: main.h:618
void(* established)(uint16_t net_idx, uint16_t friend_addr, uint8_t queue_size, uint8_t recv_window)
Friendship established.
Definition: main.h:567
void(* polled)(uint16_t net_idx, uint16_t friend_addr, bool retry)
Local Poll Request.
Definition: main.h:592
void(* terminated)(uint16_t net_idx, uint16_t friend_addr)
Friendship terminated.
Definition: main.h:578
void(* link_close)(bt_mesh_prov_bearer_t bearer)
Provisioning link has been closed.
Definition: main.h:232
const uint8_t * uuid
Definition: main.h:96
const uint8_t * public_key_be
Definition: main.h:115
const uint8_t * private_key_be
Definition: main.h:123
void(* input_complete)(void)
The other device finished their OOB input.
Definition: main.h:200
int(* output_string)(const char *str)
Output of a string is requested.
Definition: main.h:176
int(* input)(bt_mesh_input_action_t act, uint8_t size)
Input is requested.
Definition: main.h:192
void(* link_open)(bt_mesh_prov_bearer_t bearer)
Provisioning link has been opened.
Definition: main.h:223
uint8_t output_size
Definition: main.h:131
const char * uri
Definition: main.h:103
bt_mesh_prov_oob_info_t oob_info
Definition: main.h:106
void(* unprovisioned_beacon)(uint8_t uuid[16], bt_mesh_prov_oob_info_t oob_info, uint32_t *uri_hash)
Unprovisioned beacon has been received.
Definition: main.h:212
uint16_t output_actions
Definition: main.h:133
uint8_t static_val_len
Definition: main.h:128
const uint8_t * static_val
Definition: main.h:126
void(* node_added)(uint16_t net_idx, uint8_t uuid[16], uint16_t addr, uint8_t num_elem)
A new node has been added to the provisioning database.
Definition: main.h:256
uint8_t input_size
Definition: main.h:136
void(* complete)(uint16_t net_idx, uint16_t addr)
Provisioning is complete.
Definition: main.h:243
void(* reset)(void)
Node has been reset.
Definition: main.h:267
int(* output_number)(bt_mesh_output_action_t act, uint32_t num)
Output of a number is requested.
Definition: main.h:165
uint16_t input_actions
Definition: main.h:138
void(* capabilities)(const struct bt_mesh_dev_capabilities *cap)
Provisioning Capabilities.
Definition: main.h:153