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 Getting Started with 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 Architecture.
Application Examples and Demos¶
Please refer to Sections ESP-BLE-MESH Examples and ESP-BLE-MESH Demo Videos.
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
-
struct esp_ble_mesh_prov_cb_param_t::ble_mesh_link_open_evt_param
node_prov_link_open
¶ Event parameter of ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT
-
struct esp_ble_mesh_prov_cb_param_t::ble_mesh_link_close_evt_param
node_prov_link_close
¶ 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
-
struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_link_open_evt_param
provisioner_prov_link_open
¶ 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
-
struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_link_close_evt_param
provisioner_prov_link_close
¶ 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_DRIECT_ERASE_SETTINGS_COMP_EVT.
Event parameters of ESP_BLE_MESH_PROVISIONER_DRIECT_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_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
-
int
-
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
-
uint16_t
-
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:
-
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
-
ESP_BLE_MESH_FRND_FRIENDSHIP_TERMINATE_POLL_TIMEOUT
¶ Friendship is established, PollTimeout timer expires and no Friend Poll/Sub Add/Sub Remove is received
-
ESP_BLE_MESH_FRND_FRIENDSHIP_TERMINATE_RECV_FRND_REQ
¶ Receive Friend Request from existing Low Power Node
-
ESP_BLE_MESH_FRND_FRIENDSHIP_TERMINATE_RECV_FRND_CLEAR
¶ Receive Friend Clear from other friend node
-
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
-
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
-
enum [anonymous]¶
-
struct
ble_mesh_heartbeat_msg_recv_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_HEARTBEAT_MESSAGE_RECV_EVT.
-
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
-
esp_ble_mesh_input_action_t
-
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
-
int
-
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
-
int
-
struct
ble_mesh_link_close_evt_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_NODE_PROV_LINK_CLOSE_EVT.
Public Members
-
esp_ble_mesh_prov_bearer_t
bearer
¶ Type of the bearer used when device link is closed
-
esp_ble_mesh_prov_bearer_t
-
struct
ble_mesh_link_open_evt_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT.
Public Members
-
esp_ble_mesh_prov_bearer_t
bearer
¶ Type of the bearer used when device link is open
-
esp_ble_mesh_prov_bearer_t
-
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
-
int
-
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
-
int
-
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
-
uint16_t
-
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
-
uint16_t
-
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
-
int
-
struct
ble_mesh_model_sub_group_addr_comp_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_MODEL_SUBSCRIBE_GROUP_ADDR_COMP_EVT.
-
struct
ble_mesh_model_unsub_group_addr_comp_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_MODEL_UNSUBSCRIBE_GROUP_ADDR_COMP_EVT.
-
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.
-
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.
-
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.
-
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
-
esp_ble_mesh_output_action_t
-
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
-
char
-
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
-
int
-
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
-
int
-
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
-
int
-
struct
ble_mesh_provision_complete_evt_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT.
-
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.
-
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.
-
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
-
int
-
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.
-
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
-
int
-
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.
-
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.
-
struct
ble_mesh_provisioner_link_close_evt_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_PROVISIONER_PROV_LINK_CLOSE_EVT.
Public Members
-
esp_ble_mesh_prov_bearer_t
bearer
¶ Type of the bearer used when Provisioner link is closed
-
uint8_t
reason
¶ Reason of the closed provisioning link
-
esp_ble_mesh_prov_bearer_t
-
struct
ble_mesh_provisioner_link_open_evt_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_PROVISIONER_PROV_LINK_OPEN_EVT.
Public Members
-
esp_ble_mesh_prov_bearer_t
bearer
¶ Type of the bearer used when Provisioner link is opened
-
esp_ble_mesh_prov_bearer_t
-
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
-
uint16_t
-
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
-
int
-
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
-
int
-
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
-
int
-
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
-
uint8_t
link_idx
¶ Index of the provisioning link
-
esp_ble_mesh_oob_method_t
-
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
-
int
-
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
-
int
-
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
-
uint8_t
link_idx
¶ 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]¶
-
esp_ble_mesh_oob_method_t
-
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
-
int
-
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
-
uint8_t
link_idx
¶ Index of the provisioning link
-
uint8_t
-
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
-
uint8_t
-
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
-
int
-
struct
ble_mesh_provisioner_set_node_name_comp_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_PROVISIONER_SET_NODE_NAME_COMP_EVT.
-
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
-
int
-
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
-
int
-
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
-
int
-
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.
-
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.
-
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.
-
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.
-
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
-
int
-
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
-
esp_ble_mesh_bd_addr_t
-
struct
ble_mesh_proxy_client_disconnect_comp_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_PROXY_CLIENT_DISCONNECT_COMP_EVT.
-
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
-
esp_ble_mesh_bd_addr_t
-
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
-
esp_ble_mesh_bd_addr_t
-
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
-
uint8_t
-
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.
-
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.
-
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
-
int
-
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
-
int
-
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
-
int
-
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
-
uint8_t
-
struct
ble_mesh_set_fast_prov_info_comp_param
¶ - #include <esp_ble_mesh_defs.h>
ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT.
-
struct esp_ble_mesh_prov_cb_param_t::ble_mesh_prov_register_comp_param
-
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
-
uint8_t
-
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
-
uint32_t
-
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
-
uint32_t
-
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
-
uint32_t
-
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
-
int
-
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
-
esp_ble_mesh_model_t *
-
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
-
int
-
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
-
int
-
struct esp_ble_mesh_model_cb_param_t::ble_mesh_model_operation_evt_param
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
-
bool
-
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
-
uint16_t
-
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
: 12¶ Publish AppKey Index.
-
uint16_t
cred
: 1¶ Friendship Credentials Flag.
-
uint16_t
send_rel
: 1¶ 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
: 4¶ Divisor for the Period.
-
uint8_t
fast_period
: 1¶ Use FastPeriodDivisor
-
uint8_t
count
: 3¶ 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
-
esp_ble_mesh_model_t *
-
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.
-
const uint32_t
-
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.
-
esp_ble_mesh_cb_t
-
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
-
const uint16_t
-
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
: 7¶ Received TTL value. Not used for sending.
-
uint8_t
send_rel
: 1¶ 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
-
uint16_t
-
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
-
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
-
esp_ble_mesh_bd_addr_t
-
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
-
esp_ble_mesh_bd_addr_t
-
struct
esp_ble_mesh_prov_data_info_t
¶ Information of the provisioner which is going to be updated.
-
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
-
esp_ble_mesh_bd_addr_t
-
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
-
uint16_t
-
struct
esp_ble_mesh_heartbeat_filter_info_t
¶ Context of Provisioner heartbeat filter information to be set
-
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
-
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
-
esp_ble_mesh_model_t *
-
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
-
esp_ble_mesh_opcode_t
-
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.
-
struct
esp_ble_mesh_server_rsp_ctrl_t
¶ Parameters of the Server Model response control
Public Members
-
uint8_t
get_auto_rsp
: 1¶ BLE Mesh Server Response Option.
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;
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;
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;
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;
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;
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
: 1¶ Response control for Client Set messages
-
uint8_t
status_auto_rsp
: 1¶ Response control for Server Status messages
-
uint8_t
Macros¶
-
ESP_BLE_HOST_STATUS_ENABLED
¶
-
ESP_BLE_HOST_STATUS_CHECK
(status)¶ The maximum length of a BLE Mesh message, including Opcode, Payload and TransMIC
-
ESP_BLE_MESH_SDU_MAX_LEN
¶ 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.
- Note
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).
- Return
BLE Mesh transmit value that can be used e.g. for the default values of the Configuration Model data.
- Parameters
count
: Number of retransmissions (first transmission is excluded).int_ms
: Interval steps in milliseconds. Must be greater than 0 and a multiple of 10.
-
ESP_BLE_MESH_GET_TRANSMIT_COUNT
(transmit)¶ Decode transmit count from a transmit value.
- Return
Transmission count (actual transmissions equal to N + 1).
- Parameters
transmit
: Encoded transmit count & interval value.
-
ESP_BLE_MESH_GET_TRANSMIT_INTERVAL
(transmit)¶ Decode transmit interval from a transmit value.
- Return
Transmission interval in milliseconds.
- Parameters
transmit
: Encoded transmit count & interval value.
-
ESP_BLE_MESH_PUBLISH_TRANSMIT
(count, int_ms)¶ Encode Publish Retransmit count & interval steps.
- Return
BLE Mesh transmit value that can be used e.g. for the default values of the Configuration Model data.
- Parameters
count
: Number of retransmissions (first transmission is excluded).int_ms
: Interval steps in milliseconds. Must be greater than 0 and a multiple of 50.
-
ESP_BLE_MESH_GET_PUBLISH_TRANSMIT_COUNT
(transmit)¶ Decode Publish Retransmit count from a given value.
- Return
Retransmission count (actual transmissions equal to N + 1).
- Parameters
transmit
: Encoded Publish Retransmit count & interval value.
-
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)
- Return
Transmission interval in milliseconds.
- Parameters
transmit
: Encoded Publish Retransmit count & interval value.
-
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.
- Note
This macro is associated with BLE_MESH_ELEM in mesh_access.h
- Parameters
_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.
- Parameters
_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.
- Parameters
_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_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:
-
ESP_BLE_MESH_TYPE_PROV_CB
¶
-
ESP_BLE_MESH_TYPE_OUTPUT_NUM_CB
¶
-
ESP_BLE_MESH_TYPE_OUTPUT_STR_CB
¶
-
ESP_BLE_MESH_TYPE_INTPUT_CB
¶
-
ESP_BLE_MESH_TYPE_LINK_OPEN_CB
¶
-
ESP_BLE_MESH_TYPE_LINK_CLOSE_CB
¶
-
ESP_BLE_MESH_TYPE_COMPLETE_CB
¶
-
ESP_BLE_MESH_TYPE_RESET_CB
¶
-
-
enum
esp_ble_mesh_oob_method_t
¶ Values:
-
ESP_BLE_MESH_NO_OOB
¶
-
ESP_BLE_MESH_STATIC_OOB
¶
-
ESP_BLE_MESH_OUTPUT_OOB
¶
-
ESP_BLE_MESH_INPUT_OOB
¶
-
-
enum
esp_ble_mesh_output_action_t
¶ Values:
-
ESP_BLE_MESH_NO_OUTPUT
= 0¶
-
ESP_BLE_MESH_BLINK
= BIT(0)¶
-
ESP_BLE_MESH_BEEP
= BIT(1)¶
-
ESP_BLE_MESH_VIBRATE
= BIT(2)¶
-
ESP_BLE_MESH_DISPLAY_NUMBER
= BIT(3)¶
-
ESP_BLE_MESH_DISPLAY_STRING
= BIT(4)¶
-
-
enum
esp_ble_mesh_input_action_t
¶ Values:
-
ESP_BLE_MESH_NO_INPUT
= 0¶
-
ESP_BLE_MESH_PUSH
= BIT(0)¶
-
ESP_BLE_MESH_TWIST
= BIT(1)¶
-
ESP_BLE_MESH_ENTER_NUMBER
= BIT(2)¶
-
ESP_BLE_MESH_ENTER_STRING
= BIT(3)¶
-
-
enum
esp_ble_mesh_prov_bearer_t
¶ Values:
-
ESP_BLE_MESH_PROV_ADV
= BIT(0)¶
-
ESP_BLE_MESH_PROV_GATT
= BIT(1)¶
-
-
enum
esp_ble_mesh_prov_oob_info_t
¶ Values:
-
ESP_BLE_MESH_PROV_OOB_OTHER
= BIT(0)¶
-
ESP_BLE_MESH_PROV_OOB_URI
= BIT(1)¶
-
ESP_BLE_MESH_PROV_OOB_2D_CODE
= BIT(2)¶
-
ESP_BLE_MESH_PROV_OOB_BAR_CODE
= BIT(3)¶
-
ESP_BLE_MESH_PROV_OOB_NFC
= BIT(4)¶
-
ESP_BLE_MESH_PROV_OOB_NUMBER
= BIT(5)¶
-
ESP_BLE_MESH_PROV_OOB_STRING
= BIT(6)¶
-
ESP_BLE_MESH_PROV_OOB_ON_BOX
= BIT(11)¶
-
ESP_BLE_MESH_PROV_OOB_IN_BOX
= BIT(12)¶
-
ESP_BLE_MESH_PROV_OOB_ON_PAPER
= BIT(13)¶
-
ESP_BLE_MESH_PROV_OOB_IN_MANUAL
= BIT(14)¶
-
ESP_BLE_MESH_PROV_OOB_ON_DEV
= BIT(15)¶
-
-
enum
esp_ble_mesh_fast_prov_action_t
¶ Values:
-
FAST_PROV_ACT_NONE
¶
-
FAST_PROV_ACT_ENTER
¶
-
FAST_PROV_ACT_SUSPEND
¶
-
FAST_PROV_ACT_EXIT
¶
-
FAST_PROV_ACT_MAX
¶
-
-
enum
esp_ble_mesh_prov_cb_event_t
¶ Values:
-
ESP_BLE_MESH_PROV_REGISTER_COMP_EVT
¶ Initialize BLE Mesh provisioning capabilities and internal data information completion event
-
ESP_BLE_MESH_NODE_SET_UNPROV_DEV_NAME_COMP_EVT
¶ Set the unprovisioned device name completion event
-
ESP_BLE_MESH_NODE_PROV_ENABLE_COMP_EVT
¶ Enable node provisioning functionality completion event
-
ESP_BLE_MESH_NODE_PROV_DISABLE_COMP_EVT
¶ Disable node provisioning functionality completion event
-
ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT
¶ Establish a BLE Mesh link event
-
ESP_BLE_MESH_NODE_PROV_LINK_CLOSE_EVT
¶ Close a BLE Mesh link event
-
ESP_BLE_MESH_NODE_PROV_OOB_PUB_KEY_EVT
¶ Generate Node input OOB public key event
-
ESP_BLE_MESH_NODE_PROV_OUTPUT_NUMBER_EVT
¶ Generate Node Output Number event
-
ESP_BLE_MESH_NODE_PROV_OUTPUT_STRING_EVT
¶ Generate Node Output String event
-
ESP_BLE_MESH_NODE_PROV_INPUT_EVT
¶ Event requiring the user to input a number or string
-
ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT
¶ Provisioning done event
-
ESP_BLE_MESH_NODE_PROV_RESET_EVT
¶ Provisioning reset event
-
ESP_BLE_MESH_NODE_PROV_SET_OOB_PUB_KEY_COMP_EVT
¶ Node set oob public key completion event
-
ESP_BLE_MESH_NODE_PROV_INPUT_NUMBER_COMP_EVT
¶ Node input number completion event
-
ESP_BLE_MESH_NODE_PROV_INPUT_STRING_COMP_EVT
¶ Node input string completion event
-
ESP_BLE_MESH_NODE_PROXY_IDENTITY_ENABLE_COMP_EVT
¶ Enable BLE Mesh Proxy Identity advertising completion event
-
ESP_BLE_MESH_NODE_PROXY_GATT_ENABLE_COMP_EVT
¶ Enable BLE Mesh GATT Proxy Service completion event
-
ESP_BLE_MESH_NODE_PROXY_GATT_DISABLE_COMP_EVT
¶ Disable BLE Mesh GATT Proxy Service completion event
-
ESP_BLE_MESH_NODE_ADD_LOCAL_NET_KEY_COMP_EVT
¶ Node add NetKey locally completion event
-
ESP_BLE_MESH_NODE_ADD_LOCAL_APP_KEY_COMP_EVT
¶ Node add AppKey locally completion event
-
ESP_BLE_MESH_NODE_BIND_APP_KEY_TO_MODEL_COMP_EVT
¶ Node bind AppKey to model locally completion event
-
ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT
¶ Provisioner enable provisioning functionality completion event
-
ESP_BLE_MESH_PROVISIONER_PROV_DISABLE_COMP_EVT
¶ Provisioner disable provisioning functionality completion event
-
ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT
¶ Provisioner receives unprovisioned device beacon event
-
ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_EVT
¶ Provisioner read unprovisioned device OOB public key event
-
ESP_BLE_MESH_PROVISIONER_PROV_INPUT_EVT
¶ Provisioner input value for provisioning procedure event
-
ESP_BLE_MESH_PROVISIONER_PROV_OUTPUT_EVT
¶ Provisioner output value for provisioning procedure event
-
ESP_BLE_MESH_PROVISIONER_PROV_LINK_OPEN_EVT
¶ Provisioner establish a BLE Mesh link event
-
ESP_BLE_MESH_PROVISIONER_PROV_LINK_CLOSE_EVT
¶ Provisioner close a BLE Mesh link event
-
ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT
¶ Provisioner provisioning done event
-
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
-
ESP_BLE_MESH_PROVISIONER_PROV_DEV_WITH_ADDR_COMP_EVT
¶ Provisioner start to provision an unprovisioned device completion event
-
ESP_BLE_MESH_PROVISIONER_DELETE_DEV_COMP_EVT
¶ Provisioner delete a device from the list, close provisioning link with the device completion event
-
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
-
ESP_BLE_MESH_PROVISIONER_SET_PROV_DATA_INFO_COMP_EVT
¶ Provisioner set net_idx/flags/iv_index used for provisioning completion event
-
ESP_BLE_MESH_PROVISIONER_SET_STATIC_OOB_VALUE_COMP_EVT
¶ Provisioner set static oob value used for provisioning completion event
-
ESP_BLE_MESH_PROVISIONER_SET_PRIMARY_ELEM_ADDR_COMP_EVT
¶ Provisioner set unicast address of primary element completion event
-
ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_COMP_EVT
¶ Provisioner read unprovisioned device OOB public key completion event
-
ESP_BLE_MESH_PROVISIONER_PROV_INPUT_NUMBER_COMP_EVT
¶ Provisioner input number completion event
-
ESP_BLE_MESH_PROVISIONER_PROV_INPUT_STRING_COMP_EVT
¶ Provisioner input string completion event
-
ESP_BLE_MESH_PROVISIONER_SET_NODE_NAME_COMP_EVT
¶ Provisioner set node name completion event
-
ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT
¶ Provisioner add local app key completion event
-
ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_APP_KEY_COMP_EVT
¶ Provisioner update local app key completion event
-
ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT
¶ Provisioner bind local model with local app key completion event
-
ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_NET_KEY_COMP_EVT
¶ Provisioner add local network key completion event
-
ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_NET_KEY_COMP_EVT
¶ Provisioner update local network key completion event
-
ESP_BLE_MESH_PROVISIONER_STORE_NODE_COMP_DATA_COMP_EVT
¶ Provisioner store node composition data completion event
-
ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_UUID_COMP_EVT
¶ Provisioner delete node with uuid completion event
-
ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_ADDR_COMP_EVT
¶ Provisioner delete node with unicast address completion event
-
ESP_BLE_MESH_PROVISIONER_ENABLE_HEARTBEAT_RECV_COMP_EVT
¶ Provisioner start to receive heartbeat message completion event
-
ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_TYPE_COMP_EVT
¶ Provisioner set the heartbeat filter type completion event
-
ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_INFO_COMP_EVT
¶ Provisioner set the heartbeat filter information completion event
-
ESP_BLE_MESH_PROVISIONER_RECV_HEARTBEAT_MESSAGE_EVT
¶ Provisioner receive heartbeat message event
-
ESP_BLE_MESH_PROVISIONER_DRIECT_ERASE_SETTINGS_COMP_EVT
¶ Provisioner directly erase settings completion event
-
ESP_BLE_MESH_PROVISIONER_OPEN_SETTINGS_WITH_INDEX_COMP_EVT
¶ Provisioner open settings with index completion event
-
ESP_BLE_MESH_PROVISIONER_OPEN_SETTINGS_WITH_UID_COMP_EVT
¶ Provisioner open settings with user id completion event
-
ESP_BLE_MESH_PROVISIONER_CLOSE_SETTINGS_WITH_INDEX_COMP_EVT
¶ Provisioner close settings with index completion event
-
ESP_BLE_MESH_PROVISIONER_CLOSE_SETTINGS_WITH_UID_COMP_EVT
¶ Provisioner close settings with user id completion event
-
ESP_BLE_MESH_PROVISIONER_DELETE_SETTINGS_WITH_INDEX_COMP_EVT
¶ Provisioner delete settings with index completion event
-
ESP_BLE_MESH_PROVISIONER_DELETE_SETTINGS_WITH_UID_COMP_EVT
¶ Provisioner delete settings with user id completion event
-
ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT
¶ Set fast provisioning information (e.g. unicast address range, net_idx, etc.) completion event
-
ESP_BLE_MESH_SET_FAST_PROV_ACTION_COMP_EVT
¶ Set fast provisioning action completion event
-
ESP_BLE_MESH_HEARTBEAT_MESSAGE_RECV_EVT
¶ Receive Heartbeat message event
-
ESP_BLE_MESH_LPN_ENABLE_COMP_EVT
¶ Enable Low Power Node completion event
-
ESP_BLE_MESH_LPN_DISABLE_COMP_EVT
¶ Disable Low Power Node completion event
-
ESP_BLE_MESH_LPN_POLL_COMP_EVT
¶ Low Power Node send Friend Poll completion event
-
ESP_BLE_MESH_LPN_FRIENDSHIP_ESTABLISH_EVT
¶ Low Power Node establishes friendship event
-
ESP_BLE_MESH_LPN_FRIENDSHIP_TERMINATE_EVT
¶ Low Power Node terminates friendship event
-
ESP_BLE_MESH_FRIEND_FRIENDSHIP_ESTABLISH_EVT
¶ Friend Node establishes friendship event
-
ESP_BLE_MESH_FRIEND_FRIENDSHIP_TERMINATE_EVT
¶ Friend Node terminates friendship event
-
ESP_BLE_MESH_PROXY_CLIENT_RECV_ADV_PKT_EVT
¶ Proxy Client receives Network ID advertising packet event
-
ESP_BLE_MESH_PROXY_CLIENT_CONNECTED_EVT
¶ Proxy Client establishes connection successfully event
-
ESP_BLE_MESH_PROXY_CLIENT_DISCONNECTED_EVT
¶ Proxy Client terminates connection successfully event
-
ESP_BLE_MESH_PROXY_CLIENT_RECV_FILTER_STATUS_EVT
¶ Proxy Client receives Proxy Filter Status event
-
ESP_BLE_MESH_PROXY_CLIENT_CONNECT_COMP_EVT
¶ Proxy Client connect completion event
-
ESP_BLE_MESH_PROXY_CLIENT_DISCONNECT_COMP_EVT
¶ Proxy Client disconnect completion event
-
ESP_BLE_MESH_PROXY_CLIENT_SET_FILTER_TYPE_COMP_EVT
¶ Proxy Client set filter type completion event
-
ESP_BLE_MESH_PROXY_CLIENT_ADD_FILTER_ADDR_COMP_EVT
¶ Proxy Client add filter address completion event
-
ESP_BLE_MESH_PROXY_CLIENT_REMOVE_FILTER_ADDR_COMP_EVT
¶ Proxy Client remove filter address completion event
-
ESP_BLE_MESH_MODEL_SUBSCRIBE_GROUP_ADDR_COMP_EVT
¶ Local model subscribes group address completion event
-
ESP_BLE_MESH_MODEL_UNSUBSCRIBE_GROUP_ADDR_COMP_EVT
¶ Local model unsubscribes group address completion event
-
ESP_BLE_MESH_DEINIT_MESH_COMP_EVT
¶ De-initialize BLE Mesh stack completion event
-
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:
-
ESP_BLE_MESH_SERVER_TRANS_TIMER_START
¶
-
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:
-
ESP_BLE_MESH_GENERIC_ONOFF_STATE
¶
-
ESP_BLE_MESH_GENERIC_LEVEL_STATE
¶
-
ESP_BLE_MESH_GENERIC_ONPOWERUP_STATE
¶
-
ESP_BLE_MESH_GENERIC_POWER_ACTUAL_STATE
¶
-
ESP_BLE_MESH_LIGHT_LIGHTNESS_ACTUAL_STATE
¶
-
ESP_BLE_MESH_LIGHT_LIGHTNESS_LINEAR_STATE
¶
-
ESP_BLE_MESH_LIGHT_CTL_LIGHTNESS_STATE
¶
-
ESP_BLE_MESH_LIGHT_CTL_TEMP_DELTA_UV_STATE
¶
-
ESP_BLE_MESH_LIGHT_HSL_STATE
¶
-
ESP_BLE_MESH_LIGHT_HSL_LIGHTNESS_STATE
¶
-
ESP_BLE_MESH_LIGHT_HSL_HUE_STATE
¶
-
ESP_BLE_MESH_LIGHT_HSL_SATURATION_STATE
¶
-
ESP_BLE_MESH_LIGHT_XYL_LIGHTNESS_STATE
¶
-
ESP_BLE_MESH_LIGHT_LC_LIGHT_ONOFF_STATE
¶
-
ESP_BLE_MESH_SERVER_MODEL_STATE_MAX
¶
-
-
enum
esp_ble_mesh_model_cb_event_t
¶ Values:
-
ESP_BLE_MESH_MODEL_OPERATION_EVT
¶ User-defined models receive messages from peer devices (e.g. get, set, status, etc) event
-
ESP_BLE_MESH_MODEL_SEND_COMP_EVT
¶ User-defined models send messages completion event
-
ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT
¶ User-defined models publish messages completion event
-
ESP_BLE_MESH_CLIENT_MODEL_RECV_PUBLISH_MSG_EVT
¶ User-defined client models receive publish messages event
-
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
-
ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT
¶ When a model is configured to publish messages periodically, this event will occur during every publish period
-
ESP_BLE_MESH_SERVER_MODEL_UPDATE_STATE_COMP_EVT
¶ Server models update state value completion event
-
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¶
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.
- Note
After calling this API, the device needs to call esp_ble_mesh_prov_enable() to enable provisioning functionality again.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] prov
: Pointer to the device provisioning capabilities. This pointer must remain valid during the lifetime of the BLE Mesh device.[in] comp
: Pointer to the device composition data information. This pointer must remain valid during the lifetime of the BLE Mesh device.
-
esp_err_t
esp_ble_mesh_deinit
(esp_ble_mesh_deinit_param_t *param)¶ De-initialize BLE Mesh module.
- Note
This function shall be invoked after esp_ble_mesh_client_model_deinit().
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] param
: Pointer to the structure of BLE Mesh deinit parameters.
Reading of Local Data Information¶
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.
- Return
Publish period value on success, 0 or (negative) error code from errno.h on failure.
- Parameters
[in] model
: Model instance pointer.
-
uint16_t
esp_ble_mesh_get_primary_element_address
(void)¶ Get the address of the primary element.
- Return
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.
- Return
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.
- Parameters
[in] model
: Pointer to the model.[in] group_addr
: Group address.
-
esp_ble_mesh_elem_t *
esp_ble_mesh_find_element
(uint16_t element_addr)¶ Find the BLE Mesh element pointer via the element address.
- Return
Pointer to the element on success, or NULL on failure.
- Parameters
[in] element_addr
: Element address.
-
uint8_t
esp_ble_mesh_get_element_count
(void)¶ Get the number of elements that have been registered.
- Return
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.
- Return
Pointer to the Vendor Model on success, or NULL on failure which means the Vendor Model is not found.
- Parameters
[in] element
: Element to which the model belongs.[in] company_id
: A 16-bit company identifier assigned by the Bluetooth SIG.[in] model_id
: A 16-bit vendor-assigned model identifier.
-
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.
- Return
Pointer to the SIG Model on success, or NULL on failure which means the SIG Model is not found.
- Parameters
[in] element
: Element to which the model belongs.[in] model_id
: SIG model identifier.
-
const esp_ble_mesh_comp_t *
esp_ble_mesh_get_composition_data
(void)¶ Get the Composition data which has been registered.
- Return
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.
- Note
This function shall not be invoked before node is provisioned or Provisioner is enabled.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] element_addr
: Unicast address of the element to which the model belongs.[in] company_id
: A 16-bit company identifier.[in] model_id
: A 16-bit model identifier.[in] group_addr
: The group address to be subscribed.
-
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.
- Note
This function shall not be invoked before node is provisioned or Provisioner is enabled.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] element_addr
: Unicast address of the element to which the model belongs.[in] company_id
: A 16-bit company identifier.[in] model_id
: A 16-bit model identifier.[in] group_addr
: The subscribed group address.
-
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.
- Return
NetKey on success, or NULL on failure.
- Parameters
[in] net_idx
: NetKey index.
-
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.
- Return
AppKey on success, or NULL on failure.
- Parameters
[in] app_idx
: AppKey index.
-
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.
- Note
This function can only be called after the device is provisioned.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] net_key
: NetKey to be added.[in] net_idx
: NetKey Index.
-
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.
- Note
The net_idx must be an existing one. This function can only be called after the device is provisioned.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] app_key
: AppKey to be added.[in] net_idx
: NetKey Index.[in] app_idx
: AppKey Index.
-
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.
- Note
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.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] element_addr
: Node local element address[in] company_id
: Node local company id[in] model_id
: Node local model id[in] app_idx
: Node local appkey index
Low Power Operation (Updating)¶
Functions¶
-
esp_err_t
esp_ble_mesh_lpn_enable
(void)¶ Enable BLE Mesh device LPN functionality.
- Note
This API enables LPN functionality. Once called, the proper Friend Request will be sent.
- Return
ESP_OK on success or error code otherwise.
-
esp_err_t
esp_ble_mesh_lpn_disable
(bool force)¶ Disable BLE Mesh device LPN functionality.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] force
: 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_err_t
esp_ble_mesh_lpn_poll
(void)¶ LPN tries to poll messages from the Friend Node.
- Note
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.
- Return
ESP_OK on success or error code otherwise.
Send/Publish Messages, add Local AppKey, etc.¶
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.
- Note
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.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] callback
: Pointer to the callback function.
-
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.
- Note
This API is only used to set the opcode of the message.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] data
: Pointer to the message data.[in] opcode
: The message opcode.
-
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.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] model
: BLE Mesh Client model to which the message belongs.
-
esp_err_t
esp_ble_mesh_client_model_deinit
(esp_ble_mesh_model_t *model)¶ De-initialize the user-defined client model.
- Note
This function shall be invoked before esp_ble_mesh_deinit() is called.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] model
: Pointer of the Client model.
-
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).
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] model
: BLE Mesh Server Model to which the message belongs.[in] ctx
: Message context, includes keys, TTL, etc.[in] opcode
: Message opcode.[in] length
: Message length (exclude the message opcode).[in] data
: Parameters of Access Payload (exclude the message opcode) to be sent.
-
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).
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] model
: BLE Mesh Client Model to which the message belongs.[in] ctx
: Message context, includes keys, TTL, etc.[in] opcode
: Message opcode.[in] length
: Message length (exclude the message opcode).[in] data
: Parameters of the Access Payload (exclude the message opcode) to be sent.[in] msg_timeout
: Time to get response to the message (in milliseconds).[in] need_rsp
: TRUE if the opcode requires the peer device to reply, FALSE otherwise.[in] device_role
: Role of the device (Node/Provisioner) that sends the message.
-
esp_err_t
esp_ble_mesh_model_publish
(esp_ble_mesh_model_t *model, uint32_t opcode, uint16_t length, uint8_t *data, esp_ble_mesh_dev_role_t device_role)¶ Send a model publication message.
- Note
Before calling this function, the user needs to ensure that the model publication message (esp_ble_mesh_model_pub_t::msg) contains a valid message to be sent. And if users want to update the publishing message, this API should be called in ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT with the message updated.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] model
: Mesh (client) Model publishing the message.[in] opcode
: Message opcode.[in] length
: Message length (exclude the message opcode).[in] data
: Parameters of the Access Payload (exclude the message opcode) to be sent.[in] device_role
: Role of the device (node/provisioner) publishing the message of the type esp_ble_mesh_dev_role_t.
-
esp_err_t
esp_ble_mesh_server_model_update_state
(esp_ble_mesh_model_t *model, esp_ble_mesh_server_state_type_t type, esp_ble_mesh_server_state_value_t *value)¶ Update a server model state value. If the model publication state is set properly (e.g. publish address is set to a valid address), it will publish corresponding status message.
- Note
Currently this API is used to update bound state value, not for all server model states.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] model
: Server model which is going to update the state.[in] type
: Server model state type.[in] value
: Server model state value.
-
esp_err_t
esp_ble_mesh_node_local_reset
(void)¶ Reset the provisioning procedure of the local BLE Mesh node.
- Note
All provisioning information in this node will be deleted and the node needs to be reprovisioned. The API function esp_ble_mesh_node_prov_enable() needs to be called to start a new provisioning procedure.
- Return
ESP_OK on success or error code otherwise.
-
esp_err_t
esp_ble_mesh_provisioner_set_node_name
(uint16_t index, const char *name)¶ This function is called to set the node (provisioned device) name.
- Note
index is obtained from the parameters of ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] index
: Index of the node in the node queue.[in] name
: Name (end by ‘\0’) to be set for the node.
-
const char *
esp_ble_mesh_provisioner_get_node_name
(uint16_t index)¶ This function is called to get the node (provisioned device) name.
- Note
index is obtained from the parameters of ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT.
- Return
Node name on success, or NULL on failure.
- Parameters
[in] index
: Index of the node in the node queue.
-
uint16_t
esp_ble_mesh_provisioner_get_node_index
(const char *name)¶ This function is called to get the node (provisioned device) index.
- Return
Node index on success, or an invalid value (0xFFFF) on failure.
- Parameters
[in] name
: Name of the node (end by ‘\0’).
-
esp_err_t
esp_ble_mesh_provisioner_store_node_comp_data
(uint16_t unicast_addr, uint8_t *data, uint16_t length)¶ This function is called to store the Composition Data of the node.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] unicast_addr
: Element address of the node[in] data
: Pointer of Composition Data[in] length
: Length of Composition Data
-
esp_ble_mesh_node_t *
esp_ble_mesh_provisioner_get_node_with_uuid
(const uint8_t uuid[16])¶ This function is called to get the provisioned node information with the node device uuid.
- Return
Pointer of the node info struct or NULL on failure.
- Parameters
[in] uuid
: Device UUID of the node
-
esp_ble_mesh_node_t *
esp_ble_mesh_provisioner_get_node_with_addr
(uint16_t unicast_addr)¶ This function is called to get the provisioned node information with the node unicast address.
- Return
Pointer of the node info struct or NULL on failure.
- Parameters
[in] unicast_addr
: Unicast address of the node
-
esp_ble_mesh_node_t *
esp_ble_mesh_provisioner_get_node_with_name
(const char *name)¶ This function is called to get the provisioned node information with the node name.
- Return
Pointer of the node info struct or NULL on failure.
- Parameters
[in] name
: Name of the node (end by ‘\0’).
-
uint16_t
esp_ble_mesh_provisioner_get_prov_node_count
(void)¶ This function is called by Provisioner to get provisioned node count.
- Return
Number of the provisioned nodes.
-
const esp_ble_mesh_node_t **
esp_ble_mesh_provisioner_get_node_table_entry
(void)¶ This function is called by Provisioner to get the entry of the node table.
- Note
After invoking the function to get the entry of nodes, users can use the “for” loop combined with the macro CONFIG_BLE_MESH_MAX_PROV_NODES to get each node’s information. Before trying to read the node’s information, users need to check if the node exists, i.e. if the *(esp_ble_mesh_node_t **node) is NULL. For example: ``` const esp_ble_mesh_node_t **entry = esp_ble_mesh_provisioner_get_node_table_entry(); for (int i = 0; i < CONFIG_BLE_MESH_MAX_PROV_NODES; i++) { const esp_ble_mesh_node_t *node = entry[i]; if (node) { …… } } ```
- Return
Pointer to the start of the node table.
-
esp_err_t
esp_ble_mesh_provisioner_delete_node_with_uuid
(const uint8_t uuid[16])¶ This function is called to delete the provisioned node information with the node device uuid.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] uuid
: Device UUID of the node
-
esp_err_t
esp_ble_mesh_provisioner_delete_node_with_addr
(uint16_t unicast_addr)¶ This function is called to delete the provisioned node information with the node unicast address.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] unicast_addr
: Unicast address of the node
-
esp_err_t
esp_ble_mesh_provisioner_add_local_app_key
(const uint8_t app_key[16], uint16_t net_idx, uint16_t app_idx)¶ This function is called to add a local AppKey for Provisioner.
- Note
app_key: If set to NULL, app_key will be generated internally. net_idx: Should be an existing one. app_idx: If it is going to be generated internally, it should be set to 0xFFFF, and the new app_idx will be reported via an event.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] app_key
: The app key to be set for the local BLE Mesh stack.[in] net_idx
: The network key index.[in] app_idx
: The app key index.
-
esp_err_t
esp_ble_mesh_provisioner_update_local_app_key
(const uint8_t app_key[16], uint16_t net_idx, uint16_t app_idx)¶ This function is used to update a local AppKey for Provisioner.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] app_key
: Value of the AppKey.[in] net_idx
: Corresponding NetKey Index.[in] app_idx
: The AppKey Index
-
const uint8_t *
esp_ble_mesh_provisioner_get_local_app_key
(uint16_t net_idx, uint16_t app_idx)¶ This function is called by Provisioner to get the local app key value.
- Return
App key on success, or NULL on failure.
- Parameters
[in] net_idx
: Network key index.[in] app_idx
: Application key index.
-
esp_err_t
esp_ble_mesh_provisioner_bind_app_key_to_local_model
(uint16_t element_addr, uint16_t app_idx, uint16_t model_id, uint16_t company_id)¶ This function is called by Provisioner to bind own model with proper app key.
- Note
company_id: If going to bind app_key with local vendor model, company_id should be set to 0xFFFF.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] element_addr
: Provisioner local element address[in] app_idx
: Provisioner local appkey index[in] model_id
: Provisioner local model id[in] company_id
: Provisioner local company id
-
esp_err_t
esp_ble_mesh_provisioner_add_local_net_key
(const uint8_t net_key[16], uint16_t net_idx)¶ This function is called by Provisioner to add local network key.
- Note
net_key: If set to NULL, net_key will be generated internally. net_idx: If it is going to be generated internally, it should be set to 0xFFFF, and the new net_idx will be reported via an event.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] net_key
: The network key to be added to the Provisioner local BLE Mesh stack.[in] net_idx
: The network key index.
-
esp_err_t
esp_ble_mesh_provisioner_update_local_net_key
(const uint8_t net_key[16], uint16_t net_idx)¶ This function is called by Provisioner to update a local network key.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] net_key
: Value of the NetKey.[in] net_idx
: The NetKey Index.
-
const uint8_t *
esp_ble_mesh_provisioner_get_local_net_key
(uint16_t net_idx)¶ This function is called by Provisioner to get the local network key value.
- Return
Network key on success, or NULL on failure.
- Parameters
[in] net_idx
: Network key index.
-
esp_err_t
esp_ble_mesh_provisioner_recv_heartbeat
(bool enable)¶ This function is called by Provisioner to enable or disable receiving heartbeat messages.
- Note
If enabling receiving heartbeat message successfully, the filter will be an empty rejectlist by default, which means all heartbeat messages received by the Provisioner will be reported to the application layer.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] enable
: Enable or disable receiving heartbeat messages.
-
esp_err_t
esp_ble_mesh_provisioner_set_heartbeat_filter_type
(uint8_t type)¶ This function is called by Provisioner to set the heartbeat filter type.
- Note
1. If the filter type is not the same with the current value, then all the filter entries will be cleaned.
If the previous type is rejectlist, and changed to acceptlist, then the filter will be an empty acceptlist, which means no heartbeat messages will be reported. Users need to add SRC or DST into the filter entry, then heartbeat messages from the SRC or to the DST will be reported.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] type
: Heartbeat filter type (acceptlist or rejectlist).
-
esp_err_t
esp_ble_mesh_provisioner_set_heartbeat_filter_info
(uint8_t op, esp_ble_mesh_heartbeat_filter_info_t *info)¶ This function is called by Provisioner to add or remove a heartbeat filter entry.
If the operation is “REMOVE”, the “hb_src” can be set to the SRC (can only be a unicast address) of heartbeat messages, and the “hb_dst” can be set to the DST (unicast address or group address), at least one of them needs to be set.
The filter entry with the same SRC or DST will be removed.
- Note
1. If the operation is “ADD”, the “hb_src” can be set to the SRC (can only be a unicast address) of heartbeat messages, and the “hb_dst” can be set to the DST (unicast address or group address), at least one of them needs to be set.
If only one of them is set, the filter entry will only use the configured SRC or DST to filter heartbeat messages.
If both of them are set, the SRC and DST will both be used to decide if a heartbeat message will be handled.
If SRC or DST already exists in some filter entry, then the corresponding entry will be cleaned firstly, then a new entry will be allocated to store the information.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] op
: Add or REMOVE[in] info
: Heartbeat filter entry information, including: hb_src - Heartbeat source address; hb_dst - Heartbeat destination address;
-
esp_err_t
esp_ble_mesh_provisioner_direct_erase_settings
(void)¶ This function is called by Provisioner to directly erase the mesh information from nvs namespace.
- Note
This function can be invoked when the mesh stack is not initialized or has been de-initialized.
- Return
ESP_OK on success or error code otherwise.
-
esp_err_t
esp_ble_mesh_provisioner_open_settings_with_index
(uint8_t index)¶ This function is called by Provisioner to open a nvs namespace for storing mesh information.
- Note
Before open another nvs namespace, the previously opened nvs namespace must be closed firstly.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] index
: Settings index.
-
esp_err_t
esp_ble_mesh_provisioner_open_settings_with_uid
(const char *uid)¶ This function is called by Provisioner to open a nvs namespace for storing mesh information.
- Note
Before open another nvs namespace, the previously opened nvs namespace must be closed firstly.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] uid
: Settings user id.
-
esp_err_t
esp_ble_mesh_provisioner_close_settings_with_index
(uint8_t index, bool erase)¶ This function is called by Provisioner to close a nvs namespace which is opened previously for storing mesh information.
- Note
1. Before closing the nvs namespace, it must be open.
When the function is invoked, the Provisioner functionality will be disabled firstly, and: a) If the “erase” flag is set to false, the mesh information will be cleaned (e.g. removing NetKey, AppKey, nodes, etc) from the mesh stack. b) If the “erase” flag is set to true, the mesh information stored in the nvs namespace will also be erased besides been cleaned from the mesh stack.
If Provisioner tries to work properly again, we can invoke the open function to open a new nvs namespace or a previously added one, and restore the mesh information from it if not erased.
The working process shall be as following: a) Open settings A b) Start to provision and control nodes c) Close settings A d) Open settings B e) Start to provision and control other nodes f) Close settings B g) ……
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] index
: Settings index.[in] erase
: Indicate if erasing mesh information.
-
esp_err_t
esp_ble_mesh_provisioner_close_settings_with_uid
(const char *uid, bool erase)¶ This function is called by Provisioner to close a nvs namespace which is opened previously for storing mesh information.
- Note
1. Before closing the nvs namespace, it must be open.
When the function is invoked, the Provisioner functionality will be disabled firstly, and: a) If the “erase” flag is set to false, the mesh information will be cleaned (e.g. removing NetKey, AppKey, nodes, etc) from the mesh stack. b) If the “erase” flag is set to true, the mesh information stored in the nvs namespace will also be erased besides been cleaned from the mesh stack.
If Provisioner tries to work properly again, we can invoke the open function to open a new nvs namespace or a previously added one, and restore the mesh information from it if not erased.
The working process shall be as following: a) Open settings A b) Start to provision and control nodes c) Close settings A d) Open settings B e) Start to provision and control other nodes f) Close settings B g) ……
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] uid
: Settings user id.[in] erase
: Indicate if erasing mesh information.
-
esp_err_t
esp_ble_mesh_provisioner_delete_settings_with_index
(uint8_t index)¶ This function is called by Provisioner to erase the mesh information and settings user id from a nvs namespace.
- Note
When this function is called, the nvs namespace must not be open. This function is used to erase the mesh information and settings user id which are not used currently.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] index
: Settings index.
-
esp_err_t
esp_ble_mesh_provisioner_delete_settings_with_uid
(const char *uid)¶ This function is called by Provisioner to erase the mesh information and settings user id from a nvs namespace.
- Note
When this function is called, the nvs namespace must not be open. This function is used to erase the mesh information and settings user id which are not used currently.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] uid
: Settings user id.
-
const char *
esp_ble_mesh_provisioner_get_settings_uid
(uint8_t index)¶ This function is called by Provisioner to get settings user id.
- Return
Setting user id on success or NULL on failure.
- Parameters
[in] index
: Settings index.
-
uint8_t
esp_ble_mesh_provisioner_get_settings_index
(const char *uid)¶ This function is called by Provisioner to get settings index.
- Return
Settings index.
- Parameters
[in] uid
: Settings user id.
-
uint8_t
esp_ble_mesh_provisioner_get_free_settings_count
(void)¶ This function is called by Provisioner to get the number of free settings user id.
- Return
Number of free settings user id.
-
const uint8_t *
esp_ble_mesh_get_fast_prov_app_key
(uint16_t net_idx, uint16_t app_idx)¶ This function is called to get fast provisioning application key.
- Return
Application key on success, or NULL on failure.
- Parameters
[in] net_idx
: Network key index.[in] app_idx
: Application key index.
Type Definitions¶
-
typedef void (*
esp_ble_mesh_model_cb_t
)(esp_ble_mesh_model_cb_event_t event, esp_ble_mesh_model_cb_param_t *param)¶ : event, event code of user-defined model events; param, parameters of user-defined model events
ESP-BLE-MESH Node/Provisioner Provisioning¶
Functions¶
-
esp_err_t
esp_ble_mesh_register_prov_callback
(esp_ble_mesh_prov_cb_t callback)¶ Register BLE Mesh provisioning callback.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] callback
: Pointer to the callback function.
-
bool
esp_ble_mesh_node_is_provisioned
(void)¶ Check if a device has been provisioned.
- Return
TRUE if the device is provisioned, FALSE if the device is unprovisioned.
-
esp_err_t
esp_ble_mesh_node_prov_enable
(esp_ble_mesh_prov_bearer_t bearers)¶ Enable specific provisioning bearers to get the device ready for provisioning.
- Note
PB-ADV: send unprovisioned device beacon. PB-GATT: send connectable advertising packets.
- Return
ESP_OK on success or error code otherwise.
- Parameters
bearers
: Bit-wise OR of provisioning bearers.
-
esp_err_t
esp_ble_mesh_node_prov_disable
(esp_ble_mesh_prov_bearer_t bearers)¶ Disable specific provisioning bearers to make a device inaccessible for provisioning.
- Return
ESP_OK on success or error code otherwise.
- Parameters
bearers
: Bit-wise OR of provisioning bearers.
-
esp_err_t
esp_ble_mesh_node_set_oob_pub_key
(uint8_t pub_key_x[32], uint8_t pub_key_y[32], uint8_t private_key[32])¶ Unprovisioned device set own oob public key & private key pair.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] pub_key_x
: Unprovisioned device’s Public Key X[in] pub_key_y
: Unprovisioned device’s Public Key Y[in] private_key
: Unprovisioned device’s Private Key
-
esp_err_t
esp_ble_mesh_node_input_number
(uint32_t number)¶ Provide provisioning input OOB number.
- Note
This is intended to be called if the user has received ESP_BLE_MESH_NODE_PROV_INPUT_EVT with ESP_BLE_MESH_ENTER_NUMBER as the action.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] number
: Number input by device.
-
esp_err_t
esp_ble_mesh_node_input_string
(const char *string)¶ Provide provisioning input OOB string.
- Note
This is intended to be called if the user has received ESP_BLE_MESH_NODE_PROV_INPUT_EVT with ESP_BLE_MESH_ENTER_STRING as the action.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] string
: String input by device.
-
esp_err_t
esp_ble_mesh_set_unprovisioned_device_name
(const char *name)¶ Using this function, an unprovisioned device can set its own device name, which will be broadcasted in its advertising data.
- Note
This API applicable to PB-GATT mode only by setting the name to the scan response data, it doesn’t apply to PB-ADV mode.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] name
: Unprovisioned device name
-
esp_err_t
esp_ble_mesh_provisioner_read_oob_pub_key
(uint8_t link_idx, uint8_t pub_key_x[32], uint8_t pub_key_y[32])¶ Provisioner inputs unprovisioned device’s oob public key.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] link_idx
: The provisioning link index[in] pub_key_x
: Unprovisioned device’s Public Key X[in] pub_key_y
: Unprovisioned device’s Public Key Y
-
esp_err_t
esp_ble_mesh_provisioner_input_string
(const char *string, uint8_t link_idx)¶ Provide provisioning input OOB string.
This is intended to be called after the esp_ble_mesh_prov_t prov_input_num callback has been called with ESP_BLE_MESH_ENTER_STRING as the action.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] string
: String input by Provisioner.[in] link_idx
: The provisioning link index.
-
esp_err_t
esp_ble_mesh_provisioner_input_number
(uint32_t number, uint8_t link_idx)¶ Provide provisioning input OOB number.
This is intended to be called after the esp_ble_mesh_prov_t prov_input_num callback has been called with ESP_BLE_MESH_ENTER_NUMBER as the action.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] number
: Number input by Provisioner.[in] link_idx
: The provisioning link index.
-
esp_err_t
esp_ble_mesh_provisioner_prov_enable
(esp_ble_mesh_prov_bearer_t bearers)¶ Enable one or more provisioning bearers.
- Note
PB-ADV: Enable BLE scan. PB-GATT: Initialize corresponding BLE Mesh Proxy info.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] bearers
: Bit-wise OR of provisioning bearers.
-
esp_err_t
esp_ble_mesh_provisioner_prov_disable
(esp_ble_mesh_prov_bearer_t bearers)¶ Disable one or more provisioning bearers.
- Note
PB-ADV: Disable BLE scan. PB-GATT: Break any existing BLE Mesh Provisioning connections.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] bearers
: Bit-wise OR of provisioning bearers.
-
esp_err_t
esp_ble_mesh_provisioner_add_unprov_dev
(esp_ble_mesh_unprov_dev_add_t *add_dev, esp_ble_mesh_dev_add_flag_t flags)¶ Add unprovisioned device info to the unprov_dev queue.
- Return
ESP_OK on success or error code otherwise.
- Note
: 1. Currently address type only supports public address and static random address.
If device UUID and/or device address as well as address type already exist in the device queue, but the bearer is different from the existing one, add operation will also be successful and it will update the provision bearer supported by the device.
For example, if the Provisioner wants to add an unprovisioned device info before receiving its unprovisioned device beacon or Mesh Provisioning advertising packets, the Provisioner can use this API to add the device info with each one or both of device UUID and device address added. When the Provisioner gets the device’s advertising packets, it will start provisioning the device internally.
In this situation, the Provisioner can set bearers with each one or both of ESP_BLE_MESH_PROV_ADV and ESP_BLE_MESH_PROV_GATT enabled, and cannot set flags with ADD_DEV_START_PROV_NOW_FLAG enabled.
Another example is when the Provisioner receives the unprovisioned device’s beacon or Mesh Provisioning advertising packets, the advertising packets will be reported on to the application layer using the callback registered by the function esp_ble_mesh_register_prov_callback. And in the callback, the Provisioner can call this API to start provisioning the device.
If the Provisioner uses PB-ADV to provision, either one or both of device UUID and device address can be added, bearers shall be set with ESP_BLE_MESH_PROV_ADV enabled and the flags shall be set with ADD_DEV_START_PROV_NOW_FLAG enabled.
If the Provisioner uses PB-GATT to provision, both the device UUID and device address need to be added, bearers shall be set with ESP_BLE_MESH_PROV_GATT enabled, and the flags shall be set with ADD_DEV_START_PROV_NOW_FLAG enabled.
If the Provisioner just wants to store the unprovisioned device info when receiving its advertising packets and start to provision it the next time (e.g. after receiving its advertising packets again), then it can add the device info with either one or both of device UUID and device address included. Bearers can be set with either one or both of ESP_BLE_MESH_PROV_ADV and ESP_BLE_MESH_PROV_GATT enabled (recommend to enable the bearer which will receive its advertising packets, because if the other bearer is enabled, the Provisioner is not aware if the device supports the bearer), and flags cannot be set with ADD_DEV_START_PROV_NOW_FLAG enabled.
Note: ESP_BLE_MESH_PROV_ADV, ESP_BLE_MESH_PROV_GATT and ADD_DEV_START_PROV_NOW_FLAG can not be enabled at the same time.
- Parameters
[in] add_dev
: Pointer to a struct containing the device information[in] flags
: Flags indicate several operations on the device informationRemove device information from queue after device has been provisioned (BIT0)
Start provisioning immediately after device is added to queue (BIT1)
Device can be removed if device queue is full (BIT2)
-
esp_err_t
esp_ble_mesh_provisioner_prov_device_with_addr
(const uint8_t uuid[16], esp_ble_mesh_bd_addr_t addr, esp_ble_mesh_addr_type_t addr_type, esp_ble_mesh_prov_bearer_t bearer, uint16_t oob_info, uint16_t unicast_addr)¶ Provision an unprovisioned device and assign a fixed unicast address for it in advance.
- Return
Zero on success or (negative) error code otherwise.
- Note
: 1. Currently address type only supports public address and static random address.
Bearer must be equal to ESP_BLE_MESH_PROV_ADV or ESP_BLE_MESH_PROV_GATT, since Provisioner will start to provision a device immediately once this function is invoked. And the input bearer must be identical with the one within the parameters of the ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT event.
If this function is used by a Provisioner to provision devices, the application should take care of the assigned unicast address and avoid overlap of the unicast addresses of different nodes.
Recommend to use only one of the functions “esp_ble_mesh_provisioner_add_unprov_dev” and “esp_ble_mesh_provisioner_prov_device_with_addr” by a Provisioner.
- Parameters
[in] uuid
: Device UUID of the unprovisioned device[in] addr
: Device address of the unprovisioned device[in] addr_type
: Device address type of the unprovisioned device[in] bearer
: Provisioning bearer going to be used by Provisioner[in] oob_info
: OOB info of the unprovisioned device[in] unicast_addr
: Unicast address going to be allocated for the unprovisioned device
-
esp_err_t
esp_ble_mesh_provisioner_delete_dev
(esp_ble_mesh_device_delete_t *del_dev)¶ Delete device from queue, and reset current provisioning link with the device.
- Note
If the device is in the queue, remove it from the queue; if the device is being provisioned, terminate the provisioning procedure. Either one of the device address or device UUID can be used as input.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] del_dev
: Pointer to a struct containing the device information.
-
esp_err_t
esp_ble_mesh_provisioner_set_dev_uuid_match
(const uint8_t *match_val, uint8_t match_len, uint8_t offset, bool prov_after_match)¶ This function is called by Provisioner to set the part of the device UUID to be compared before starting to provision.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] match_val
: Value to be compared with the part of the device UUID.[in] match_len
: Length of the compared match value.[in] offset
: Offset of the device UUID to be compared (based on zero).[in] prov_after_match
: Flag used to indicate whether provisioner should start to provision the device immediately if the part of the UUID matches.
-
esp_err_t
esp_ble_mesh_provisioner_set_prov_data_info
(esp_ble_mesh_prov_data_info_t *prov_data_info)¶ This function is called by Provisioner to set provisioning data information before starting to provision.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] prov_data_info
: Pointer to a struct containing net_idx or flags or iv_index.
-
esp_err_t
esp_ble_mesh_provisioner_set_static_oob_value
(const uint8_t *value, uint8_t length)¶ This function is called by Provisioner to set static oob value used for provisioning.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] value
: Pointer to the static oob value.[in] length
: Length of the static oob value.
-
esp_err_t
esp_ble_mesh_provisioner_set_primary_elem_addr
(uint16_t addr)¶ This function is called by Provisioner to set own Primary element address.
- Note
This API must be invoked when BLE Mesh initialization is completed successfully, and can be invoked before Provisioner functionality is enabled. Once this API is invoked successfully, the prov_unicast_addr value in the struct esp_ble_mesh_prov_t will be ignored, and Provisioner will use this address as its own primary element address. And if the unicast address going to assigned for the next unprovisioned device is smaller than the input address + element number of Provisioner, then the address for the next unprovisioned device will be recalculated internally.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] addr
: Unicast address of the Primary element of Provisioner.
-
esp_err_t
esp_ble_mesh_set_fast_prov_info
(esp_ble_mesh_fast_prov_info_t *fast_prov_info)¶ This function is called to set provisioning data information before starting fast provisioning.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] fast_prov_info
: Pointer to a struct containing unicast address range, net_idx, etc.
-
esp_err_t
esp_ble_mesh_set_fast_prov_action
(esp_ble_mesh_fast_prov_action_t action)¶ This function is called to start/suspend/exit fast provisioning.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] action
: fast provisioning action (i.e. enter, suspend, exit).
Type Definitions¶
-
typedef void (*
esp_ble_mesh_prov_cb_t
)(esp_ble_mesh_prov_cb_event_t event, esp_ble_mesh_prov_cb_param_t *param)¶ : event, event code of provisioning events; param, parameters of provisioning events
-
typedef void (*
esp_ble_mesh_prov_adv_cb_t
)(const esp_ble_mesh_bd_addr_t addr, const esp_ble_mesh_addr_type_t addr_type, const uint8_t adv_type, const uint8_t *dev_uuid, uint16_t oob_info, esp_ble_mesh_prov_bearer_t bearer)¶ Callback for Provisioner that received advertising packets from unprovisioned devices which are not in the unprovisioned device queue.
Report on the unprovisioned device beacon and mesh provisioning service adv data to application.
- Parameters
[in] addr
: Pointer to the unprovisioned device address.[in] addr_type
: Unprovisioned device address type.[in] adv_type
: Adv packet type(ADV_IND or ADV_NONCONN_IND).[in] dev_uuid
: Unprovisioned device UUID pointer.[in] oob_info
: OOB information of the unprovisioned device.[in] bearer
: Adv packet received from PB-GATT or PB-ADV bearer.
ESP-BLE-MESH GATT Proxy Server¶
Functions¶
-
esp_err_t
esp_ble_mesh_proxy_identity_enable
(void)¶ Enable advertising with Node Identity.
- Note
This API requires that GATT Proxy support be enabled. Once called, each subnet starts advertising using Node Identity for the next 60 seconds, and after 60s Network ID will be advertised. Under normal conditions, the BLE Mesh Proxy Node Identity and Network ID advertising will be enabled automatically by BLE Mesh stack after the device is provisioned.
- Return
ESP_OK on success or error code otherwise.
-
esp_err_t
esp_ble_mesh_proxy_gatt_enable
(void)¶ Enable BLE Mesh GATT Proxy Service.
- Return
ESP_OK on success or error code otherwise.
-
esp_err_t
esp_ble_mesh_proxy_gatt_disable
(void)¶ Disconnect the BLE Mesh GATT Proxy connection if there is any, and disable the BLE Mesh GATT Proxy Service.
- Return
ESP_OK on success or error code otherwise.
-
esp_err_t
esp_ble_mesh_proxy_client_connect
(esp_ble_mesh_bd_addr_t addr, esp_ble_mesh_addr_type_t addr_type, uint16_t net_idx)¶ Proxy Client creates a connection with the Proxy Server.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] addr
: Device address of the Proxy Server.[in] addr_type
: Device address type(public or static random).[in] net_idx
: NetKey Index related with Network ID in the Mesh Proxy advertising packet.
-
esp_err_t
esp_ble_mesh_proxy_client_disconnect
(uint8_t conn_handle)¶ Proxy Client terminates a connection with the Proxy Server.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] conn_handle
: Proxy connection handle.
-
esp_err_t
esp_ble_mesh_proxy_client_set_filter_type
(uint8_t conn_handle, uint16_t net_idx, esp_ble_mesh_proxy_filter_type_t filter_type)¶ Proxy Client sets the filter type of the Proxy Server.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] conn_handle
: Proxy connection handle.[in] net_idx
: Corresponding NetKey Index.[in] filter_type
: whitelist or blacklist.
-
esp_err_t
esp_ble_mesh_proxy_client_add_filter_addr
(uint8_t conn_handle, uint16_t net_idx, uint16_t *addr, uint16_t addr_num)¶ Proxy Client adds address to the Proxy Server filter list.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] conn_handle
: Proxy connection handle.[in] net_idx
: Corresponding NetKey Index.[in] addr
: Pointer to the filter address.[in] addr_num
: Number of the filter address.
-
esp_err_t
esp_ble_mesh_proxy_client_remove_filter_addr
(uint8_t conn_handle, uint16_t net_idx, uint16_t *addr, uint16_t addr_num)¶ Proxy Client removes address from the Proxy Server filter list.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] conn_handle
: Proxy connection handle.[in] net_idx
: Corresponding NetKey Index.[in] addr
: Pointer to the filter address.[in] addr_num
: Number of the filter address.
ESP-BLE-MESH Models API Reference¶
This section contains ESP-BLE-MESH Model related APIs, event types, event parameters, etc.
There are six categories of models:
Note
Definitions related to Server Models are being updated, and will be released soon.
Configuration Client/Server Models¶
Functions¶
-
esp_err_t
esp_ble_mesh_register_config_client_callback
(esp_ble_mesh_cfg_client_cb_t callback)¶ Register BLE Mesh Config Client Model callback.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] callback
: Pointer to the callback function.
-
esp_err_t
esp_ble_mesh_register_config_server_callback
(esp_ble_mesh_cfg_server_cb_t callback)¶ Register BLE Mesh Config Server Model callback.
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] callback
: Pointer to the callback function.
-
esp_err_t
esp_ble_mesh_config_client_get_state
(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_cfg_client_get_state_t *get_state)¶ Get the value of Config Server Model states using the Config Client Model get messages.
- Note
If you want to find the opcodes and corresponding meanings accepted by this API, please refer to esp_ble_mesh_opcode_config_client_get_t in esp_ble_mesh_defs.h
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] params
: Pointer to BLE Mesh common client parameters.[in] get_state
: Pointer to a union, each kind of opcode corresponds to one structure inside. Shall not be set to NULL.
-
esp_err_t
esp_ble_mesh_config_client_set_state
(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_cfg_client_set_state_t *set_state)¶ Set the value of the Configuration Server Model states using the Config Client Model set messages.
- Note
If you want to find the opcodes and corresponding meanings accepted by this API, please refer to esp_ble_mesh_opcode_config_client_set_t in esp_ble_mesh_defs.h
- Return
ESP_OK on success or error code otherwise.
- Parameters
[in] params
: Pointer to BLE Mesh common client parameters.[in] set_state
: Pointer to a union, each kind of opcode corresponds to one structure inside. Shall not be set to NULL.
Unions¶
-
union
esp_ble_mesh_cfg_client_get_state_t
¶ - #include <esp_ble_mesh_config_model_api.h>
For ESP_BLE_MESH_MODEL_OP_BEACON_GET ESP_BLE_MESH_MODEL_OP_COMPOSITION_DATA_GET ESP_BLE_MESH_MODEL_OP_DEFAULT_TTL_GET ESP_BLE_MESH_MODEL_OP_GATT_PROXY_GET ESP_BLE_MESH_MODEL_OP_RELAY_GET ESP_BLE_MESH_MODEL_OP_MODEL_PUB_GET ESP_BLE_MESH_MODEL_OP_FRIEND_GET ESP_BLE_MESH_MODEL_OP_HEARTBEAT_PUB_GET ESP_BLE_MESH_MODEL_OP_HEARTBEAT_SUB_GET the get_state parameter in the esp_ble_mesh_config_client_get_state function should not be set to NULL.
Public Members
-
esp_ble_mesh_cfg_model_pub_get_t
model_pub_get
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_PUB_GET.
-
esp_ble_mesh_cfg_composition_data_get_t
comp_data_get
¶ For ESP_BLE_MESH_MODEL_OP_COMPOSITION_DATA_GET.
-
esp_ble_mesh_cfg_sig_model_sub_get_t
sig_model_sub_get
¶ For ESP_BLE_MESH_MODEL_OP_SIG_MODEL_SUB_GET
-
esp_ble_mesh_cfg_vnd_model_sub_get_t
vnd_model_sub_get
¶ For ESP_BLE_MESH_MODEL_OP_VENDOR_MODEL_SUB_GET
-
esp_ble_mesh_cfg_app_key_get_t
app_key_get
¶ For ESP_BLE_MESH_MODEL_OP_APP_KEY_GET.
-
esp_ble_mesh_cfg_node_identity_get_t
node_identity_get
¶ For ESP_BLE_MESH_MODEL_OP_NODE_IDENTITY_GET.
-
esp_ble_mesh_cfg_sig_model_app_get_t
sig_model_app_get
¶ For ESP_BLE_MESH_MODEL_OP_SIG_MODEL_APP_GET
-
esp_ble_mesh_cfg_vnd_model_app_get_t
vnd_model_app_get
¶ For ESP_BLE_MESH_MODEL_OP_VENDOR_MODEL_APP_GET
-
esp_ble_mesh_cfg_kr_phase_get_t
kr_phase_get
¶ For ESP_BLE_MESH_MODEL_OP_KEY_REFRESH_PHASE_GET
-
esp_ble_mesh_cfg_lpn_polltimeout_get_t
lpn_pollto_get
¶ For ESP_BLE_MESH_MODEL_OP_LPN_POLLTIMEOUT_GET
-
esp_ble_mesh_cfg_model_pub_get_t
-
union
esp_ble_mesh_cfg_client_set_state_t
¶ - #include <esp_ble_mesh_config_model_api.h>
For ESP_BLE_MESH_MODEL_OP_BEACON_SET ESP_BLE_MESH_MODEL_OP_DEFAULT_TTL_SET ESP_BLE_MESH_MODEL_OP_GATT_PROXY_SET ESP_BLE_MESH_MODEL_OP_RELAY_SET ESP_BLE_MESH_MODEL_OP_MODEL_PUB_SET ESP_BLE_MESH_MODEL_OP_MODEL_SUB_ADD ESP_BLE_MESH_MODEL_OP_MODEL_SUB_VIRTUAL_ADDR_ADD ESP_BLE_MESH_MODEL_OP_MODEL_SUB_DELETE ESP_BLE_MESH_MODEL_OP_MODEL_SUB_VIRTUAL_ADDR_DELETE ESP_BLE_MESH_MODEL_OP_MODEL_SUB_OVERWRITE ESP_BLE_MESH_MODEL_OP_MODEL_SUB_VIRTUAL_ADDR_OVERWRITE ESP_BLE_MESH_MODEL_OP_NET_KEY_ADD ESP_BLE_MESH_MODEL_OP_APP_KEY_ADD ESP_BLE_MESH_MODEL_OP_MODEL_APP_BIND ESP_BLE_MESH_MODEL_OP_NODE_RESET ESP_BLE_MESH_MODEL_OP_FRIEND_SET ESP_BLE_MESH_MODEL_OP_HEARTBEAT_PUB_SET ESP_BLE_MESH_MODEL_OP_HEARTBEAT_SUB_SET the set_state parameter in the esp_ble_mesh_config_client_set_state function should not be set to NULL.
Public Members
-
esp_ble_mesh_cfg_beacon_set_t
beacon_set
¶ For ESP_BLE_MESH_MODEL_OP_BEACON_SET
-
esp_ble_mesh_cfg_default_ttl_set_t
default_ttl_set
¶ For ESP_BLE_MESH_MODEL_OP_DEFAULT_TTL_SET
-
esp_ble_mesh_cfg_friend_set_t
friend_set
¶ For ESP_BLE_MESH_MODEL_OP_FRIEND_SET
-
esp_ble_mesh_cfg_gatt_proxy_set_t
gatt_proxy_set
¶ For ESP_BLE_MESH_MODEL_OP_GATT_PROXY_SET
-
esp_ble_mesh_cfg_relay_set_t
relay_set
¶ For ESP_BLE_MESH_MODEL_OP_RELAY_SET
-
esp_ble_mesh_cfg_net_key_add_t
net_key_add
¶ For ESP_BLE_MESH_MODEL_OP_NET_KEY_ADD
-
esp_ble_mesh_cfg_app_key_add_t
app_key_add
¶ For ESP_BLE_MESH_MODEL_OP_APP_KEY_ADD
-
esp_ble_mesh_cfg_model_app_bind_t
model_app_bind
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_APP_BIND
-
esp_ble_mesh_cfg_model_pub_set_t
model_pub_set
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_PUB_SET
-
esp_ble_mesh_cfg_model_sub_add_t
model_sub_add
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_SUB_ADD
-
esp_ble_mesh_cfg_model_sub_delete_t
model_sub_delete
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_SUB_DELETE
-
esp_ble_mesh_cfg_model_sub_overwrite_t
model_sub_overwrite
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_SUB_OVERWRITE
-
esp_ble_mesh_cfg_model_sub_va_add_t
model_sub_va_add
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_SUB_VIRTUAL_ADDR_ADD
-
esp_ble_mesh_cfg_model_sub_va_delete_t
model_sub_va_delete
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_SUB_VIRTUAL_ADDR_DELETE
-
esp_ble_mesh_cfg_model_sub_va_overwrite_t
model_sub_va_overwrite
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_SUB_VIRTUAL_ADDR_OVERWRITE
-
esp_ble_mesh_cfg_heartbeat_pub_set_t
heartbeat_pub_set
¶ For ESP_BLE_MESH_MODEL_OP_HEARTBEAT_PUB_SET
-
esp_ble_mesh_cfg_heartbeat_sub_set_t
heartbeat_sub_set
¶ For ESP_BLE_MESH_MODEL_OP_HEARTBEAT_SUB_SET
-
esp_ble_mesh_cfg_model_pub_va_set_t
model_pub_va_set
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_PUB_VIRTUAL_ADDR_SET
-
esp_ble_mesh_cfg_model_sub_delete_all_t
model_sub_delete_all
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_SUB_DELETE_ALL
-
esp_ble_mesh_cfg_net_key_update_t
net_key_update
¶ For ESP_BLE_MESH_MODEL_OP_NET_KEY_UPDATE
-
esp_ble_mesh_cfg_net_key_delete_t
net_key_delete
¶ For ESP_BLE_MESH_MODEL_OP_NET_KEY_DELETE
-
esp_ble_mesh_cfg_app_key_update_t
app_key_update
¶ For ESP_BLE_MESH_MODEL_OP_APP_KEY_UPDATE
-
esp_ble_mesh_cfg_app_key_delete_t
app_key_delete
¶ For ESP_BLE_MESH_MODEL_OP_APP_KEY_DELETE
-
esp_ble_mesh_cfg_node_identity_set_t
node_identity_set
¶ For ESP_BLE_MESH_MODEL_OP_NODE_IDENTITY_SET
-
esp_ble_mesh_cfg_model_app_unbind_t
model_app_unbind
¶ For ESP_BLE_MESH_MODEL_OP_MODEL_APP_UNBIND
-
esp_ble_mesh_cfg_kr_phase_set_t
kr_phase_set
¶ For ESP_BLE_MESH_MODEL_OP_KEY_REFRESH_PHASE_SET
-
esp_ble_mesh_cfg_net_transmit_set_t
net_transmit_set
¶ For ESP_BLE_MESH_MODEL_OP_NETWORK_TRANSMIT_SET
-
esp_ble_mesh_cfg_beacon_set_t
-
union
esp_ble_mesh_cfg_client_common_cb_param_t
¶ - #include <esp_ble_mesh_config_model_api.h>
Configuration Client Model received message union.
Public Members
-
esp_ble_mesh_cfg_beacon_status_cb_t
beacon_status
¶ The beacon status value
-
esp_ble_mesh_cfg_comp_data_status_cb_t
comp_data_status
¶ The composition data status value
-
esp_ble_mesh_cfg_default_ttl_status_cb_t
default_ttl_status
¶ The default_ttl status value
-
esp_ble_mesh_cfg_gatt_proxy_status_cb_t
gatt_proxy_status
¶ The gatt_proxy status value
-
esp_ble_mesh_cfg_relay_status_cb_t
relay_status
¶ The relay status value
-
esp_ble_mesh_cfg_model_pub_status_cb_t
model_pub_status
¶ The model publication status value
-
esp_ble_mesh_cfg_model_sub_status_cb_t
model_sub_status
¶ The model subscription status value
-
esp_ble_mesh_cfg_net_key_status_cb_t
netkey_status
¶ The netkey status value
-
esp_ble_mesh_cfg_app_key_status_cb_t
appkey_status
¶ The appkey status value
-
esp_ble_mesh_cfg_mod_app_status_cb_t
model_app_status
¶ The model app status value
-
esp_ble_mesh_cfg_friend_status_cb_t
friend_status
¶ The friend status value
-
esp_ble_mesh_cfg_hb_pub_status_cb_t
heartbeat_pub_status
¶ The heartbeat publication status value
-
esp_ble_mesh_cfg_hb_sub_status_cb_t
heartbeat_sub_status
¶ The heartbeat subscription status value
-
esp_ble_mesh_cfg_net_trans_status_cb_t
net_transmit_status
¶ The network transmit status value
-
esp_ble_mesh_cfg_model_sub_list_cb_t
model_sub_list
¶ The model subscription list value
-
esp_ble_mesh_cfg_net_key_list_cb_t
netkey_list
¶ The network key index list value
-
esp_ble_mesh_cfg_app_key_list_cb_t
appkey_list
¶ The application key index list value
-
esp_ble_mesh_cfg_node_id_status_cb_t
node_identity_status
¶ The node identity status value
-
esp_ble_mesh_cfg_model_app_list_cb_t
model_app_list
¶ The model application key index list value
-
esp_ble_mesh_cfg_kr_phase_status_cb_t
kr_phase_status
¶ The key refresh phase status value
-
esp_ble_mesh_cfg_lpn_pollto_status_cb_t
lpn_timeout_status
¶ The low power node poll timeout status value
-
esp_ble_mesh_cfg_beacon_status_cb_t
-
union
esp_ble_mesh_cfg_server_state_change_t
¶ - #include <esp_ble_mesh_config_model_api.h>
Configuration Server model state change value union.
Public Members
-
esp_ble_mesh_state_change_cfg_mod_pub_set_t
mod_pub_set
¶ The recv_op in ctx can be used to decide which state is changed.Config Model Publication Set
-
esp_ble_mesh_state_change_cfg_model_sub_add_t
mod_sub_add
¶ Config Model Subscription Add
-
esp_ble_mesh_state_change_cfg_model_sub_delete_t
mod_sub_delete
¶ Config Model Subscription Delete
-
esp_ble_mesh_state_change_cfg_netkey_add_t
netkey_add
¶ Config NetKey Add
-
esp_ble_mesh_state_change_cfg_netkey_update_t
netkey_update
¶ Config NetKey Update
-
esp_ble_mesh_state_change_cfg_netkey_delete_t
netkey_delete
¶ Config NetKey Delete
-
esp_ble_mesh_state_change_cfg_appkey_add_t
appkey_add
¶ Config AppKey Add
-
esp_ble_mesh_state_change_cfg_appkey_update_t
appkey_update
¶ Config AppKey Update
-
esp_ble_mesh_state_change_cfg_appkey_delete_t
appkey_delete
¶ Config AppKey Delete
-
esp_ble_mesh_state_change_cfg_model_app_bind_t
mod_app_bind
¶ Config Model App Bind
-
esp_ble_mesh_state_change_cfg_model_app_unbind_t
mod_app_unbind
¶ Config Model App Unbind
-
esp_ble_mesh_state_change_cfg_kr_phase_set_t
kr_phase_set
¶ Config Key Refresh Phase Set
-
esp_ble_mesh_state_change_cfg_mod_pub_set_t
-
union
esp_ble_mesh_cfg_server_cb_value_t
¶ - #include <esp_ble_mesh_config_model_api.h>
Configuration Server model callback value union.
Public Members
-
esp_ble_mesh_cfg_server_state_change_t
state_change
¶ ESP_BLE_MESH_CFG_SERVER_STATE_CHANGE_EVT
-
esp_ble_mesh_cfg_server_state_change_t
Structures¶
-
struct
esp_ble_mesh_cfg_srv
¶ Configuration Server Model context
Public Members
-
esp_ble_mesh_model_t *
model
¶ Pointer to Configuration Server Model
-
uint8_t
net_transmit
¶ Network Transmit state
-
uint8_t
relay
¶ Relay Mode state
-
uint8_t
relay_retransmit
¶ Relay Retransmit state
-
uint8_t
beacon
¶ Secure Network Beacon state
-
uint8_t
gatt_proxy
¶ GATT Proxy state
-
uint8_t
friend_state
¶ Friend state
-
uint8_t
default_ttl
¶ Default TTL
-
esp_ble_mesh_model_t *