ESP-BLE-MESH

With various features of ESP-BLE-MESH, users can create a managed flooding mesh network for several scenarios, such as lighting, sensor and etc.

For an ESP32 to join and work on a ESP-BLE-MESH network, it must be provisioned firstly. By provisioning, the ESP32, as an unprovisioned device, will join the ESP-BLE-MESH network and become a ESP-BLE-MESH node, communicating with other nodes within or beyond the radio range.

Apart from ESP-BLE-MESH nodes, inside ESP-BLE-MESH network, there is also ESP32 that works as ESP-BLE-MESH Provisioner, which could provision unprovisioned devices into ESP-BLE-MESH nodes and configure the nodes with various features.

For information how to start using ESP32 and ESP-BLE-MESH, please see the Section ESP-BLE-MESH 快速入门. If you are interested in information on ESP-BLE-MESH architecture, including some details of software implementation, please see Section ESP-BLE-MESH 架构.

Application Examples and Demos

Please refer to Sections ESP-BLE-MESH 示例 and ESP-BLE-MESH 演示视频.

API Reference

ESP-BLE-MESH APIs are divided into the following parts:

ESP-BLE-MESH Definitions

This section contains only one header file, which lists the following items of ESP-BLE-MESH.

  • ID of all the models and related message opcodes

  • Structs of model, element and Composition Data

  • Structs of used by ESP-BLE-MESH Node/Provisioner for provisioning

  • Structs used to transmit/receive messages

  • Event types and related event parameters

Header File

Unions

union esp_ble_mesh_prov_cb_param_t
#include <esp_ble_mesh_defs.h>

BLE Mesh Node/Provisioner callback parameters union.

Public Members

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_prov_register_comp_param prov_register_comp

Event parameter of ESP_BLE_MESH_PROV_REGISTER_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_set_unprov_dev_name_comp_param node_set_unprov_dev_name_comp

Event parameter of ESP_BLE_MESH_NODE_SET_UNPROV_DEV_NAME_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_prov_enable_comp_param node_prov_enable_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_ENABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_prov_disable_comp_param node_prov_disable_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_DISABLE_COMP_EVT

Event parameter of ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT

Event parameter of ESP_BLE_MESH_NODE_PROV_LINK_CLOSE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_output_num_evt_param node_prov_output_num

Event parameter of ESP_BLE_MESH_NODE_PROV_OUTPUT_NUMBER_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_output_str_evt_param node_prov_output_str

Event parameter of ESP_BLE_MESH_NODE_PROV_OUTPUT_STRING_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_input_evt_param node_prov_input

Event parameter of ESP_BLE_MESH_NODE_PROV_INPUT_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provision_complete_evt_param node_prov_complete

Event parameter of ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provision_reset_param node_prov_reset

Event parameter of ESP_BLE_MESH_NODE_PROV_RESET_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_set_oob_pub_key_comp_param node_prov_set_oob_pub_key_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_SET_OOB_PUB_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_input_number_comp_param node_prov_input_num_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_INPUT_NUM_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_input_string_comp_param node_prov_input_str_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_INPUT_STR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_identity_enable_comp_param node_proxy_identity_enable_comp

Event parameter of ESP_BLE_MESH_NODE_PROXY_IDENTITY_ENABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_gatt_enable_comp_param node_proxy_gatt_enable_comp

Event parameter of ESP_BLE_MESH_NODE_PROXY_GATT_ENABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_gatt_disable_comp_param node_proxy_gatt_disable_comp

Event parameter of ESP_BLE_MESH_NODE_PROXY_GATT_DISABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_node_add_local_net_key_comp_param node_add_net_key_comp

Event parameter of ESP_BLE_MESH_NODE_ADD_LOCAL_NET_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_node_add_local_app_key_comp_param node_add_app_key_comp

Event parameter of ESP_BLE_MESH_NODE_ADD_LOCAL_APP_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_node_bind_local_mod_app_comp_param node_bind_app_key_to_model_comp

Event parameter of ESP_BLE_MESH_NODE_BIND_APP_KEY_TO_MODEL_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_recv_unprov_adv_pkt_param provisioner_recv_unprov_adv_pkt

Event parameter of ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_enable_comp_param provisioner_prov_enable_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_disable_comp_param provisioner_prov_disable_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_DISABLE_COMP_EVT

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_LINK_OPEN_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_read_oob_pub_key_evt_param provisioner_prov_read_oob_pub_key

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_input_evt_param provisioner_prov_input

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_INPUT_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_output_evt_param provisioner_prov_output

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_OUTPUT_EVT

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_LINK_CLOSE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_comp_param provisioner_prov_complete

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_add_unprov_dev_comp_param provisioner_add_unprov_dev_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_ADD_UNPROV_DEV_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_dev_with_addr_comp_param provisioner_prov_dev_with_addr_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_DEV_WITH_ADDR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_delete_dev_comp_param provisioner_delete_dev_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_DELETE_DEV_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_dev_uuid_match_comp_param provisioner_set_dev_uuid_match_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_prov_data_info_comp_param provisioner_set_prov_data_info_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_PROV_DATA_INFO_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_static_oob_val_comp_param provisioner_set_static_oob_val_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_STATIC_OOB_VALUE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_primary_elem_addr_comp_param provisioner_set_primary_elem_addr_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_PRIMARY_ELEM_ADDR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_read_oob_pub_key_comp_param provisioner_prov_read_oob_pub_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_input_num_comp_param provisioner_prov_input_num_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_INPUT_NUMBER_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_input_str_comp_param provisioner_prov_input_str_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_INPUT_STRING_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_node_name_comp_param provisioner_set_node_name_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_NODE_NAME_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_add_local_app_key_comp_param provisioner_add_app_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_update_local_app_key_comp_param provisioner_update_app_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_APP_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_bind_local_mod_app_comp_param provisioner_bind_app_key_to_model_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_add_local_net_key_comp_param provisioner_add_net_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_NET_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_update_local_net_key_comp_param provisioner_update_net_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_NET_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_store_node_comp_data_comp_param provisioner_store_node_comp_data_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_STORE_NODE_COMP_DATA_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_delete_node_with_uuid_comp_param provisioner_delete_node_with_uuid_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_UUID_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_delete_node_with_addr_comp_param provisioner_delete_node_with_addr_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_ADDR_COMP_EVT

int err_code

Indicate the result of enabling/disabling to receive heartbeat messages by the Provisioner

Indicate the result of setting the heartbeat filter type by the Provisioner

Indicate the result of setting the heartbeat filter address by the Provisioner

Indicate the result of directly erasing settings by the Provisioner

Indicate the result of opening settings with index by the Provisioner

Indicate the result of opening settings with user id by the Provisioner

Indicate the result of closing settings with index by the Provisioner

Indicate the result of closing settings with user id by the Provisioner

Indicate the result of deleting settings with index by the Provisioner

Indicate the result of deleting settings with user id by the Provisioner

bool enable

Indicate enabling or disabling receiving heartbeat messages

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_enable_heartbeat_recv_comp

ESP_BLE_MESH_PROVISIONER_ENABLE_HEARTBEAT_RECV_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_ENABLE_HEARTBEAT_RECV_COMP_EVT

uint8_t type

Type of the filter used for receiving heartbeat messages

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_set_heartbeat_filter_type_comp

ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_TYPE_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_TYPE_COMP_EVT

uint8_t op

Operation (add, remove, clean)

uint16_t hb_src

Heartbeat source address

uint16_t hb_dst

Heartbeat destination address

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_set_heartbeat_filter_info_comp

ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_INFO_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_INFO_COMP_EVT

uint8_t init_ttl

Heartbeat InitTTL

uint8_t rx_ttl

Heartbeat RxTTL

uint8_t hops

Heartbeat hops (InitTTL - RxTTL + 1)

uint16_t feature

Bit field of currently active features of the node

int8_t rssi

RSSI of the heartbeat message

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_recv_heartbeat

ESP_BLE_MESH_PROVISIONER_RECV_HEARTBEAT_MESSAGE_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_RECV_HEARTBEAT_MESSAGE_EVT

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_direct_erase_settings_comp

ESP_BLE_MESH_PROVISIONER_DIRECT_ERASE_SETTINGS_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_DIRECT_ERASE_SETTINGS_COMP_EVT

uint8_t index

Index of Provisioner settings

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_open_settings_with_index_comp

ESP_BLE_MESH_PROVISIONER_OPEN_SETTINGS_WITH_INDEX_COMP_EVT.

Event parameter of ESP_BLE_MESH_PROVISIONER_OPEN_SETTINGS_WITH_INDEX_COMP_EVT

char uid[ESP_BLE_MESH_SETTINGS_UID_SIZE + 1]

Provisioner settings user id

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_open_settings_with_uid_comp

ESP_BLE_MESH_PROVISIONER_OPEN_SETTINGS_WITH_UID_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_OPEN_SETTINGS_WITH_UID_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_close_settings_with_index_comp

ESP_BLE_MESH_PROVISIONER_CLOSE_SETTINGS_WITH_INDEX_COMP_EVT.

Event parameter of ESP_BLE_MESH_PROVISIONER_CLOSE_SETTINGS_WITH_INDEX_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_close_settings_with_uid_comp

ESP_BLE_MESH_PROVISIONER_CLOSE_SETTINGS_WITH_UID_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_CLOSE_SETTINGS_WITH_UID_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_delete_settings_with_index_comp

ESP_BLE_MESH_PROVISIONER_DELETE_SETTINGS_WITH_INDEX_COMP_EVT.

Event parameter of ESP_BLE_MESH_PROVISIONER_DELETE_SETTINGS_WITH_INDEX_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_delete_settings_with_uid_comp

ESP_BLE_MESH_PROVISIONER_DELETE_SETTINGS_WITH_UID_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_DELETE_SETTINGS_WITH_UID_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_set_fast_prov_info_comp_param set_fast_prov_info_comp

Event parameter of ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_set_fast_prov_action_comp_param set_fast_prov_action_comp

Event parameter of ESP_BLE_MESH_SET_FAST_PROV_ACTION_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_heartbeat_msg_recv_param heartbeat_msg_recv

Event parameter of ESP_BLE_MESH_HEARTBEAT_MESSAGE_RECV_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_lpn_enable_comp_param lpn_enable_comp

Event parameter of ESP_BLE_MESH_LPN_ENABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_lpn_disable_comp_param lpn_disable_comp

Event parameter of ESP_BLE_MESH_LPN_DISABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_lpn_poll_comp_param lpn_poll_comp

Event parameter of ESP_BLE_MESH_LPN_POLL_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_lpn_friendship_establish_param lpn_friendship_establish

Event parameter of ESP_BLE_MESH_LPN_FRIENDSHIP_ESTABLISH_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_lpn_friendship_terminate_param lpn_friendship_terminate

Event parameter of ESP_BLE_MESH_LPN_FRIENDSHIP_TERMINATE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_friend_friendship_establish_param frnd_friendship_establish

Event parameter of ESP_BLE_MESH_FRIEND_FRIENDSHIP_ESTABLISH_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_friend_friendship_terminate_param frnd_friendship_terminate

Event parameter of ESP_BLE_MESH_FRIEND_FRIENDSHIP_TERMINATE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_client_recv_adv_pkt_param proxy_client_recv_adv_pkt

Event parameter of ESP_BLE_MESH_PROXY_CLIENT_RECV_ADV_PKT_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_client_connected_param proxy_client_connected

Event parameter of ESP_BLE_MESH_PROXY_CLIENT_CONNECTED_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_client_disconnected_param proxy_client_disconnected

Event parameter of ESP_BLE_MESH_PROXY_CLIENT_DISCONNECTED_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_client_recv_filter_status_param proxy_client_recv_filter_status

Event parameter of ESP_BLE_MESH_PROXY_CLIENT_RECV_FILTER_STATUS_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_client_connect_comp_param proxy_client_connect_comp

Event parameter of ESP_BLE_MESH_PROXY_CLIENT_CONNECT_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_client_disconnect_comp_param proxy_client_disconnect_comp

Event parameter of ESP_BLE_MESH_PROXY_CLIENT_DISCONNECT_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_client_set_filter_type_comp_param proxy_client_set_filter_type_comp

Event parameter of ESP_BLE_MESH_PROXY_CLIENT_SET_FILTER_TYPE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_client_add_filter_addr_comp_param proxy_client_add_filter_addr_comp

Event parameter of ESP_BLE_MESH_PROXY_CLIENT_ADD_FILTER_ADDR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_client_remove_filter_addr_comp_param proxy_client_remove_filter_addr_comp

Event parameter of ESP_BLE_MESH_PROXY_CLIENT_REMOVE_FILTER_ADDR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_server_connected_param proxy_server_connected

Event parameter of ESP_BLE_MESH_PROXY_SERVER_CONNECTED_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_server_disconnected_param proxy_server_disconnected

Event parameter of ESP_BLE_MESH_PROXY_SERVER_DISCONNECTED_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_model_sub_group_addr_comp_param model_sub_group_addr_comp

Event parameters of ESP_BLE_MESH_MODEL_SUBSCRIBE_GROUP_ADDR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_model_unsub_group_addr_comp_param model_unsub_group_addr_comp

Event parameters of ESP_BLE_MESH_MODEL_UNSUBSCRIBE_GROUP_ADDR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_deinit_mesh_comp_param deinit_mesh_comp

Event parameter of ESP_BLE_MESH_DEINIT_MESH_COMP_EVT

struct ble_mesh_deinit_mesh_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_DEINIT_MESH_COMP_EVT.

Public Members

int err_code

Indicate the result of BLE Mesh deinitialization

struct ble_mesh_friend_friendship_establish_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_FRIEND_FRIENDSHIP_ESTABLISH_EVT.

Public Members

uint16_t lpn_addr

Low Power Node unicast address

struct ble_mesh_friend_friendship_terminate_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_FRIEND_FRIENDSHIP_TERMINATE_EVT.

Public Types

enum [anonymous]

This enum value is the reason of friendship termination on the friend node side

Values:

enumerator ESP_BLE_MESH_FRND_FRIENDSHIP_TERMINATE_ESTABLISH_FAIL

Friend Offer has been sent, but Friend Offer is not received within 1 second, friendship fails to be established

enumerator ESP_BLE_MESH_FRND_FRIENDSHIP_TERMINATE_POLL_TIMEOUT

Friendship is established, PollTimeout timer expires and no Friend Poll/Sub Add/Sub Remove is received

enumerator ESP_BLE_MESH_FRND_FRIENDSHIP_TERMINATE_RECV_FRND_REQ

Receive Friend Request from existing Low Power Node

enumerator ESP_BLE_MESH_FRND_FRIENDSHIP_TERMINATE_RECV_FRND_CLEAR

Receive Friend Clear from other friend node

enumerator ESP_BLE_MESH_FRND_FRIENDSHIP_TERMINATE_DISABLE

Friend feature disabled or corresponding NetKey is deleted

Public Members

uint16_t lpn_addr

Low Power Node unicast address

enum esp_ble_mesh_prov_cb_param_t::ble_mesh_friend_friendship_terminate_param::[anonymous] reason

This enum value is the reason of friendship termination on the friend node side Friendship terminated reason

struct ble_mesh_heartbeat_msg_recv_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_HEARTBEAT_MESSAGE_RECV_EVT.

Public Members

uint8_t hops

Heartbeat hops (InitTTL - RxTTL + 1)

uint16_t feature

Bit field of currently active features of the node

struct ble_mesh_input_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_INPUT_EVT.

Public Members

esp_ble_mesh_input_action_t action

Action of Input OOB Authentication

uint8_t size

Size of Input OOB Authentication

struct ble_mesh_input_number_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_INPUT_NUM_COMP_EVT.

Public Members

int err_code

Indicate the result of inputting number

struct ble_mesh_input_string_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_INPUT_STR_COMP_EVT.

Public Members

int err_code

Indicate the result of inputting string

#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_LINK_CLOSE_EVT.

Public Members

Type of the bearer used when device link is closed

#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT.

Public Members

Type of the bearer used when device link is open

struct ble_mesh_lpn_disable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_DISABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of disabling LPN functionality

struct ble_mesh_lpn_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling LPN functionality

struct ble_mesh_lpn_friendship_establish_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_FRIENDSHIP_ESTABLISH_EVT.

Public Members

uint16_t friend_addr

Friend Node unicast address

struct ble_mesh_lpn_friendship_terminate_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_FRIENDSHIP_TERMINATE_EVT.

Public Members

uint16_t friend_addr

Friend Node unicast address

struct ble_mesh_lpn_poll_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_POLL_COMP_EVT.

Public Members

int err_code

Indicate the result of sending Friend Poll

struct ble_mesh_model_sub_group_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_SUBSCRIBE_GROUP_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of local model subscribing group address

uint16_t element_addr

Element address

uint16_t company_id

Company ID

uint16_t model_id

Model ID

uint16_t group_addr

Group Address

struct ble_mesh_model_unsub_group_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_UNSUBSCRIBE_GROUP_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of local model unsubscribing group address

uint16_t element_addr

Element address

uint16_t company_id

Company ID

uint16_t model_id

Model ID

uint16_t group_addr

Group Address

struct ble_mesh_node_add_local_app_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_ADD_LOCAL_APP_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of adding local AppKey by the node

uint16_t net_idx

NetKey Index

uint16_t app_idx

AppKey Index

struct ble_mesh_node_add_local_net_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_ADD_LOCAL_NET_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of adding local NetKey by the node

uint16_t net_idx

NetKey Index

struct ble_mesh_node_bind_local_mod_app_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_BIND_APP_KEY_TO_MODEL_COMP_EVT.

Public Members

int err_code

Indicate the result of binding AppKey with model by the node

uint16_t element_addr

Element address

uint16_t app_idx

AppKey Index

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct ble_mesh_output_num_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_OUTPUT_NUMBER_EVT.

Public Members

esp_ble_mesh_output_action_t action

Action of Output OOB Authentication

uint32_t number

Number of Output OOB Authentication

struct ble_mesh_output_str_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_OUTPUT_STRING_EVT.

Public Members

char string[8]

String of Output OOB Authentication

struct ble_mesh_prov_disable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_DISABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of disabling BLE Mesh device

struct ble_mesh_prov_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling BLE Mesh device

struct ble_mesh_prov_register_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROV_REGISTER_COMP_EVT.

Public Members

int err_code

Indicate the result of BLE Mesh initialization

struct ble_mesh_provision_complete_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT.

Public Members

uint16_t net_idx

NetKey Index

uint8_t net_key[16]

NetKey

uint16_t addr

Primary address

uint8_t flags

Flags

uint32_t iv_index

IV Index

struct ble_mesh_provision_reset_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_RESET_EVT.

struct ble_mesh_provisioner_add_local_app_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of adding local AppKey by the Provisioner

uint16_t net_idx

NetKey Index

uint16_t app_idx

AppKey Index

struct ble_mesh_provisioner_add_local_net_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_NET_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of adding local NetKey by the Provisioner

uint16_t net_idx

NetKey Index

struct ble_mesh_provisioner_add_unprov_dev_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_ADD_UNPROV_DEV_COMP_EVT.

Public Members

int err_code

Indicate the result of adding device into queue by the Provisioner

struct ble_mesh_provisioner_bind_local_mod_app_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT.

Public Members

int err_code

Indicate the result of binding AppKey with model by the Provisioner

uint16_t element_addr

Element address

uint16_t app_idx

AppKey Index

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct ble_mesh_provisioner_delete_dev_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_DELETE_DEV_COMP_EVT.

Public Members

int err_code

Indicate the result of deleting device by the Provisioner

struct ble_mesh_provisioner_delete_node_with_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of deleting node with unicast address by the Provisioner

uint16_t unicast_addr

Node unicast address

struct ble_mesh_provisioner_delete_node_with_uuid_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_UUID_COMP_EVT.

Public Members

int err_code

Indicate the result of deleting node with uuid by the Provisioner

uint8_t uuid[16]

Node device uuid

#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_LINK_CLOSE_EVT.

Public Members

Type of the bearer used when Provisioner link is closed

Reason of the closed provisioning link

#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_LINK_OPEN_EVT.

Public Members

Type of the bearer used when Provisioner link is opened

struct ble_mesh_provisioner_prov_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT.

Public Members

uint16_t node_idx

Index of the provisioned device

esp_ble_mesh_octet16_t device_uuid

Device UUID of the provisioned device

uint16_t unicast_addr

Primary address of the provisioned device

uint8_t element_num

Element count of the provisioned device

uint16_t netkey_idx

NetKey Index of the provisioned device

struct ble_mesh_provisioner_prov_dev_with_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_DEV_WITH_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of Provisioner starting to provision a device

struct ble_mesh_provisioner_prov_disable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_DISABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of disabling BLE Mesh Provisioner

struct ble_mesh_provisioner_prov_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling BLE Mesh Provisioner

struct ble_mesh_provisioner_prov_input_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_INPUT_EVT.

Public Members

esp_ble_mesh_oob_method_t method

Method of device Output OOB Authentication

esp_ble_mesh_output_action_t action

Action of device Output OOB Authentication

uint8_t size

Size of device Output OOB Authentication

Index of the provisioning link

struct ble_mesh_provisioner_prov_input_num_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_INPUT_NUMBER_COMP_EVT.

Public Members

int err_code

Indicate the result of inputting number by the Provisioner

struct ble_mesh_provisioner_prov_input_str_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_INPUT_STRING_COMP_EVT.

Public Members

int err_code

Indicate the result of inputting string by the Provisioner

struct ble_mesh_provisioner_prov_output_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_OUTPUT_EVT.

Public Members

esp_ble_mesh_oob_method_t method

Method of device Input OOB Authentication

esp_ble_mesh_input_action_t action

Action of device Input OOB Authentication

uint8_t size

Size of device Input OOB Authentication

Index of the provisioning link

char string[8]

String output by the Provisioner

uint32_t number

Number output by the Provisioner

union esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_output_evt_param::[anonymous] [anonymous]
struct ble_mesh_provisioner_prov_read_oob_pub_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of setting OOB Public Key by the Provisioner

struct ble_mesh_provisioner_prov_read_oob_pub_key_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_EVT.

Public Members

Index of the provisioning link

struct ble_mesh_provisioner_recv_unprov_adv_pkt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT.

Public Members

uint8_t dev_uuid[16]

Device UUID of the unprovisioned device

esp_ble_mesh_bd_addr_t addr

Device address of the unprovisioned device

esp_ble_mesh_addr_type_t addr_type

Device address type

uint16_t oob_info

OOB Info of the unprovisioned device

uint8_t adv_type

Avertising type of the unprovisioned device

esp_ble_mesh_prov_bearer_t bearer

Bearer of the unprovisioned device

int8_t rssi

RSSI of the received advertising packet

struct ble_mesh_provisioner_set_dev_uuid_match_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT.

Public Members

int err_code

Indicate the result of setting Device UUID match value by the Provisioner

struct ble_mesh_provisioner_set_node_name_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_NODE_NAME_COMP_EVT.

Public Members

int err_code

Indicate the result of setting provisioned device name by the Provisioner

uint16_t node_index

Index of the provisioned device

struct ble_mesh_provisioner_set_primary_elem_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_PRIMARY_ELEM_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of setting unicast address of primary element by the Provisioner

struct ble_mesh_provisioner_set_prov_data_info_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_PROV_DATA_INFO_COMP_EVT.

Public Members

int err_code

Indicate the result of setting provisioning info by the Provisioner

struct ble_mesh_provisioner_set_static_oob_val_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_STATIC_OOB_VALUE_COMP_EVT.

Public Members

int err_code

Indicate the result of setting static oob value by the Provisioner

struct ble_mesh_provisioner_store_node_comp_data_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_STORE_NODE_COMP_DATA_COMP_EVT.

Public Members

int err_code

Indicate the result of storing node composition data by the Provisioner

uint16_t addr

Node element address

struct ble_mesh_provisioner_update_local_app_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_APP_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of updating local AppKey by the Provisioner

uint16_t net_idx

NetKey Index

uint16_t app_idx

AppKey Index

struct ble_mesh_provisioner_update_local_net_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_NET_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of updating local NetKey by the Provisioner

uint16_t net_idx

NetKey Index

struct ble_mesh_proxy_client_add_filter_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_ADD_FILTER_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client add filter address

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_client_connect_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_CONNECT_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client connect

esp_ble_mesh_bd_addr_t addr

Device address of the Proxy Server

esp_ble_mesh_addr_type_t addr_type

Device address type

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_client_connected_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_CONNECTED_EVT.

Public Members

esp_ble_mesh_bd_addr_t addr

Device address of the Proxy Server

esp_ble_mesh_addr_type_t addr_type

Device address type

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_client_disconnect_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_DISCONNECT_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client disconnect

uint8_t conn_handle

Proxy connection handle

struct ble_mesh_proxy_client_disconnected_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_DISCONNECTED_EVT.

Public Members

esp_ble_mesh_bd_addr_t addr

Device address of the Proxy Server

esp_ble_mesh_addr_type_t addr_type

Device address type

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

uint8_t reason

Proxy disconnect reason

struct ble_mesh_proxy_client_recv_adv_pkt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_RECV_ADV_PKT_EVT.

Public Members

esp_ble_mesh_bd_addr_t addr

Device address

esp_ble_mesh_addr_type_t addr_type

Device address type

uint16_t net_idx

Network ID related NetKey Index

uint8_t net_id[8]

Network ID contained in the advertising packet

int8_t rssi

RSSI of the received advertising packet

struct ble_mesh_proxy_client_recv_filter_status_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_RECV_FILTER_STATUS_EVT.

Public Members

uint8_t conn_handle

Proxy connection handle

uint16_t server_addr

Proxy Server primary element address

uint16_t net_idx

Corresponding NetKey Index

uint8_t filter_type

Proxy Server filter type(whitelist or blacklist)

uint16_t list_size

Number of addresses in the Proxy Server filter list

struct ble_mesh_proxy_client_remove_filter_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_REMOVE_FILTER_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client remove filter address

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_client_set_filter_type_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_SET_FILTER_TYPE_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client set filter type

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_gatt_disable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROXY_GATT_DISABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of disabling Mesh Proxy Service

struct ble_mesh_proxy_gatt_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROXY_GATT_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling Mesh Proxy Service

struct ble_mesh_proxy_identity_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROXY_IDENTITY_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling Mesh Proxy advertising

struct ble_mesh_proxy_server_connected_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_SERVER_CONNECTED_EVT.

Public Members

uint8_t conn_handle

Proxy connection handle

struct ble_mesh_proxy_server_disconnected_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_SERVER_DISCONNECTED_EVT.

Public Members

uint8_t conn_handle

Proxy connection handle

uint8_t reason

Proxy disconnect reason

struct ble_mesh_set_fast_prov_action_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_SET_FAST_PROV_ACTION_COMP_EVT.

Public Members

uint8_t status_action

Indicate the result of setting action of fast provisioning

struct ble_mesh_set_fast_prov_info_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT.

Public Members

uint8_t status_unicast

Indicate the result of setting unicast address range of fast provisioning

uint8_t status_net_idx

Indicate the result of setting NetKey Index of fast provisioning

uint8_t status_match

Indicate the result of setting matching Device UUID of fast provisioning

struct ble_mesh_set_oob_pub_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_SET_OOB_PUB_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of setting OOB Public Key

struct ble_mesh_set_unprov_dev_name_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_SET_UNPROV_DEV_NAME_COMP_EVT.

Public Members

int err_code

Indicate the result of setting BLE Mesh device name

union esp_ble_mesh_server_state_value_t
#include <esp_ble_mesh_defs.h>

Server model state value union.

Public Members

uint8_t onoff

The value of the Generic OnOff state

The value of the Light LC Light OnOff state

struct esp_ble_mesh_server_state_value_t::[anonymous] gen_onoff

The Generic OnOff state

int16_t level

The value of the Generic Level state

struct esp_ble_mesh_server_state_value_t::[anonymous] gen_level

The Generic Level state

uint8_t onpowerup

The value of the Generic OnPowerUp state

struct esp_ble_mesh_server_state_value_t::[anonymous] gen_onpowerup

The Generic OnPowerUp state

uint16_t power

The value of the Generic Power Actual state

struct esp_ble_mesh_server_state_value_t::[anonymous] gen_power_actual

The Generic Power Actual state

uint16_t lightness

The value of the Light Lightness Actual state

The value of the Light Lightness Linear state

The value of the Light CTL Lightness state

The value of the Light HSL Lightness state

The value of the Light xyL Lightness state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_lightness_actual

The Light Lightness Actual state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_lightness_linear

The Light Lightness Linear state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_ctl_lightness

The Light CTL Lightness state

uint16_t temperature

The value of the Light CTL Temperature state

int16_t delta_uv

The value of the Light CTL Delta UV state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_ctl_temp_delta_uv

The Light CTL Temperature & Delta UV states

uint16_t hue

The value of the Light HSL Hue state

uint16_t saturation

The value of the Light HSL Saturation state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_hsl

The Light HSL composite state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_hsl_lightness

The Light HSL Lightness state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_hsl_hue

The Light HSL Hue state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_hsl_saturation

The Light HSL Saturation state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_xyl_lightness

The Light xyL Lightness state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_lc_light_onoff

The Light LC Light OnOff state

union esp_ble_mesh_model_cb_param_t
#include <esp_ble_mesh_defs.h>

BLE Mesh model callback parameters union.

Public Members

struct esp_ble_mesh_model_cb_param_t::ble_mesh_model_operation_evt_param model_operation

Event parameter of ESP_BLE_MESH_MODEL_OPERATION_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_model_send_comp_param model_send_comp

Event parameter of ESP_BLE_MESH_MODEL_SEND_COMP_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_model_publish_comp_param model_publish_comp

Event parameter of ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_mod_recv_publish_msg_param client_recv_publish_msg

Event parameter of ESP_BLE_MESH_CLIENT_MODEL_RECV_PUBLISH_MSG_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_client_model_send_timeout_param client_send_timeout

Event parameter of ESP_BLE_MESH_CLIENT_MODEL_SEND_TIMEOUT_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_model_publish_update_evt_param model_publish_update

Event parameter of ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_server_model_update_state_comp_param server_model_update_state

Event parameter of ESP_BLE_MESH_SERVER_MODEL_UPDATE_STATE_COMP_EVT

struct ble_mesh_client_model_send_timeout_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_CLIENT_MODEL_SEND_TIMEOUT_EVT.

Public Members

uint32_t opcode

Opcode of the previously sent message

esp_ble_mesh_model_t *model

Pointer to the model which sends the previous message

esp_ble_mesh_msg_ctx_t *ctx

Pointer to the context of the previous message

struct ble_mesh_mod_recv_publish_msg_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_CLIENT_MODEL_RECV_PUBLISH_MSG_EVT.

Public Members

uint32_t opcode

Opcode of the unsolicited received message

esp_ble_mesh_model_t *model

Pointer to the model which receives the message

esp_ble_mesh_msg_ctx_t *ctx

Pointer to the context of the message

uint16_t length

Length of the received message

uint8_t *msg

Value of the received message

struct ble_mesh_model_operation_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_OPERATION_EVT.

Public Members

uint32_t opcode

Opcode of the received message

esp_ble_mesh_model_t *model

Pointer to the model which receives the message

esp_ble_mesh_msg_ctx_t *ctx

Pointer to the context of the received message

uint16_t length

Length of the received message

uint8_t *msg

Value of the received message

struct ble_mesh_model_publish_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT.

Public Members

int err_code

Indicate the result of publishing a message

esp_ble_mesh_model_t *model

Pointer to the model which publishes the message

struct ble_mesh_model_publish_update_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT.

Public Members

esp_ble_mesh_model_t *model

Pointer to the model which is going to update its publish message

struct ble_mesh_model_send_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_SEND_COMP_EVT.

Public Members

int err_code

Indicate the result of sending a message

uint32_t opcode

Opcode of the message

esp_ble_mesh_model_t *model

Pointer to the model which sends the message

esp_ble_mesh_msg_ctx_t *ctx

Context of the message

struct ble_mesh_server_model_update_state_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_SERVER_MODEL_UPDATE_STATE_COMP_EVT.

Public Members

int err_code

Indicate the result of updating server model state

esp_ble_mesh_model_t *model

Pointer to the server model which state value is updated

esp_ble_mesh_server_state_type_t type

Type of the updated server state

Structures

struct esp_ble_mesh_deinit_param_t

BLE Mesh deinit parameters

Public Members

bool erase_flash

Indicate if erasing flash when deinit mesh stack

struct esp_ble_mesh_elem_t

Abstraction that describes a BLE Mesh Element. This structure is associated with struct bt_mesh_elem in mesh_access.h

Public Members

uint16_t element_addr

Element Address, assigned during provisioning.

const uint16_t location

Location Descriptor (GATT Bluetooth Namespace Descriptors)

const uint8_t sig_model_count

SIG Model count

const uint8_t vnd_model_count

Vendor Model count

esp_ble_mesh_model_t *sig_models

SIG Models

esp_ble_mesh_model_t *vnd_models

Vendor Models

struct esp_ble_mesh_model_pub_t

Abstraction that describes a model publication context. This structure is associated with struct bt_mesh_model_pub in mesh_access.h

Public Members

esp_ble_mesh_model_t *model

Pointer to the model to which the context belongs. Initialized by the stack.

uint16_t publish_addr

Publish Address.

uint16_t app_idx

Publish AppKey Index.

uint16_t cred

Friendship Credentials Flag.

uint16_t send_rel

Force reliable sending (segment acks)

uint8_t ttl

Publish Time to Live.

uint8_t retransmit

Retransmit Count & Interval Steps.

uint8_t period

Publish Period.

uint8_t period_div

Divisor for the Period.

uint8_t fast_period

Use FastPeriodDivisor

uint8_t count

Retransmissions left.

uint32_t period_start

Start of the current period.

struct net_buf_simple *msg

Publication buffer, containing the publication message.

This will get correctly created when the publication context has been defined using the ESP_BLE_MESH_MODEL_PUB_DEFINE macro.

ESP_BLE_MESH_MODEL_PUB_DEFINE(name, size);

esp_ble_mesh_cb_t update

Callback used to update publish message. Initialized by the stack.

struct k_delayed_work timer

Publish Period Timer. Initialized by the stack.

uint8_t dev_role

Role of the device that is going to publish messages

struct esp_ble_mesh_model_op_t

Abstraction that describes a model operation context. This structure is associated with struct bt_mesh_model_op in mesh_access.h

Public Members

const uint32_t opcode

Message opcode

const size_t min_len

Message minimum length

esp_ble_mesh_cb_t param_cb

Callback used to handle message. Initialized by the stack.

struct esp_ble_mesh_model_cbs_t

Abstraction that describes a model callback structure. This structure is associated with struct bt_mesh_model_cb in mesh_access.h.

Public Members

esp_ble_mesh_cb_t init_cb

Callback used during model initialization. Initialized by the stack.

struct esp_ble_mesh_model

Abstraction that describes a Mesh Model instance. This structure is associated with struct bt_mesh_model in mesh_access.h

Public Members

const uint16_t model_id

16-bit model identifier

uint16_t company_id

16-bit company identifier

uint16_t model_id

16-bit model identifier

struct esp_ble_mesh_model::[anonymous]::[anonymous] vnd

Structure encapsulating a model ID with a company ID

union esp_ble_mesh_model::[anonymous] [anonymous]

Model ID

uint8_t element_idx

Internal information, mainly for persistent storage Belongs to Nth element

uint8_t model_idx

Is the Nth model in the element

uint16_t flags

Information about what has changed

esp_ble_mesh_elem_t *element

The Element to which this Model belongs

esp_ble_mesh_model_pub_t *const pub

Model Publication

uint16_t keys[CONFIG_BLE_MESH_MODEL_KEY_COUNT]

AppKey List

uint16_t groups[CONFIG_BLE_MESH_MODEL_GROUP_COUNT]

Subscription List (group or virtual addresses)

esp_ble_mesh_model_op_t *op

Model operation context

esp_ble_mesh_model_cbs_t *cb

Model callback structure

void *user_data

Model-specific user data

struct esp_ble_mesh_msg_ctx_t

Message sending context. This structure is associated with struct bt_mesh_msg_ctx in mesh_access.h

Public Members

uint16_t net_idx

NetKey Index of the subnet through which to send the message.

uint16_t app_idx

AppKey Index for message encryption.

uint16_t addr

Remote address.

uint16_t recv_dst

Destination address of a received message. Not used for sending.

int8_t recv_rssi

RSSI of received packet. Not used for sending.

uint8_t recv_ttl

Received TTL value. Not used for sending.

uint8_t send_rel

Force sending reliably by using segment acknowledgement

uint8_t send_ttl

TTL, or ESP_BLE_MESH_TTL_DEFAULT for default TTL.

uint32_t recv_op

Opcode of a received message. Not used for sending message.

esp_ble_mesh_model_t *model

Model corresponding to the message, no need to be initialized before sending message

bool srv_send

Indicate if the message is sent by a node server model, no need to be initialized before sending message

struct esp_ble_mesh_prov_t

Provisioning properties & capabilities. This structure is associated with struct bt_mesh_prov in mesh_access.h

struct esp_ble_mesh_comp_t

Node Composition data context. This structure is associated with struct bt_mesh_comp in mesh_access.h

Public Members

uint16_t cid

16-bit SIG-assigned company identifier

uint16_t pid

16-bit vendor-assigned product identifier

uint16_t vid

16-bit vendor-assigned product version identifier

size_t element_count

Element count

esp_ble_mesh_elem_t *elements

A sequence of elements

struct esp_ble_mesh_unprov_dev_add_t

Information of the device which is going to be added for provisioning.

Public Members

esp_ble_mesh_bd_addr_t addr

Device address

esp_ble_mesh_addr_type_t addr_type

Device address type

uint8_t uuid[16]

Device UUID

uint16_t oob_info

Device OOB Info ADD_DEV_START_PROV_NOW_FLAG shall not be set if the bearer has both PB-ADV and PB-GATT enabled

esp_ble_mesh_prov_bearer_t bearer

Provisioning Bearer

struct esp_ble_mesh_device_delete_t

Information of the device which is going to be deleted.

Public Members

esp_ble_mesh_bd_addr_t addr

Device address

esp_ble_mesh_addr_type_t addr_type

Device address type

uint8_t uuid[16]

Device UUID

uint8_t flag

BIT0: device address; BIT1: device UUID

struct esp_ble_mesh_prov_data_info_t

Information of the provisioner which is going to be updated.

Public Members

uint16_t net_idx

NetKey Index

uint8_t flags

Flags

uint32_t iv_index

IV Index

uint8_t flag

BIT0: net_idx; BIT1: flags; BIT2: iv_index

struct esp_ble_mesh_node_t

Information of the provisioned node

Public Members

esp_ble_mesh_bd_addr_t addr

Node device address

esp_ble_mesh_addr_type_t addr_type

Node device address type

uint8_t dev_uuid[16]

Device UUID

uint16_t oob_info

Node OOB information

uint16_t unicast_addr

Node unicast address

uint8_t element_num

Node element number

uint16_t net_idx

Node NetKey Index

uint8_t flags

Node key refresh flag and iv update flag

uint32_t iv_index

Node IV Index

uint8_t dev_key[16]

Node device key

char name[ESP_BLE_MESH_NODE_NAME_MAX_LEN + 1]

Node name

uint16_t comp_length

Length of Composition Data

uint8_t *comp_data

Value of Composition Data

struct esp_ble_mesh_fast_prov_info_t

Context of fast provisioning which need to be set.

Public Members

uint16_t unicast_min

Minimum unicast address used for fast provisioning

uint16_t unicast_max

Maximum unicast address used for fast provisioning

uint16_t net_idx

Netkey index used for fast provisioning

uint8_t flags

Flags used for fast provisioning

uint32_t iv_index

IV Index used for fast provisioning

uint8_t offset

Offset of the UUID to be compared

uint8_t match_len

Length of the UUID to be compared

uint8_t match_val[16]

Value of UUID to be compared

struct esp_ble_mesh_heartbeat_filter_info_t

Context of Provisioner heartbeat filter information to be set

Public Members

uint16_t hb_src

Heartbeat source address (unicast address)

uint16_t hb_dst

Heartbeat destination address (unicast address or group address)

struct esp_ble_mesh_client_op_pair_t

BLE Mesh client models related definitions.

Client model Get/Set message opcode and corresponding Status message opcode

Public Members

uint32_t cli_op

The client message opcode

uint32_t status_op

The server status opcode corresponding to the client message opcode

struct esp_ble_mesh_client_t

Client Model user data context.

Public Members

esp_ble_mesh_model_t *model

Pointer to the client model. Initialized by the stack.

int op_pair_size

Size of the op_pair

const esp_ble_mesh_client_op_pair_t *op_pair

Table containing get/set message opcode and corresponding status message opcode

uint32_t publish_status

Callback used to handle the received unsolicited message. Initialized by the stack.

void *internal_data

Pointer to the internal data of client model

uint8_t msg_role

Role of the device (Node/Provisioner) that is going to send messages

struct esp_ble_mesh_client_common_param_t

Common parameters of the messages sent by Client Model.

Public Members

esp_ble_mesh_opcode_t opcode

Message opcode

esp_ble_mesh_model_t *model

Pointer to the client model structure

esp_ble_mesh_msg_ctx_t ctx

The context used to send message

int32_t msg_timeout

Timeout value (ms) to get response to the sent message Note: if using default timeout value in menuconfig, make sure to set this value to 0

uint8_t msg_role

Role of the device - Node/Provisioner

struct esp_ble_mesh_state_transition_t

Parameters of the server model state transition

Public Functions

BLE_MESH_ATOMIC_DEFINE(flag, ESP_BLE_MESH_SERVER_FLAG_MAX)

Flag used to indicate if the transition timer has been started internally.

If the model which contains esp_ble_mesh_state_transition_t sets “set_auto_rsp” to ESP_BLE_MESH_SERVER_RSP_BY_APP, the handler of the timer shall be initialized by the users.

And users can use this flag to indicate whether the timer is started or not.

Public Members

bool just_started

Indicate if the state transition has just started

uint8_t trans_time

State transition time

uint8_t remain_time

Remaining time of state transition

uint8_t delay

Delay before starting state transition

uint32_t quo_tt

Duration of each divided transition step

uint32_t counter

Number of steps which the transition duration is divided

uint32_t total_duration

State transition total duration

int64_t start_timestamp

Time when the state transition is started

struct k_delayed_work timer

Timer used for state transition

struct esp_ble_mesh_last_msg_info_t

Parameters of the server model received last same set message.

Public Members

uint8_t tid

Transaction number of the last message

uint16_t src

Source address of the last message

uint16_t dst

Destination address of the last message

int64_t timestamp

Time when the last message is received

struct esp_ble_mesh_server_rsp_ctrl_t

Parameters of the Server Model response control

Public Members

uint8_t get_auto_rsp

BLE Mesh Server Response Option.

  1. If get_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, then the response of Client Get messages need to be replied by the application;

  2. If get_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, then the response of Client Get messages will be replied by the server models;

  3. If set_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, then the response of Client Set messages need to be replied by the application;

  4. If set_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, then the response of Client Set messages will be replied by the server models;

  5. If status_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, then the response of Server Status messages need to be replied by the application;

  6. If status_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, then the response of Server Status messages will be replied by the server models; Response control for Client Get messages

uint8_t set_auto_rsp

Response control for Client Set messages

uint8_t status_auto_rsp

Response control for Server Status messages

Macros

ESP_BLE_MESH_SDU_MAX_LEN

< The maximum length of a BLE Mesh message, including Opcode, Payload and TransMIC Length of a short Mesh MIC.

ESP_BLE_MESH_MIC_SHORT

Length of a long Mesh MIC.

ESP_BLE_MESH_MIC_LONG

The maximum length of a BLE Mesh provisioned node name

ESP_BLE_MESH_NODE_NAME_MAX_LEN

The maximum length of a BLE Mesh unprovisioned device name

ESP_BLE_MESH_DEVICE_NAME_MAX_LEN

The maximum length of settings user id

ESP_BLE_MESH_SETTINGS_UID_SIZE

Invalid settings index

ESP_BLE_MESH_INVALID_SETTINGS_IDX

Define the BLE Mesh octet 16 bytes size

ESP_BLE_MESH_OCTET16_LEN
ESP_BLE_MESH_OCTET8_LEN
ESP_BLE_MESH_CID_NVAL

Special TTL value to request using configured default TTL

ESP_BLE_MESH_TTL_DEFAULT

Maximum allowed TTL value

ESP_BLE_MESH_TTL_MAX
ESP_BLE_MESH_ADDR_UNASSIGNED
ESP_BLE_MESH_ADDR_ALL_NODES
ESP_BLE_MESH_ADDR_PROXIES
ESP_BLE_MESH_ADDR_FRIENDS
ESP_BLE_MESH_ADDR_RELAYS
ESP_BLE_MESH_KEY_UNUSED
ESP_BLE_MESH_KEY_DEV
ESP_BLE_MESH_KEY_PRIMARY
ESP_BLE_MESH_KEY_ANY

Primary Network Key index

ESP_BLE_MESH_NET_PRIMARY

Relay state value

ESP_BLE_MESH_RELAY_DISABLED
ESP_BLE_MESH_RELAY_ENABLED
ESP_BLE_MESH_RELAY_NOT_SUPPORTED

Beacon state value

ESP_BLE_MESH_BEACON_DISABLED
ESP_BLE_MESH_BEACON_ENABLED

GATT Proxy state value

ESP_BLE_MESH_GATT_PROXY_DISABLED
ESP_BLE_MESH_GATT_PROXY_ENABLED
ESP_BLE_MESH_GATT_PROXY_NOT_SUPPORTED

Friend state value

ESP_BLE_MESH_FRIEND_DISABLED
ESP_BLE_MESH_FRIEND_ENABLED
ESP_BLE_MESH_FRIEND_NOT_SUPPORTED

Node identity state value

ESP_BLE_MESH_NODE_IDENTITY_STOPPED
ESP_BLE_MESH_NODE_IDENTITY_RUNNING
ESP_BLE_MESH_NODE_IDENTITY_NOT_SUPPORTED

Supported features

ESP_BLE_MESH_FEATURE_RELAY
ESP_BLE_MESH_FEATURE_PROXY
ESP_BLE_MESH_FEATURE_FRIEND
ESP_BLE_MESH_FEATURE_LOW_POWER
ESP_BLE_MESH_FEATURE_ALL_SUPPORTED
ESP_BLE_MESH_ADDR_IS_UNICAST(addr)
ESP_BLE_MESH_ADDR_IS_GROUP(addr)
ESP_BLE_MESH_ADDR_IS_VIRTUAL(addr)
ESP_BLE_MESH_ADDR_IS_RFU(addr)
ESP_BLE_MESH_INVALID_NODE_INDEX
ESP_BLE_MESH_TRANSMIT(count, int_ms)

Encode transmission count & interval steps.

备注

For example, ESP_BLE_MESH_TRANSMIT(2, 20) means that the message will be sent about 90ms(count is 3, step is 1, interval is 30 ms which includes 10ms of advertising interval random delay).

参数
  • count – Number of retransmissions (first transmission is excluded).

  • int_ms – Interval steps in milliseconds. Must be greater than 0 and a multiple of 10.

返回

BLE Mesh transmit value that can be used e.g. for the default values of the Configuration Model data.

ESP_BLE_MESH_GET_TRANSMIT_COUNT(transmit)

Decode transmit count from a transmit value.

参数
  • transmit – Encoded transmit count & interval value.

返回

Transmission count (actual transmissions equal to N + 1).

ESP_BLE_MESH_GET_TRANSMIT_INTERVAL(transmit)

Decode transmit interval from a transmit value.

参数
  • transmit – Encoded transmit count & interval value.

返回

Transmission interval in milliseconds.

ESP_BLE_MESH_PUBLISH_TRANSMIT(count, int_ms)

Encode Publish Retransmit count & interval steps.

参数
  • count – Number of retransmissions (first transmission is excluded).

  • int_ms – Interval steps in milliseconds. Must be greater than 0 and a multiple of 50.

返回

BLE Mesh transmit value that can be used e.g. for the default values of the Configuration Model data.

ESP_BLE_MESH_GET_PUBLISH_TRANSMIT_COUNT(transmit)

Decode Publish Retransmit count from a given value.

参数
  • transmit – Encoded Publish Retransmit count & interval value.

返回

Retransmission count (actual transmissions equal to N + 1).

ESP_BLE_MESH_GET_PUBLISH_TRANSMIT_INTERVAL(transmit)

Decode Publish Retransmit interval from a given value.

Callbacks which are not needed to be initialized by users (set with 0 and will be initialized internally)

参数
  • transmit – Encoded Publish Retransmit count & interval value.

返回

Transmission interval in milliseconds.

ESP_BLE_MESH_PROV_STATIC_OOB_MAX_LEN

Maximum length of string used by Output OOB authentication

ESP_BLE_MESH_PROV_OUTPUT_OOB_MAX_LEN

Maximum length of string used by Output OOB authentication

ESP_BLE_MESH_PROV_INPUT_OOB_MAX_LEN

Macros used to define message opcode

ESP_BLE_MESH_MODEL_OP_1(b0)
ESP_BLE_MESH_MODEL_OP_2(b0, b1)
ESP_BLE_MESH_MODEL_OP_3(b0, cid)

This macro is associated with BLE_MESH_MODEL_CB in mesh_access.h

ESP_BLE_MESH_SIG_MODEL(_id, _op, _pub, _user_data)

This macro is associated with BLE_MESH_MODEL_VND_CB in mesh_access.h

ESP_BLE_MESH_VENDOR_MODEL(_company, _id, _op, _pub, _user_data)
ESP_BLE_MESH_ELEMENT(_loc, _mods, _vnd_mods)

Helper to define a BLE Mesh element within an array.

In case the element has no SIG or Vendor models, the helper macro ESP_BLE_MESH_MODEL_NONE can be given instead.

备注

This macro is associated with BLE_MESH_ELEM in mesh_access.h

参数
  • _loc – Location Descriptor.

  • _mods – Array of SIG models.

  • _vnd_mods – Array of vendor models.

ESP_BLE_MESH_PROV(uuid, sta_val, sta_val_len, out_size, out_act, in_size, in_act)
BT_OCTET32_LEN
BD_ADDR_LEN
ESP_BLE_MESH_ADDR_TYPE_PUBLIC
ESP_BLE_MESH_ADDR_TYPE_RANDOM
ESP_BLE_MESH_ADDR_TYPE_RPA_PUBLIC
ESP_BLE_MESH_ADDR_TYPE_RPA_RANDOM
ESP_BLE_MESH_MODEL_PUB_DEFINE(_name, _msg_len, _role)

Define a model publication context.

参数
  • _name – Variable name given to the context.

  • _msg_len – Length of the publication message.

  • _role – Role of the device which contains the model.

ESP_BLE_MESH_MODEL_OP(_opcode, _min_len)

Define a model operation context.

参数
  • _opcode – Message opcode.

  • _min_len – Message minimum length.

ESP_BLE_MESH_MODEL_OP_END

Define the terminator for the model operation table. Each model operation struct array must use this terminator as the end tag of the operation unit.

ESP_BLE_MESH_MODEL_NONE

Helper to define an empty model array. This structure is associated with BLE_MESH_MODEL_NONE in mesh_access.h

ADD_DEV_RM_AFTER_PROV_FLAG

Device will be removed from queue after provisioned successfully

ADD_DEV_START_PROV_NOW_FLAG

Start provisioning device immediately

ADD_DEV_FLUSHABLE_DEV_FLAG

Device can be remove when queue is full and new device is going to added

DEL_DEV_ADDR_FLAG
DEL_DEV_UUID_FLAG
PROV_DATA_NET_IDX_FLAG
PROV_DATA_FLAGS_FLAG
PROV_DATA_IV_INDEX_FLAG
ESP_BLE_MESH_HEARTBEAT_FILTER_ACCEPTLIST
ESP_BLE_MESH_HEARTBEAT_FILTER_REJECTLIST

Provisioner heartbeat filter operation

ESP_BLE_MESH_HEARTBEAT_FILTER_ADD
ESP_BLE_MESH_HEARTBEAT_FILTER_REMOVE
ESP_BLE_MESH_MODEL_ID_CONFIG_SRV

BLE Mesh models related Model ID and Opcode definitions.

< Foundation Models

ESP_BLE_MESH_MODEL_ID_CONFIG_CLI
ESP_BLE_MESH_MODEL_ID_HEALTH_SRV
ESP_BLE_MESH_MODEL_ID_HEALTH_CLI

Models from the Mesh Model Specification

ESP_BLE_MESH_MODEL_ID_GEN_ONOFF_SRV
ESP_BLE_MESH_MODEL_ID_GEN_ONOFF_CLI
ESP_BLE_MESH_MODEL_ID_GEN_LEVEL_SRV
ESP_BLE_MESH_MODEL_ID_GEN_LEVEL_CLI
ESP_BLE_MESH_MODEL_ID_GEN_DEF_TRANS_TIME_SRV
ESP_BLE_MESH_MODEL_ID_GEN_DEF_TRANS_TIME_CLI
ESP_BLE_MESH_MODEL_ID_GEN_POWER_ONOFF_SRV
ESP_BLE_MESH_MODEL_ID_GEN_POWER_ONOFF_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_GEN_POWER_ONOFF_CLI
ESP_BLE_MESH_MODEL_ID_GEN_POWER_LEVEL_SRV
ESP_BLE_MESH_MODEL_ID_GEN_POWER_LEVEL_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_GEN_POWER_LEVEL_CLI
ESP_BLE_MESH_MODEL_ID_GEN_BATTERY_SRV
ESP_BLE_MESH_MODEL_ID_GEN_BATTERY_CLI
ESP_BLE_MESH_MODEL_ID_GEN_LOCATION_SRV
ESP_BLE_MESH_MODEL_ID_GEN_LOCATION_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_GEN_LOCATION_CLI
ESP_BLE_MESH_MODEL_ID_GEN_ADMIN_PROP_SRV
ESP_BLE_MESH_MODEL_ID_GEN_MANUFACTURER_PROP_SRV
ESP_BLE_MESH_MODEL_ID_GEN_USER_PROP_SRV
ESP_BLE_MESH_MODEL_ID_GEN_CLIENT_PROP_SRV
ESP_BLE_MESH_MODEL_ID_GEN_PROP_CLI
ESP_BLE_MESH_MODEL_ID_SENSOR_SRV
ESP_BLE_MESH_MODEL_ID_SENSOR_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_SENSOR_CLI
ESP_BLE_MESH_MODEL_ID_TIME_SRV
ESP_BLE_MESH_MODEL_ID_TIME_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_TIME_CLI
ESP_BLE_MESH_MODEL_ID_SCENE_SRV
ESP_BLE_MESH_MODEL_ID_SCENE_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_SCENE_CLI
ESP_BLE_MESH_MODEL_ID_SCHEDULER_SRV
ESP_BLE_MESH_MODEL_ID_SCHEDULER_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_SCHEDULER_CLI
ESP_BLE_MESH_MODEL_ID_LIGHT_LIGHTNESS_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_LIGHTNESS_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_LIGHTNESS_CLI
ESP_BLE_MESH_MODEL_ID_LIGHT_CTL_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_CTL_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_CTL_CLI
ESP_BLE_MESH_MODEL_ID_LIGHT_CTL_TEMP_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_HSL_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_HSL_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_HSL_CLI
ESP_BLE_MESH_MODEL_ID_LIGHT_HSL_HUE_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_HSL_SAT_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_XYL_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_XYL_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_XYL_CLI
ESP_BLE_MESH_MODEL_ID_LIGHT_LC_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_LC_SETUP_SRV
ESP_BLE_MESH_MODEL_ID_LIGHT_LC_CLI
ESP_BLE_MESH_MODEL_OP_BEACON_GET

Config Beacon Get

ESP_BLE_MESH_MODEL_OP_COMPOSITION_DATA_GET

Config Composition Data Get

ESP_BLE_MESH_MODEL_OP_DEFAULT_TTL_GET

Config Default TTL Get

ESP_BLE_MESH_MODEL_OP_GATT_PROXY_GET

Config GATT Proxy Get

ESP_BLE_MESH_MODEL_OP_RELAY_GET

Config Relay Get

ESP_BLE_MESH_MODEL_OP_MODEL_PUB_GET

Config Model Publication Get

ESP_BLE_MESH_MODEL_OP_FRIEND_GET

Config Friend Get

ESP_BLE_MESH_MODEL_OP_HEARTBEAT_PUB_GET

Config Heartbeat Publication Get

ESP_BLE_MESH_MODEL_OP_HEARTBEAT_SUB_GET

Config Heartbeat Subscription Get

ESP_BLE_MESH_MODEL_OP_NET_KEY_GET

Config NetKey Get

ESP_BLE_MESH_MODEL_OP_APP_KEY_GET

Config AppKey Get

ESP_BLE_MESH_MODEL_OP_NODE_IDENTITY_GET

Config Node Identity Get

ESP_BLE_MESH_MODEL_OP_SIG_MODEL_SUB_GET

Config SIG Model Subscription Get

ESP_BLE_MESH_MODEL_OP_VENDOR_MODEL_SUB_GET

Config Vendor Model Subscription Get

ESP_BLE_MESH_MODEL_OP_SIG_MODEL_APP_GET

Config SIG Model App Get

ESP_BLE_MESH_MODEL_OP_VENDOR_MODEL_APP_GET

Config Vendor Model App Get

ESP_BLE_MESH_MODEL_OP_KEY_REFRESH_PHASE_GET

Config Key Refresh Phase Get

ESP_BLE_MESH_MODEL_OP_LPN_POLLTIMEOUT_GET

Config Low Power Node PollTimeout Get

ESP_BLE_MESH_MODEL_OP_NETWORK_TRANSMIT_GET

Config Network Transmit Get

ESP_BLE_MESH_MODEL_OP_BEACON_SET

Config Beacon Set

ESP_BLE_MESH_MODEL_OP_DEFAULT_TTL_SET

Config Default TTL Set

ESP_BLE_MESH_MODEL_OP_GATT_PROXY_SET

Config GATT Proxy Set

ESP_BLE_MESH_MODEL_OP_RELAY_SET

Config Relay Set

ESP_BLE_MESH_MODEL_OP_MODEL_PUB_SET

Config Model Publication Set

ESP_BLE_MESH_MODEL_OP_MODEL_SUB_ADD

Config Model Subscription Add

ESP_BLE_MESH_MODEL_OP_MODEL_SUB_VIRTUAL_ADDR_ADD

Config Model Subscription Virtual Address Add

ESP_BLE_MESH_MODEL_OP_MODEL_SUB_DELETE

Config Model Subscription Delete

ESP_BLE_MESH_MODEL_OP_MODEL_SUB_VIRTUAL_ADDR_DELETE

Config Model Subscription Virtual Address Delete

ESP_BLE_MESH_MODEL_OP_MODEL_SUB_OVERWRITE

Config Model Subscription Overwrite

ESP_BLE_MESH_MODEL_OP_MODEL_SUB_VIRTUAL_ADDR_OVERWRITE

Config Model Subscription Virtual Address Overwrite

ESP_BLE_MESH_MODEL_OP_NET_KEY_ADD

Config NetKey Add

ESP_BLE_MESH_MODEL_OP_APP_KEY_ADD

Config AppKey Add

ESP_BLE_MESH_MODEL_OP_MODEL_APP_BIND

Config Model App Bind

ESP_BLE_MESH_MODEL_OP_NODE_RESET

Config Node Reset

ESP_BLE_MESH_MODEL_OP_FRIEND_SET

Config Friend Set

ESP_BLE_MESH_MODEL_OP_HEARTBEAT_PUB_SET

Config Heartbeat Publication Set

ESP_BLE_MESH_MODEL_OP_HEARTBEAT_SUB_SET

Config Heartbeat Subscription Set

ESP_BLE_MESH_MODEL_OP_NET_KEY_UPDATE

Config NetKey Update

ESP_BLE_MESH_MODEL_OP_NET_KEY_DELETE

Config NetKey Delete

ESP_BLE_MESH_MODEL_OP_APP_KEY_UPDATE

Config AppKey Update

ESP_BLE_MESH_MODEL_OP_APP_KEY_DELETE

Config AppKey Delete

ESP_BLE_MESH_MODEL_OP_NODE_IDENTITY_SET

Config Node Identity Set

ESP_BLE_MESH_MODEL_OP_KEY_REFRESH_PHASE_SET

Config Key Refresh Phase Set

ESP_BLE_MESH_MODEL_OP_MODEL_PUB_VIRTUAL_ADDR_SET

Config Model Publication Virtual Address Set

ESP_BLE_MESH_MODEL_OP_MODEL_SUB_DELETE_ALL

Config Model Subscription Delete All

ESP_BLE_MESH_MODEL_OP_MODEL_APP_UNBIND

Config Model App Unbind

ESP_BLE_MESH_MODEL_OP_NETWORK_TRANSMIT_SET

Config Network Transmit Set

ESP_BLE_MESH_MODEL_OP_BEACON_STATUS
ESP_BLE_MESH_MODEL_OP_COMPOSITION_DATA_STATUS
ESP_BLE_MESH_MODEL_OP_DEFAULT_TTL_STATUS
ESP_BLE_MESH_MODEL_OP_GATT_PROXY_STATUS
ESP_BLE_MESH_MODEL_OP_RELAY_STATUS
ESP_BLE_MESH_MODEL_OP_MODEL_PUB_STATUS
ESP_BLE_MESH_MODEL_OP_MODEL_SUB_STATUS
ESP_BLE_MESH_MODEL_OP_SIG_MODEL_SUB_LIST
ESP_BLE_MESH_MODEL_OP_VENDOR_MODEL_SUB_LIST
ESP_BLE_MESH_MODEL_OP_NET_KEY_STATUS
ESP_BLE_MESH_MODEL_OP_NET_KEY_LIST
ESP_BLE_MESH_MODEL_OP_APP_KEY_STATUS
ESP_BLE_MESH_MODEL_OP_APP_KEY_LIST
ESP_BLE_MESH_MODEL_OP_NODE_IDENTITY_STATUS
ESP_BLE_MESH_MODEL_OP_MODEL_APP_STATUS
ESP_BLE_MESH_MODEL_OP_SIG_MODEL_APP_LIST
ESP_BLE_MESH_MODEL_OP_VENDOR_MODEL_APP_LIST
ESP_BLE_MESH_MODEL_OP_NODE_RESET_STATUS
ESP_BLE_MESH_MODEL_OP_FRIEND_STATUS
ESP_BLE_MESH_MODEL_OP_KEY_REFRESH_PHASE_STATUS
ESP_BLE_MESH_MODEL_OP_HEARTBEAT_PUB_STATUS
ESP_BLE_MESH_MODEL_OP_HEARTBEAT_SUB_STATUS
ESP_BLE_MESH_MODEL_OP_LPN_POLLTIMEOUT_STATUS
ESP_BLE_MESH_MODEL_OP_NETWORK_TRANSMIT_STATUS
ESP_BLE_MESH_CFG_STATUS_SUCCESS
ESP_BLE_MESH_CFG_STATUS_INVALID_ADDRESS
ESP_BLE_MESH_CFG_STATUS_INVALID_MODEL
ESP_BLE_MESH_CFG_STATUS_INVALID_APPKEY
ESP_BLE_MESH_CFG_STATUS_INVALID_NETKEY
ESP_BLE_MESH_CFG_STATUS_INSUFFICIENT_RESOURCES
ESP_BLE_MESH_CFG_STATUS_KEY_INDEX_ALREADY_STORED
ESP_BLE_MESH_CFG_STATUS_INVALID_PUBLISH_PARAMETERS
ESP_BLE_MESH_CFG_STATUS_NOT_A_SUBSCRIBE_MODEL
ESP_BLE_MESH_CFG_STATUS_STORAGE_FAILURE
ESP_BLE_MESH_CFG_STATUS_FEATURE_NOT_SUPPORTED
ESP_BLE_MESH_CFG_STATUS_CANNOT_UPDATE
ESP_BLE_MESH_CFG_STATUS_CANNOT_REMOVE
ESP_BLE_MESH_CFG_STATUS_CANNOT_BIND
ESP_BLE_MESH_CFG_STATUS_TEMP_UNABLE_TO_CHANGE_STATE
ESP_BLE_MESH_CFG_STATUS_CANNOT_SET
ESP_BLE_MESH_CFG_STATUS_UNSPECIFIED_ERROR
ESP_BLE_MESH_CFG_STATUS_INVALID_BINDING
ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_GET

Health Fault Get

ESP_BLE_MESH_MODEL_OP_HEALTH_PERIOD_GET

Health Period Get

ESP_BLE_MESH_MODEL_OP_ATTENTION_GET

Health Attention Get

ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_CLEAR

Health Fault Clear

ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_CLEAR_UNACK

Health Fault Clear Unacknowledged

ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_TEST

Health Fault Test

ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_TEST_UNACK

Health Fault Test Unacknowledged

ESP_BLE_MESH_MODEL_OP_HEALTH_PERIOD_SET

Health Period Set

ESP_BLE_MESH_MODEL_OP_HEALTH_PERIOD_SET_UNACK

Health Period Set Unacknowledged

ESP_BLE_MESH_MODEL_OP_ATTENTION_SET

Health Attention Set

ESP_BLE_MESH_MODEL_OP_ATTENTION_SET_UNACK

Health Attention Set Unacknowledged

ESP_BLE_MESH_MODEL_OP_HEALTH_CURRENT_STATUS
ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_STATUS
ESP_BLE_MESH_MODEL_OP_HEALTH_PERIOD_STATUS
ESP_BLE_MESH_MODEL_OP_ATTENTION_STATUS
ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_GET
ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET
ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_STATUS

Generic Level Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_GET
ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_SET
ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_STATUS
ESP_BLE_MESH_MODEL_OP_GEN_DELTA_SET
ESP_BLE_MESH_MODEL_OP_GEN_DELTA_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_MOVE_SET
ESP_BLE_MESH_MODEL_OP_GEN_MOVE_SET_UNACK

Generic Default Transition Time Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_DEF_TRANS_TIME_GET
ESP_BLE_MESH_MODEL_OP_GEN_DEF_TRANS_TIME_SET
ESP_BLE_MESH_MODEL_OP_GEN_DEF_TRANS_TIME_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_DEF_TRANS_TIME_STATUS

Generic Power OnOff Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_ONPOWERUP_GET
ESP_BLE_MESH_MODEL_OP_GEN_ONPOWERUP_STATUS

Generic Power OnOff Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_ONPOWERUP_SET
ESP_BLE_MESH_MODEL_OP_GEN_ONPOWERUP_SET_UNACK

Generic Power Level Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_POWER_LEVEL_GET
ESP_BLE_MESH_MODEL_OP_GEN_POWER_LEVEL_SET
ESP_BLE_MESH_MODEL_OP_GEN_POWER_LEVEL_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_POWER_LEVEL_STATUS
ESP_BLE_MESH_MODEL_OP_GEN_POWER_LAST_GET
ESP_BLE_MESH_MODEL_OP_GEN_POWER_LAST_STATUS
ESP_BLE_MESH_MODEL_OP_GEN_POWER_DEFAULT_GET
ESP_BLE_MESH_MODEL_OP_GEN_POWER_DEFAULT_STATUS
ESP_BLE_MESH_MODEL_OP_GEN_POWER_RANGE_GET
ESP_BLE_MESH_MODEL_OP_GEN_POWER_RANGE_STATUS

Generic Power Level Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_POWER_DEFAULT_SET
ESP_BLE_MESH_MODEL_OP_GEN_POWER_DEFAULT_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_POWER_RANGE_SET
ESP_BLE_MESH_MODEL_OP_GEN_POWER_RANGE_SET_UNACK

Generic Battery Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_BATTERY_GET
ESP_BLE_MESH_MODEL_OP_GEN_BATTERY_STATUS

Generic Location Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_LOC_GLOBAL_GET
ESP_BLE_MESH_MODEL_OP_GEN_LOC_GLOBAL_STATUS
ESP_BLE_MESH_MODEL_OP_GEN_LOC_LOCAL_GET
ESP_BLE_MESH_MODEL_OP_GEN_LOC_LOCAL_STATUS

Generic Location Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_LOC_GLOBAL_SET
ESP_BLE_MESH_MODEL_OP_GEN_LOC_GLOBAL_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_LOC_LOCAL_SET
ESP_BLE_MESH_MODEL_OP_GEN_LOC_LOCAL_SET_UNACK

Generic Manufacturer Property Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTIES_GET
ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTIES_STATUS
ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTY_GET
ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTY_SET
ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTY_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTY_STATUS

Generic Admin Property Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTIES_GET
ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTIES_STATUS
ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTY_GET
ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTY_SET
ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTY_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTY_STATUS

Generic User Property Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTIES_GET
ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTIES_STATUS
ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTY_GET
ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTY_SET
ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTY_SET_UNACK
ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTY_STATUS

Generic Client Property Message Opcode

ESP_BLE_MESH_MODEL_OP_GEN_CLIENT_PROPERTIES_GET
ESP_BLE_MESH_MODEL_OP_GEN_CLIENT_PROPERTIES_STATUS
ESP_BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_GET
ESP_BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_STATUS
ESP_BLE_MESH_MODEL_OP_SENSOR_GET
ESP_BLE_MESH_MODEL_OP_SENSOR_STATUS
ESP_BLE_MESH_MODEL_OP_SENSOR_COLUMN_GET
ESP_BLE_MESH_MODEL_OP_SENSOR_COLUMN_STATUS
ESP_BLE_MESH_MODEL_OP_SENSOR_SERIES_GET
ESP_BLE_MESH_MODEL_OP_SENSOR_SERIES_STATUS

Sensor Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_GET
ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_SET
ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_SET_UNACK
ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_STATUS
ESP_BLE_MESH_MODEL_OP_SENSOR_SETTINGS_GET
ESP_BLE_MESH_MODEL_OP_SENSOR_SETTINGS_STATUS
ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_GET
ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_SET
ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_SET_UNACK
ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_STATUS
ESP_BLE_MESH_MODEL_OP_TIME_GET
ESP_BLE_MESH_MODEL_OP_TIME_SET
ESP_BLE_MESH_MODEL_OP_TIME_STATUS
ESP_BLE_MESH_MODEL_OP_TIME_ROLE_GET
ESP_BLE_MESH_MODEL_OP_TIME_ROLE_SET
ESP_BLE_MESH_MODEL_OP_TIME_ROLE_STATUS
ESP_BLE_MESH_MODEL_OP_TIME_ZONE_GET
ESP_BLE_MESH_MODEL_OP_TIME_ZONE_SET
ESP_BLE_MESH_MODEL_OP_TIME_ZONE_STATUS
ESP_BLE_MESH_MODEL_OP_TAI_UTC_DELTA_GET
ESP_BLE_MESH_MODEL_OP_TAI_UTC_DELTA_SET
ESP_BLE_MESH_MODEL_OP_TAI_UTC_DELTA_STATUS

Scene Message Opcode

ESP_BLE_MESH_MODEL_OP_SCENE_GET
ESP_BLE_MESH_MODEL_OP_SCENE_RECALL
ESP_BLE_MESH_MODEL_OP_SCENE_RECALL_UNACK
ESP_BLE_MESH_MODEL_OP_SCENE_STATUS
ESP_BLE_MESH_MODEL_OP_SCENE_REGISTER_GET
ESP_BLE_MESH_MODEL_OP_SCENE_REGISTER_STATUS

Scene Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_SCENE_STORE
ESP_BLE_MESH_MODEL_OP_SCENE_STORE_UNACK
ESP_BLE_MESH_MODEL_OP_SCENE_DELETE
ESP_BLE_MESH_MODEL_OP_SCENE_DELETE_UNACK

Scheduler Message Opcode

ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_GET
ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_STATUS
ESP_BLE_MESH_MODEL_OP_SCHEDULER_GET
ESP_BLE_MESH_MODEL_OP_SCHEDULER_STATUS

Scheduler Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_SET
ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LAST_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LAST_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_DEFAULT_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_DEFAULT_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_RANGE_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_RANGE_STATUS

Light Lightness Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_DEFAULT_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_DEFAULT_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_RANGE_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_RANGE_SET_UNACK

Light CTL Message Opcode

ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_RANGE_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_RANGE_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_DEFAULT_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_DEFAULT_STATUS

Light CTL Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_DEFAULT_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_DEFAULT_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_RANGE_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_RANGE_SET_UNACK

Light HSL Message Opcode

ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_HUE_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_HUE_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_HUE_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_HUE_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SATURATION_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SATURATION_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SATURATION_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SATURATION_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_TARGET_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_TARGET_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_DEFAULT_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_DEFAULT_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_RANGE_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_RANGE_STATUS

Light HSL Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_DEFAULT_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_DEFAULT_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_RANGE_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_RANGE_SET_UNACK

Light xyL Message Opcode

ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_TARGET_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_TARGET_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_DEFAULT_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_DEFAULT_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_RANGE_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_RANGE_STATUS

Light xyL Setup Message Opcode

ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_DEFAULT_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_DEFAULT_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_RANGE_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_RANGE_SET_UNACK

Light Control Message Opcode

ESP_BLE_MESH_MODEL_OP_LIGHT_LC_MODE_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_MODE_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_MODE_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_MODE_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_OM_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_OM_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_OM_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_OM_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_LIGHT_ONOFF_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_LIGHT_ONOFF_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_LIGHT_ONOFF_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_LIGHT_ONOFF_STATUS
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_GET
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_SET
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_STATUS
ESP_BLE_MESH_MODEL_STATUS_SUCCESS
ESP_BLE_MESH_MODEL_STATUS_CANNOT_SET_RANGE_MIN
ESP_BLE_MESH_MODEL_STATUS_CANNOT_SET_RANGE_MAX
ESP_BLE_MESH_SERVER_RSP_BY_APP

Response need to be sent in the application

ESP_BLE_MESH_SERVER_AUTO_RSP

Response will be sent internally

Type Definitions

typedef uint8_t esp_ble_mesh_octet16_t[ESP_BLE_MESH_OCTET16_LEN]

Define the BLE Mesh octet 8 bytes size

typedef uint8_t esp_ble_mesh_octet8_t[ESP_BLE_MESH_OCTET8_LEN]

Invalid Company ID

typedef uint32_t esp_ble_mesh_cb_t
typedef uint8_t UINT8
typedef uint16_t UINT16
typedef uint32_t UINT32
typedef uint64_t UINT64
typedef UINT8 BT_OCTET32[BT_OCTET32_LEN]
typedef uint8_t BD_ADDR[BD_ADDR_LEN]
typedef uint8_t esp_ble_mesh_bd_addr_t[BD_ADDR_LEN]
typedef uint8_t esp_ble_mesh_addr_type_t

BLE device address type.

typedef struct esp_ble_mesh_model esp_ble_mesh_model_t
typedef uint8_t esp_ble_mesh_dev_add_flag_t
typedef uint32_t esp_ble_mesh_opcode_config_client_get_t

esp_ble_mesh_opcode_config_client_get_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by esp_ble_mesh_config_client_get_state. The following opcodes will only be used in the esp_ble_mesh_config_client_get_state function.

typedef uint32_t esp_ble_mesh_opcode_config_client_set_t

esp_ble_mesh_opcode_config_client_set_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by esp_ble_mesh_config_client_set_state. The following opcodes will only be used in the esp_ble_mesh_config_client_set_state function.

typedef uint32_t esp_ble_mesh_opcode_config_status_t

esp_ble_mesh_opcode_config_status_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by the Config Model messages The following opcodes are used by the BLE Mesh Config Server Model internally to respond to the Config Client Model’s request messages.

typedef uint8_t esp_ble_mesh_cfg_status_t

This typedef is only used to indicate the status code contained in some of the Configuration Server Model status message.

typedef uint32_t esp_ble_mesh_opcode_health_client_get_t

esp_ble_mesh_opcode_health_client_get_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by esp_ble_mesh_health_client_get_state. The following opcodes will only be used in the esp_ble_mesh_health_client_get_state function.

typedef uint32_t esp_ble_mesh_opcode_health_client_set_t

esp_ble_mesh_opcode_health_client_set_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by esp_ble_mesh_health_client_set_state. The following opcodes will only be used in the esp_ble_mesh_health_client_set_state function.

typedef uint32_t esp_ble_mesh_health_model_status_t

esp_ble_mesh_health_model_status_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by the Health Model messages. The following opcodes are used by the BLE Mesh Health Server Model internally to respond to the Health Client Model’s request messages.

typedef uint32_t esp_ble_mesh_generic_message_opcode_t

esp_ble_mesh_generic_message_opcode_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by functions esp_ble_mesh_generic_client_get_state & esp_ble_mesh_generic_client_set_state. Generic OnOff Message Opcode

typedef uint32_t esp_ble_mesh_sensor_message_opcode_t

esp_ble_mesh_sensor_message_opcode_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by functions esp_ble_mesh_sensor_client_get_state & esp_ble_mesh_sensor_client_set_state. Sensor Message Opcode

typedef uint32_t esp_ble_mesh_time_scene_message_opcode_t

esp_ble_mesh_time_scene_message_opcode_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by functions esp_ble_mesh_time_scene_client_get_state & esp_ble_mesh_time_scene_client_set_state. Time Message Opcode

typedef uint32_t esp_ble_mesh_light_message_opcode_t

esp_ble_mesh_light_message_opcode_t belongs to esp_ble_mesh_opcode_t, this typedef is only used to locate the opcodes used by functions esp_ble_mesh_light_client_get_state & esp_ble_mesh_light_client_set_state. Light Lightness Message Opcode

typedef uint32_t esp_ble_mesh_opcode_t

End of defines of esp_ble_mesh_opcode_t

typedef uint8_t esp_ble_mesh_model_status_t

This typedef is only used to indicate the status code contained in some of the server models (e.g. Generic Server Model) status message.

Enumerations

enum esp_ble_mesh_cb_type_t

Values:

enumerator ESP_BLE_MESH_TYPE_PROV_CB
enumerator ESP_BLE_MESH_TYPE_OUTPUT_NUM_CB
enumerator ESP_BLE_MESH_TYPE_OUTPUT_STR_CB
enumerator ESP_BLE_MESH_TYPE_INTPUT_CB
enumerator ESP_BLE_MESH_TYPE_COMPLETE_CB
enumerator ESP_BLE_MESH_TYPE_RESET_CB
enum esp_ble_mesh_oob_method_t

Values:

enumerator ESP_BLE_MESH_NO_OOB
enumerator ESP_BLE_MESH_STATIC_OOB
enumerator ESP_BLE_MESH_OUTPUT_OOB
enumerator ESP_BLE_MESH_INPUT_OOB
enum esp_ble_mesh_output_action_t

Values:

enumerator ESP_BLE_MESH_NO_OUTPUT
enumerator ESP_BLE_MESH_BLINK
enumerator ESP_BLE_MESH_BEEP
enumerator ESP_BLE_MESH_VIBRATE
enumerator ESP_BLE_MESH_DISPLAY_NUMBER
enumerator ESP_BLE_MESH_DISPLAY_STRING
enum esp_ble_mesh_input_action_t

Values:

enumerator ESP_BLE_MESH_NO_INPUT
enumerator ESP_BLE_MESH_PUSH
enumerator ESP_BLE_MESH_TWIST
enumerator ESP_BLE_MESH_ENTER_NUMBER
enumerator ESP_BLE_MESH_ENTER_STRING
enum esp_ble_mesh_prov_bearer_t

Values:

enumerator ESP_BLE_MESH_PROV_ADV
enumerator ESP_BLE_MESH_PROV_GATT
enum esp_ble_mesh_prov_oob_info_t

Values:

enumerator ESP_BLE_MESH_PROV_OOB_OTHER
enumerator ESP_BLE_MESH_PROV_OOB_URI
enumerator ESP_BLE_MESH_PROV_OOB_2D_CODE
enumerator ESP_BLE_MESH_PROV_OOB_BAR_CODE
enumerator ESP_BLE_MESH_PROV_OOB_NFC
enumerator ESP_BLE_MESH_PROV_OOB_NUMBER
enumerator ESP_BLE_MESH_PROV_OOB_STRING
enumerator ESP_BLE_MESH_PROV_OOB_ON_BOX
enumerator ESP_BLE_MESH_PROV_OOB_IN_BOX
enumerator ESP_BLE_MESH_PROV_OOB_ON_PAPER
enumerator ESP_BLE_MESH_PROV_OOB_IN_MANUAL
enumerator ESP_BLE_MESH_PROV_OOB_ON_DEV
enum esp_ble_mesh_dev_role_t

Values:

enumerator ROLE_NODE
enumerator ROLE_PROVISIONER
enumerator ROLE_FAST_PROV
enum esp_ble_mesh_fast_prov_action_t

Values:

enumerator FAST_PROV_ACT_NONE
enumerator FAST_PROV_ACT_ENTER
enumerator FAST_PROV_ACT_SUSPEND
enumerator FAST_PROV_ACT_EXIT
enumerator FAST_PROV_ACT_MAX
enum esp_ble_mesh_proxy_filter_type_t

Values:

enumerator PROXY_FILTER_WHITELIST
enumerator PROXY_FILTER_BLACKLIST
enum esp_ble_mesh_prov_cb_event_t

Values:

enumerator ESP_BLE_MESH_PROV_REGISTER_COMP_EVT

Initialize BLE Mesh provisioning capabilities and internal data information completion event

enumerator ESP_BLE_MESH_NODE_SET_UNPROV_DEV_NAME_COMP_EVT

Set the unprovisioned device name completion event

enumerator ESP_BLE_MESH_NODE_PROV_ENABLE_COMP_EVT

Enable node provisioning functionality completion event

enumerator ESP_BLE_MESH_NODE_PROV_DISABLE_COMP_EVT

Disable node provisioning functionality completion event

Establish a BLE Mesh link event

Close a BLE Mesh link event

enumerator ESP_BLE_MESH_NODE_PROV_OOB_PUB_KEY_EVT

Generate Node input OOB public key event

enumerator ESP_BLE_MESH_NODE_PROV_OUTPUT_NUMBER_EVT

Generate Node Output Number event

enumerator ESP_BLE_MESH_NODE_PROV_OUTPUT_STRING_EVT

Generate Node Output String event

enumerator ESP_BLE_MESH_NODE_PROV_INPUT_EVT

Event requiring the user to input a number or string

enumerator ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT

Provisioning done event

enumerator ESP_BLE_MESH_NODE_PROV_RESET_EVT

Provisioning reset event

enumerator ESP_BLE_MESH_NODE_PROV_SET_OOB_PUB_KEY_COMP_EVT

Node set oob public key completion event

enumerator ESP_BLE_MESH_NODE_PROV_INPUT_NUMBER_COMP_EVT

Node input number completion event

enumerator ESP_BLE_MESH_NODE_PROV_INPUT_STRING_COMP_EVT

Node input string completion event

enumerator ESP_BLE_MESH_NODE_PROXY_IDENTITY_ENABLE_COMP_EVT

Enable BLE Mesh Proxy Identity advertising completion event

enumerator ESP_BLE_MESH_NODE_PROXY_GATT_ENABLE_COMP_EVT

Enable BLE Mesh GATT Proxy Service completion event

enumerator ESP_BLE_MESH_NODE_PROXY_GATT_DISABLE_COMP_EVT

Disable BLE Mesh GATT Proxy Service completion event

enumerator ESP_BLE_MESH_NODE_ADD_LOCAL_NET_KEY_COMP_EVT

Node add NetKey locally completion event

enumerator ESP_BLE_MESH_NODE_ADD_LOCAL_APP_KEY_COMP_EVT

Node add AppKey locally completion event

enumerator ESP_BLE_MESH_NODE_BIND_APP_KEY_TO_MODEL_COMP_EVT

Node bind AppKey to model locally completion event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT

Provisioner enable provisioning functionality completion event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_DISABLE_COMP_EVT

Provisioner disable provisioning functionality completion event

enumerator ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT

Provisioner receives unprovisioned device beacon event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_EVT

Provisioner read unprovisioned device OOB public key event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_INPUT_EVT

Provisioner input value for provisioning procedure event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_OUTPUT_EVT

Provisioner output value for provisioning procedure event

Provisioner establish a BLE Mesh link event

Provisioner close a BLE Mesh link event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT

Provisioner provisioning done event

enumerator ESP_BLE_MESH_PROVISIONER_ADD_UNPROV_DEV_COMP_EVT

Provisioner add a device to the list which contains devices that are waiting/going to be provisioned completion event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_DEV_WITH_ADDR_COMP_EVT

Provisioner start to provision an unprovisioned device completion event

enumerator ESP_BLE_MESH_PROVISIONER_DELETE_DEV_COMP_EVT

Provisioner delete a device from the list, close provisioning link with the device completion event

enumerator ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT

Provisioner set the value to be compared with part of the unprovisioned device UUID completion event

enumerator ESP_BLE_MESH_PROVISIONER_SET_PROV_DATA_INFO_COMP_EVT

Provisioner set net_idx/flags/iv_index used for provisioning completion event

enumerator ESP_BLE_MESH_PROVISIONER_SET_STATIC_OOB_VALUE_COMP_EVT

Provisioner set static oob value used for provisioning completion event

enumerator ESP_BLE_MESH_PROVISIONER_SET_PRIMARY_ELEM_ADDR_COMP_EVT

Provisioner set unicast address of primary element completion event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_COMP_EVT

Provisioner read unprovisioned device OOB public key completion event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_INPUT_NUMBER_COMP_EVT

Provisioner input number completion event

enumerator ESP_BLE_MESH_PROVISIONER_PROV_INPUT_STRING_COMP_EVT

Provisioner input string completion event

enumerator ESP_BLE_MESH_PROVISIONER_SET_NODE_NAME_COMP_EVT

Provisioner set node name completion event

enumerator ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT

Provisioner add local app key completion event

enumerator ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_APP_KEY_COMP_EVT

Provisioner update local app key completion event

enumerator ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT

Provisioner bind local model with local app key completion event

enumerator ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_NET_KEY_COMP_EVT

Provisioner add local network key completion event

enumerator ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_NET_KEY_COMP_EVT

Provisioner update local network key completion event

enumerator ESP_BLE_MESH_PROVISIONER_STORE_NODE_COMP_DATA_COMP_EVT

Provisioner store node composition data completion event

enumerator ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_UUID_COMP_EVT

Provisioner delete node with uuid completion event

enumerator ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_ADDR_COMP_EVT

Provisioner delete node with unicast address completion event

enumerator ESP_BLE_MESH_PROVISIONER_ENABLE_HEARTBEAT_RECV_COMP_EVT

Provisioner start to receive heartbeat message completion event

enumerator ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_TYPE_COMP_EVT

Provisioner set the heartbeat filter type completion event

enumerator ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_INFO_COMP_EVT

Provisioner set the heartbeat filter information completion event

enumerator ESP_BLE_MESH_PROVISIONER_RECV_HEARTBEAT_MESSAGE_EVT

Provisioner receive heartbeat message event

enumerator ESP_BLE_MESH_PROVISIONER_DIRECT_ERASE_SETTINGS_COMP_EVT

Provisioner directly erase settings completion event

enumerator ESP_BLE_MESH_PROVISIONER_OPEN_SETTINGS_WITH_INDEX_COMP_EVT

Provisioner open settings with index completion event

enumerator ESP_BLE_MESH_PROVISIONER_OPEN_SETTINGS_WITH_UID_COMP_EVT

Provisioner open settings with user id completion event

enumerator ESP_BLE_MESH_PROVISIONER_CLOSE_SETTINGS_WITH_INDEX_COMP_EVT

Provisioner close settings with index completion event

enumerator ESP_BLE_MESH_PROVISIONER_CLOSE_SETTINGS_WITH_UID_COMP_EVT

Provisioner close settings with user id completion event

enumerator ESP_BLE_MESH_PROVISIONER_DELETE_SETTINGS_WITH_INDEX_COMP_EVT

Provisioner delete settings with index completion event

enumerator ESP_BLE_MESH_PROVISIONER_DELETE_SETTINGS_WITH_UID_COMP_EVT

Provisioner delete settings with user id completion event

enumerator ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT

Set fast provisioning information (e.g. unicast address range, net_idx, etc.) completion event

enumerator ESP_BLE_MESH_SET_FAST_PROV_ACTION_COMP_EVT

Set fast provisioning action completion event

enumerator ESP_BLE_MESH_HEARTBEAT_MESSAGE_RECV_EVT

Receive Heartbeat message event

enumerator ESP_BLE_MESH_LPN_ENABLE_COMP_EVT

Enable Low Power Node completion event

enumerator ESP_BLE_MESH_LPN_DISABLE_COMP_EVT

Disable Low Power Node completion event

enumerator ESP_BLE_MESH_LPN_POLL_COMP_EVT

Low Power Node send Friend Poll completion event

enumerator ESP_BLE_MESH_LPN_FRIENDSHIP_ESTABLISH_EVT

Low Power Node establishes friendship event

enumerator ESP_BLE_MESH_LPN_FRIENDSHIP_TERMINATE_EVT

Low Power Node terminates friendship event

enumerator ESP_BLE_MESH_FRIEND_FRIENDSHIP_ESTABLISH_EVT

Friend Node establishes friendship event

enumerator ESP_BLE_MESH_FRIEND_FRIENDSHIP_TERMINATE_EVT

Friend Node terminates friendship event

enumerator ESP_BLE_MESH_PROXY_CLIENT_RECV_ADV_PKT_EVT

Proxy Client receives Network ID advertising packet event

enumerator ESP_BLE_MESH_PROXY_CLIENT_CONNECTED_EVT

Proxy Client establishes connection successfully event

enumerator ESP_BLE_MESH_PROXY_CLIENT_DISCONNECTED_EVT

Proxy Client terminates connection successfully event

enumerator ESP_BLE_MESH_PROXY_CLIENT_RECV_FILTER_STATUS_EVT

Proxy Client receives Proxy Filter Status event

enumerator ESP_BLE_MESH_PROXY_CLIENT_CONNECT_COMP_EVT

Proxy Client connect completion event

enumerator ESP_BLE_MESH_PROXY_CLIENT_DISCONNECT_COMP_EVT

Proxy Client disconnect completion event

enumerator ESP_BLE_MESH_PROXY_CLIENT_SET_FILTER_TYPE_COMP_EVT

Proxy Client set filter type completion event

enumerator ESP_BLE_MESH_PROXY_CLIENT_ADD_FILTER_ADDR_COMP_EVT

Proxy Client add filter address completion event

enumerator ESP_BLE_MESH_PROXY_CLIENT_REMOVE_FILTER_ADDR_COMP_EVT

Proxy Client remove filter address completion event

enumerator ESP_BLE_MESH_PROXY_SERVER_CONNECTED_EVT

Proxy Server establishes connection successfully event

enumerator ESP_BLE_MESH_PROXY_SERVER_DISCONNECTED_EVT

Proxy Server terminates connection successfully event

enumerator ESP_BLE_MESH_MODEL_SUBSCRIBE_GROUP_ADDR_COMP_EVT

Local model subscribes group address completion event

enumerator ESP_BLE_MESH_MODEL_UNSUBSCRIBE_GROUP_ADDR_COMP_EVT

Local model unsubscribes group address completion event

enumerator ESP_BLE_MESH_DEINIT_MESH_COMP_EVT

De-initialize BLE Mesh stack completion event

enumerator ESP_BLE_MESH_PROV_EVT_MAX
enum [anonymous]

BLE Mesh server models related definitions.

This enum value is the flag of transition timer operation

Values:

enumerator ESP_BLE_MESH_SERVER_TRANS_TIMER_START
enumerator ESP_BLE_MESH_SERVER_FLAG_MAX
enum esp_ble_mesh_server_state_type_t

This enum value is the type of server model states

Values:

enumerator ESP_BLE_MESH_GENERIC_ONOFF_STATE
enumerator ESP_BLE_MESH_GENERIC_LEVEL_STATE
enumerator ESP_BLE_MESH_GENERIC_ONPOWERUP_STATE
enumerator ESP_BLE_MESH_GENERIC_POWER_ACTUAL_STATE
enumerator ESP_BLE_MESH_LIGHT_LIGHTNESS_ACTUAL_STATE
enumerator ESP_BLE_MESH_LIGHT_LIGHTNESS_LINEAR_STATE
enumerator ESP_BLE_MESH_LIGHT_CTL_LIGHTNESS_STATE
enumerator ESP_BLE_MESH_LIGHT_CTL_TEMP_DELTA_UV_STATE
enumerator ESP_BLE_MESH_LIGHT_HSL_STATE
enumerator ESP_BLE_MESH_LIGHT_HSL_LIGHTNESS_STATE
enumerator ESP_BLE_MESH_LIGHT_HSL_HUE_STATE
enumerator ESP_BLE_MESH_LIGHT_HSL_SATURATION_STATE
enumerator ESP_BLE_MESH_LIGHT_XYL_LIGHTNESS_STATE
enumerator ESP_BLE_MESH_LIGHT_LC_LIGHT_ONOFF_STATE
enumerator ESP_BLE_MESH_SERVER_MODEL_STATE_MAX
enum esp_ble_mesh_model_cb_event_t

Values:

enumerator ESP_BLE_MESH_MODEL_OPERATION_EVT

User-defined models receive messages from peer devices (e.g. get, set, status, etc) event

enumerator ESP_BLE_MESH_MODEL_SEND_COMP_EVT

User-defined models send messages completion event

enumerator ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT

User-defined models publish messages completion event

enumerator ESP_BLE_MESH_CLIENT_MODEL_RECV_PUBLISH_MSG_EVT

User-defined client models receive publish messages event

enumerator ESP_BLE_MESH_CLIENT_MODEL_SEND_TIMEOUT_EVT

Timeout event for the user-defined client models that failed to receive response from peer server models

enumerator ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT

When a model is configured to publish messages periodically, this event will occur during every publish period

enumerator ESP_BLE_MESH_SERVER_MODEL_UPDATE_STATE_COMP_EVT

Server models update state value completion event

enumerator ESP_BLE_MESH_MODEL_EVT_MAX

ESP-BLE-MESH Core API Reference

This section contains ESP-BLE-MESH Core related APIs, which can be used to initialize ESP-BLE-MESH stack, provision, send/publish messages, etc.

This API reference covers six components:

ESP-BLE-MESH Stack Initialization

Header File

Functions

esp_err_t esp_ble_mesh_init(esp_ble_mesh_prov_t *prov, esp_ble_mesh_comp_t *comp)

Initialize BLE Mesh module. This API initializes provisioning capabilities and composition data information.

备注

After calling this API, the device needs to call esp_ble_mesh_prov_enable() to enable provisioning functionality again.

参数
  • prov[in] Pointer to the device provisioning capabilities. This pointer must remain valid during the lifetime of the BLE Mesh device.

  • comp[in] Pointer to the device composition data information. This pointer must remain valid during the lifetime of the BLE Mesh device.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_deinit(esp_ble_mesh_deinit_param_t *param)

De-initialize BLE Mesh module.

备注

This function shall be invoked after esp_ble_mesh_client_model_deinit().

参数

param[in] Pointer to the structure of BLE Mesh deinit parameters.

返回

ESP_OK on success or error code otherwise.

Reading of Local Data Information

Header File

Functions

int32_t esp_ble_mesh_get_model_publish_period(esp_ble_mesh_model_t *model)

Get the model publish period, the unit is ms.

参数

model[in] Model instance pointer.

返回

Publish period value on success, 0 or (negative) error code from errno.h on failure.

uint16_t esp_ble_mesh_get_primary_element_address(void)

Get the address of the primary element.

返回

Address of the primary element on success, or ESP_BLE_MESH_ADDR_UNASSIGNED on failure which means the device has not been provisioned.

uint16_t *esp_ble_mesh_is_model_subscribed_to_group(esp_ble_mesh_model_t *model, uint16_t group_addr)

Check if the model has subscribed to the given group address. Note: E.g., once a status message is received and the destination address is a group address, the model uses this API to check if it is successfully subscribed to the given group address.

参数
  • model[in] Pointer to the model.

  • group_addr[in] Group address.

返回

Pointer to the group address within the Subscription List of the model on success, or NULL on failure which means the model has not subscribed to the given group address. Note: With the pointer to the group address returned, you can reset the group address to 0x0000 in order to unsubscribe the model from the group.

esp_ble_mesh_elem_t *esp_ble_mesh_find_element(uint16_t element_addr)

Find the BLE Mesh element pointer via the element address.

参数

element_addr[in] Element address.

返回

Pointer to the element on success, or NULL on failure.

uint8_t esp_ble_mesh_get_element_count(void)

Get the number of elements that have been registered.

返回

Number of elements.

esp_ble_mesh_model_t *esp_ble_mesh_find_vendor_model(const esp_ble_mesh_elem_t *element, uint16_t company_id, uint16_t model_id)

Find the Vendor specific model with the given element, the company ID and the Vendor Model ID.

参数
  • element[in] Element to which the model belongs.

  • company_id[in] A 16-bit company identifier assigned by the Bluetooth SIG.

  • model_id[in] A 16-bit vendor-assigned model identifier.

返回

Pointer to the Vendor Model on success, or NULL on failure which means the Vendor Model is not found.

esp_ble_mesh_model_t *esp_ble_mesh_find_sig_model(const esp_ble_mesh_elem_t *element, uint16_t model_id)

Find the SIG model with the given element and Model id.

参数
  • element[in] Element to which the model belongs.

  • model_id[in] SIG model identifier.

返回

Pointer to the SIG Model on success, or NULL on failure which means the SIG Model is not found.

const esp_ble_mesh_comp_t *esp_ble_mesh_get_composition_data(void)

Get the Composition data which has been registered.

返回

Pointer to the Composition data on success, or NULL on failure which means the Composition data is not initialized.

esp_err_t esp_ble_mesh_model_subscribe_group_addr(uint16_t element_addr, uint16_t company_id, uint16_t model_id, uint16_t group_addr)

A local model of node or Provisioner subscribes a group address.

备注

This function shall not be invoked before node is provisioned or Provisioner is enabled.

参数
  • element_addr[in] Unicast address of the element to which the model belongs.

  • company_id[in] A 16-bit company identifier.

  • model_id[in] A 16-bit model identifier.

  • group_addr[in] The group address to be subscribed.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_model_unsubscribe_group_addr(uint16_t element_addr, uint16_t company_id, uint16_t model_id, uint16_t group_addr)

A local model of node or Provisioner unsubscribes a group address.

备注

This function shall not be invoked before node is provisioned or Provisioner is enabled.

参数
  • element_addr[in] Unicast address of the element to which the model belongs.

  • company_id[in] A 16-bit company identifier.

  • model_id[in] A 16-bit model identifier.

  • group_addr[in] The subscribed group address.

返回

ESP_OK on success or error code otherwise.

const uint8_t *esp_ble_mesh_node_get_local_net_key(uint16_t net_idx)

This function is called by Node to get the local NetKey.

参数

net_idx[in] NetKey index.

返回

NetKey on success, or NULL on failure.

const uint8_t *esp_ble_mesh_node_get_local_app_key(uint16_t app_idx)

This function is called by Node to get the local AppKey.

参数

app_idx[in] AppKey index.

返回

AppKey on success, or NULL on failure.

esp_err_t esp_ble_mesh_node_add_local_net_key(const uint8_t net_key[16], uint16_t net_idx)

This function is called by Node to add a local NetKey.

备注

This function can only be called after the device is provisioned.

参数
  • net_key[in] NetKey to be added.

  • net_idx[in] NetKey Index.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_node_add_local_app_key(const uint8_t app_key[16], uint16_t net_idx, uint16_t app_idx)

This function is called by Node to add a local AppKey.

备注

The net_idx must be an existing one. This function can only be called after the device is provisioned.

参数
  • app_key[in] AppKey to be added.

  • net_idx[in] NetKey Index.

  • app_idx[in] AppKey Index.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_node_bind_app_key_to_local_model(uint16_t element_addr, uint16_t company_id, uint16_t model_id, uint16_t app_idx)

This function is called by Node to bind AppKey to model locally.

备注

If going to bind app_key with local vendor model, the company_id shall be set to 0xFFFF. This function can only be called after the device is provisioned.

参数
  • element_addr[in] Node local element address

  • company_id[in] Node local company id

  • model_id[in] Node local model id

  • app_idx[in] Node local appkey index

返回

ESP_OK on success or error code otherwise.

Low Power Operation (Updating)

Header File

Functions

esp_err_t esp_ble_mesh_lpn_enable(void)

Enable BLE Mesh device LPN functionality.

备注

This API enables LPN functionality. Once called, the proper Friend Request will be sent.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_lpn_disable(bool force)

Disable BLE Mesh device LPN functionality.

参数

force[in] when disabling LPN functionality, use this flag to indicate whether directly clear corresponding information or just send friend clear to disable it if friendship has already been established.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_lpn_poll(void)

LPN tries to poll messages from the Friend Node.

备注

The Friend Poll message is sent by a Low Power node to ask the Friend node to send a message that it has stored for the Low Power node. Users can call this API to send Friend Poll message manually. If this API is not invoked, the bottom layer of the Low Power node will send Friend Poll before the PollTimeout timer expires. If the corresponding Friend Update is received and MD is set to 0, which means there are no messages for the Low Power node, then the Low Power node will stop scanning.

返回

ESP_OK on success or error code otherwise.

Send/Publish Messages, add Local AppKey, etc.

Header File

Functions

esp_err_t esp_ble_mesh_register_custom_model_callback(esp_ble_mesh_model_cb_t callback)

Register BLE Mesh callback for user-defined models’ operations. This callback can report the following events generated for the user-defined models:

  • Call back the messages received by user-defined client and server models to the application layer;

  • If users call esp_ble_mesh_server/client_model_send, this callback notifies the application layer of the send_complete event;

  • If user-defined client model sends a message that requires response, and the response message is received after the timer expires, the response message will be reported to the application layer as published by a peer device;

  • If the user-defined client model fails to receive the response message during a specified period of time, a timeout event will be reported to the application layer.

备注

The client models (i.e. Config Client model, Health Client model, Generic Client models, Sensor Client model, Scene Client model and Lighting Client models) that have been realized internally have their specific register functions. For example, esp_ble_mesh_register_config_client_callback is the register function for Config Client Model.

参数

callback[in] Pointer to the callback function.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_model_msg_opcode_init(uint8_t *data, uint32_t opcode)

Add the message opcode to the beginning of the model message before sending or publishing the model message.

备注

This API is only used to set the opcode of the message.

参数
  • data[in] Pointer to the message data.

  • opcode[in] The message opcode.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_client_model_init(esp_ble_mesh_model_t *model)

Initialize the user-defined client model. All user-defined client models shall call this function to initialize the client model internal data. Node: Before calling this API, the op_pair_size and op_pair variabled within the user_data(defined using esp_ble_mesh_client_t_) of the client model need to be initialized.

参数

model[in] BLE Mesh Client model to which the message belongs.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_client_model_deinit(esp_ble_mesh_model_t *model)

De-initialize the user-defined client model.

备注

This function shall be invoked before esp_ble_mesh_deinit() is called.

参数

model[in] Pointer of the Client model.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_server_model_send_msg(esp_ble_mesh_model_t *model, esp_ble_mesh_msg_ctx_t *ctx, uint32_t opcode, uint16_t length, uint8_t *data)

Send server model messages(such as server model status messages).

参数
  • model[in] BLE Mesh Server Model to which the message belongs.

  • ctx[in] Message context, includes keys, TTL, etc.

  • opcode[in] Message opcode.

  • length[in] Message length (exclude the message opcode).

  • data[in] Parameters of Access Payload (exclude the message opcode) to be sent.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_client_model_send_msg(esp_ble_mesh_model_t *model, esp_ble_mesh_msg_ctx_t *ctx, uint32_t opcode, uint16_t length, uint8_t *data, int32_t msg_timeout, bool need_rsp, esp_ble_mesh_dev_role_t device_role)

Send client model message (such as model get, set, etc).

参数
  • model[in] BLE Mesh Client Model to which the message belongs.

  • ctx[in] Message context, includes keys, TTL, etc.

  • opcode[in] Message opcode.

  • length[in] Message length (exclude the message opcode).

  • data[in] Parameters of the Access Payload (exclude the message opcode) to be sent.

  • msg_timeout[in] Time to get response to the message (in milliseconds).

  • need_rsp[in] TRUE if the opcode requires the peer device to reply, FALSE otherwise.

  • device_role[in] Role of the device (Node/Provisioner) that sends the message.

返回

ESP_OK on success or error code otherwise.

esp_err_t esp_ble_mesh_model_publish(esp_ble_mesh_model_t *model, uint32_t opcode,