ESP-BLE-MESH

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

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

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

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

Application Examples and Demos

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

API Reference

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

ESP-BLE-MESH Definitions

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

  • ID of all the models and related message opcodes

  • Structs of model, element and Composition Data

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

  • Structs used to transmit/receive messages

  • Event types and related event parameters

Unions

union esp_ble_mesh_prov_cb_param_t
#include <esp_ble_mesh_defs.h>

BLE Mesh Node/Provisioner callback parameters union.

Public Members

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_prov_register_comp_param prov_register_comp

Event parameter of ESP_BLE_MESH_PROV_REGISTER_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_set_unprov_dev_name_comp_param node_set_unprov_dev_name_comp

Event parameter of ESP_BLE_MESH_NODE_SET_UNPROV_DEV_NAME_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_prov_enable_comp_param node_prov_enable_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_ENABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_prov_disable_comp_param node_prov_disable_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_DISABLE_COMP_EVT

Event parameter of ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT

Event parameter of ESP_BLE_MESH_NODE_PROV_LINK_CLOSE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_output_num_evt_param node_prov_output_num

Event parameter of ESP_BLE_MESH_NODE_PROV_OUTPUT_NUMBER_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_output_str_evt_param node_prov_output_str

Event parameter of ESP_BLE_MESH_NODE_PROV_OUTPUT_STRING_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_input_evt_param node_prov_input

Event parameter of ESP_BLE_MESH_NODE_PROV_INPUT_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provision_complete_evt_param node_prov_complete

Event parameter of ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provision_reset_param node_prov_reset

Event parameter of ESP_BLE_MESH_NODE_PROV_RESET_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_set_oob_pub_key_comp_param node_prov_set_oob_pub_key_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_SET_OOB_PUB_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_input_number_comp_param node_prov_input_num_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_INPUT_NUM_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_input_string_comp_param node_prov_input_str_comp

Event parameter of ESP_BLE_MESH_NODE_PROV_INPUT_STR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_identity_enable_comp_param node_proxy_identity_enable_comp

Event parameter of ESP_BLE_MESH_NODE_PROXY_IDENTITY_ENABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_gatt_enable_comp_param node_proxy_gatt_enable_comp

Event parameter of ESP_BLE_MESH_NODE_PROXY_GATT_ENABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_proxy_gatt_disable_comp_param node_proxy_gatt_disable_comp

Event parameter of ESP_BLE_MESH_NODE_PROXY_GATT_DISABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_node_add_local_net_key_comp_param node_add_net_key_comp

Event parameter of ESP_BLE_MESH_NODE_ADD_LOCAL_NET_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_node_add_local_app_key_comp_param node_add_app_key_comp

Event parameter of ESP_BLE_MESH_NODE_ADD_LOCAL_APP_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_node_bind_local_mod_app_comp_param node_bind_app_key_to_model_comp

Event parameter of ESP_BLE_MESH_NODE_BIND_APP_KEY_TO_MODEL_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_recv_unprov_adv_pkt_param provisioner_recv_unprov_adv_pkt

Event parameter of ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_enable_comp_param provisioner_prov_enable_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_disable_comp_param provisioner_prov_disable_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_DISABLE_COMP_EVT

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_LINK_OPEN_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_read_oob_pub_key_evt_param provisioner_prov_read_oob_pub_key

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_input_evt_param provisioner_prov_input

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_INPUT_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_output_evt_param provisioner_prov_output

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_OUTPUT_EVT

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_LINK_CLOSE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_comp_param provisioner_prov_complete

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_add_unprov_dev_comp_param provisioner_add_unprov_dev_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_ADD_UNPROV_DEV_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_dev_with_addr_comp_param provisioner_prov_dev_with_addr_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_DEV_WITH_ADDR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_delete_dev_comp_param provisioner_delete_dev_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_DELETE_DEV_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_dev_uuid_match_comp_param provisioner_set_dev_uuid_match_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_prov_data_info_comp_param provisioner_set_prov_data_info_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_PROV_DATA_INFO_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_static_oob_val_comp_param provisioner_set_static_oob_val_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_STATIC_OOB_VALUE_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_primary_elem_addr_comp_param provisioner_set_primary_elem_addr_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_PRIMARY_ELEM_ADDR_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_read_oob_pub_key_comp_param provisioner_prov_read_oob_pub_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_input_num_comp_param provisioner_prov_input_num_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_INPUT_NUMBER_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_prov_input_str_comp_param provisioner_prov_input_str_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_PROV_INPUT_STRING_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_set_node_name_comp_param provisioner_set_node_name_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_SET_NODE_NAME_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_add_local_app_key_comp_param provisioner_add_app_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_update_local_app_key_comp_param provisioner_update_app_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_APP_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_bind_local_mod_app_comp_param provisioner_bind_app_key_to_model_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_add_local_net_key_comp_param provisioner_add_net_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_NET_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_update_local_net_key_comp_param provisioner_update_net_key_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_NET_KEY_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_store_node_comp_data_comp_param provisioner_store_node_comp_data_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_STORE_NODE_COMP_DATA_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_delete_node_with_uuid_comp_param provisioner_delete_node_with_uuid_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_UUID_COMP_EVT

struct esp_ble_mesh_prov_cb_param_t::ble_mesh_provisioner_delete_node_with_addr_comp_param provisioner_delete_node_with_addr_comp

Event parameter of ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_ADDR_COMP_EVT

int err_code

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

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

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

Indicate the result of directly erasing settings by the Provisioner

Indicate the result of opening settings with index by the Provisioner

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

Indicate the result of closing settings with index by the Provisioner

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

Indicate the result of deleting settings with index by the Provisioner

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

bool enable

Indicate enabling or disabling receiving heartbeat messages

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_enable_heartbeat_recv_comp

ESP_BLE_MESH_PROVISIONER_ENABLE_HEARTBEAT_RECV_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_ENABLE_HEARTBEAT_RECV_COMP_EVT

uint8_t type

Type of the filter used for receiving heartbeat messages

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_set_heartbeat_filter_type_comp

ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_TYPE_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_TYPE_COMP_EVT

uint8_t op

Operation (add, remove, clean)

uint16_t hb_src

Heartbeat source address

uint16_t hb_dst

Heartbeat destination address

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_set_heartbeat_filter_info_comp

ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_INFO_COMP_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_SET_HEARTBEAT_FILTER_INFO_COMP_EVT

uint8_t init_ttl

Heartbeat InitTTL

uint8_t rx_ttl

Heartbeat RxTTL

uint8_t hops

Heartbeat hops (InitTTL - RxTTL + 1)

uint16_t feature

Bit field of currently active features of the node

int8_t rssi

RSSI of the heartbeat message

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_recv_heartbeat

ESP_BLE_MESH_PROVISIONER_RECV_HEARTBEAT_MESSAGE_EVT.

Event parameters of ESP_BLE_MESH_PROVISIONER_RECV_HEARTBEAT_MESSAGE_EVT

struct esp_ble_mesh_prov_cb_param_t::[anonymous] provisioner_direct_erase_settings_comp

ESP_BLE_MESH_PROVISIONER_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

struct ble_mesh_friend_friendship_establish_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_FRIEND_FRIENDSHIP_ESTABLISH_EVT.

Public Members

uint16_t lpn_addr

Low Power Node unicast address

struct ble_mesh_friend_friendship_terminate_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_FRIEND_FRIENDSHIP_TERMINATE_EVT.

Public Types

enum [anonymous]

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

Values:

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

struct ble_mesh_heartbeat_msg_recv_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_HEARTBEAT_MESSAGE_RECV_EVT.

Public Members

uint8_t hops

Heartbeat hops (InitTTL - RxTTL + 1)

uint16_t feature

Bit field of currently active features of the node

struct ble_mesh_input_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_INPUT_EVT.

Public Members

esp_ble_mesh_input_action_t action

Action of Input OOB Authentication

uint8_t size

Size of Input OOB Authentication

struct ble_mesh_input_number_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_INPUT_NUM_COMP_EVT.

Public Members

int err_code

Indicate the result of inputting number

struct ble_mesh_input_string_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_INPUT_STR_COMP_EVT.

Public Members

int err_code

Indicate the result of inputting string

#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_LINK_CLOSE_EVT.

Public Members

Type of the bearer used when device link is closed

#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT.

Public Members

Type of the bearer used when device link is open

struct ble_mesh_lpn_disable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_DISABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of disabling LPN functionality

struct ble_mesh_lpn_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling LPN functionality

struct ble_mesh_lpn_friendship_establish_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_FRIENDSHIP_ESTABLISH_EVT.

Public Members

uint16_t friend_addr

Friend Node unicast address

struct ble_mesh_lpn_friendship_terminate_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_FRIENDSHIP_TERMINATE_EVT.

Public Members

uint16_t friend_addr

Friend Node unicast address

struct ble_mesh_lpn_poll_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_LPN_POLL_COMP_EVT.

Public Members

int err_code

Indicate the result of sending Friend Poll

struct ble_mesh_model_sub_group_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_SUBSCRIBE_GROUP_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of local model subscribing group address

uint16_t element_addr

Element address

uint16_t company_id

Company ID

uint16_t model_id

Model ID

uint16_t group_addr

Group Address

struct ble_mesh_model_unsub_group_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_UNSUBSCRIBE_GROUP_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of local model unsubscribing group address

uint16_t element_addr

Element address

uint16_t company_id

Company ID

uint16_t model_id

Model ID

uint16_t group_addr

Group Address

struct ble_mesh_node_add_local_app_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_ADD_LOCAL_APP_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of adding local AppKey by the node

uint16_t net_idx

NetKey Index

uint16_t app_idx

AppKey Index

struct ble_mesh_node_add_local_net_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_ADD_LOCAL_NET_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of adding local NetKey by the node

uint16_t net_idx

NetKey Index

struct ble_mesh_node_bind_local_mod_app_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_BIND_APP_KEY_TO_MODEL_COMP_EVT.

Public Members

int err_code

Indicate the result of binding AppKey with model by the node

uint16_t element_addr

Element address

uint16_t app_idx

AppKey Index

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct ble_mesh_output_num_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_OUTPUT_NUMBER_EVT.

Public Members

esp_ble_mesh_output_action_t action

Action of Output OOB Authentication

uint32_t number

Number of Output OOB Authentication

struct ble_mesh_output_str_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_OUTPUT_STRING_EVT.

Public Members

char string[8]

String of Output OOB Authentication

struct ble_mesh_prov_disable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_DISABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of disabling BLE Mesh device

struct ble_mesh_prov_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling BLE Mesh device

struct ble_mesh_prov_register_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROV_REGISTER_COMP_EVT.

Public Members

int err_code

Indicate the result of BLE Mesh initialization

struct ble_mesh_provision_complete_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT.

Public Members

uint16_t net_idx

NetKey Index

uint8_t net_key[16]

NetKey

uint16_t addr

Primary address

uint8_t flags

Flags

uint32_t iv_index

IV Index

struct ble_mesh_provision_reset_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_RESET_EVT.

struct ble_mesh_provisioner_add_local_app_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of adding local AppKey by the Provisioner

uint16_t net_idx

NetKey Index

uint16_t app_idx

AppKey Index

struct ble_mesh_provisioner_add_local_net_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_NET_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of adding local NetKey by the Provisioner

uint16_t net_idx

NetKey Index

struct ble_mesh_provisioner_add_unprov_dev_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_ADD_UNPROV_DEV_COMP_EVT.

Public Members

int err_code

Indicate the result of adding device into queue by the Provisioner

struct ble_mesh_provisioner_bind_local_mod_app_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT.

Public Members

int err_code

Indicate the result of binding AppKey with model by the Provisioner

uint16_t element_addr

Element address

uint16_t app_idx

AppKey Index

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct ble_mesh_provisioner_delete_dev_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_DELETE_DEV_COMP_EVT.

Public Members

int err_code

Indicate the result of deleting device by the Provisioner

struct ble_mesh_provisioner_delete_node_with_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_ADDR_COMP_EVT.

Public Members

int err_code

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

uint16_t unicast_addr

Node unicast address

struct ble_mesh_provisioner_delete_node_with_uuid_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_DELETE_NODE_WITH_UUID_COMP_EVT.

Public Members

int err_code

Indicate the result of deleting node with uuid by the Provisioner

uint8_t uuid[16]

Node device uuid

#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_LINK_CLOSE_EVT.

Public Members

Type of the bearer used when Provisioner link is closed

Reason of the closed provisioning link

#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_LINK_OPEN_EVT.

Public Members

Type of the bearer used when Provisioner link is opened

struct ble_mesh_provisioner_prov_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_COMPLETE_EVT.

Public Members

uint16_t node_idx

Index of the provisioned device

esp_ble_mesh_octet16_t device_uuid

Device UUID of the provisioned device

uint16_t unicast_addr

Primary address of the provisioned device

uint8_t element_num

Element count of the provisioned device

uint16_t netkey_idx

NetKey Index of the provisioned device

struct ble_mesh_provisioner_prov_dev_with_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_DEV_WITH_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of Provisioner starting to provision a device

struct ble_mesh_provisioner_prov_disable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_DISABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of disabling BLE Mesh Provisioner

struct ble_mesh_provisioner_prov_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling BLE Mesh Provisioner

struct ble_mesh_provisioner_prov_input_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_INPUT_EVT.

Public Members

esp_ble_mesh_oob_method_t method

Method of device Output OOB Authentication

esp_ble_mesh_output_action_t action

Action of device Output OOB Authentication

uint8_t size

Size of device Output OOB Authentication

Index of the provisioning link

struct ble_mesh_provisioner_prov_input_num_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_INPUT_NUMBER_COMP_EVT.

Public Members

int err_code

Indicate the result of inputting number by the Provisioner

struct ble_mesh_provisioner_prov_input_str_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_INPUT_STRING_COMP_EVT.

Public Members

int err_code

Indicate the result of inputting string by the Provisioner

struct ble_mesh_provisioner_prov_output_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_OUTPUT_EVT.

Public Members

esp_ble_mesh_oob_method_t method

Method of device Input OOB Authentication

esp_ble_mesh_input_action_t action

Action of device Input OOB Authentication

uint8_t size

Size of device Input OOB Authentication

Index of the provisioning link

char string[8]

String output by the Provisioner

uint32_t number

Number output by the Provisioner

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

ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of setting OOB Public Key by the Provisioner

struct ble_mesh_provisioner_prov_read_oob_pub_key_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_PROV_READ_OOB_PUB_KEY_EVT.

Public Members

Index of the provisioning link

struct ble_mesh_provisioner_recv_unprov_adv_pkt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT.

Public Members

uint8_t dev_uuid[16]

Device UUID of the unprovisioned device

esp_ble_mesh_bd_addr_t addr

Device address of the unprovisioned device

esp_ble_mesh_addr_type_t addr_type

Device address type

uint16_t oob_info

OOB Info of the unprovisioned device

uint8_t adv_type

Avertising type of the unprovisioned device

esp_ble_mesh_prov_bearer_t bearer

Bearer of the unprovisioned device

int8_t rssi

RSSI of the received advertising packet

struct ble_mesh_provisioner_set_dev_uuid_match_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT.

Public Members

int err_code

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

struct ble_mesh_provisioner_set_node_name_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_NODE_NAME_COMP_EVT.

Public Members

int err_code

Indicate the result of setting provisioned device name by the Provisioner

uint16_t node_index

Index of the provisioned device

struct ble_mesh_provisioner_set_primary_elem_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_PRIMARY_ELEM_ADDR_COMP_EVT.

Public Members

int err_code

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

struct ble_mesh_provisioner_set_prov_data_info_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_PROV_DATA_INFO_COMP_EVT.

Public Members

int err_code

Indicate the result of setting provisioning info by the Provisioner

struct ble_mesh_provisioner_set_static_oob_val_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_SET_STATIC_OOB_VALUE_COMP_EVT.

Public Members

int err_code

Indicate the result of setting static oob value by the Provisioner

struct ble_mesh_provisioner_store_node_comp_data_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_STORE_NODE_COMP_DATA_COMP_EVT.

Public Members

int err_code

Indicate the result of storing node composition data by the Provisioner

uint16_t addr

Node element address

struct ble_mesh_provisioner_update_local_app_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_APP_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of updating local AppKey by the Provisioner

uint16_t net_idx

NetKey Index

uint16_t app_idx

AppKey Index

struct ble_mesh_provisioner_update_local_net_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROVISIONER_UPDATE_LOCAL_NET_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of updating local NetKey by the Provisioner

uint16_t net_idx

NetKey Index

struct ble_mesh_proxy_client_add_filter_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_ADD_FILTER_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client add filter address

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_client_connect_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_CONNECT_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client connect

esp_ble_mesh_bd_addr_t addr

Device address of the Proxy Server

esp_ble_mesh_addr_type_t addr_type

Device address type

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_client_connected_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_CONNECTED_EVT.

Public Members

esp_ble_mesh_bd_addr_t addr

Device address of the Proxy Server

esp_ble_mesh_addr_type_t addr_type

Device address type

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_client_disconnect_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_DISCONNECT_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client disconnect

uint8_t conn_handle

Proxy connection handle

struct ble_mesh_proxy_client_disconnected_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_DISCONNECTED_EVT.

Public Members

esp_ble_mesh_bd_addr_t addr

Device address of the Proxy Server

esp_ble_mesh_addr_type_t addr_type

Device address type

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

uint8_t reason

Proxy disconnect reason

struct ble_mesh_proxy_client_recv_adv_pkt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_RECV_ADV_PKT_EVT.

Public Members

esp_ble_mesh_bd_addr_t addr

Device address

esp_ble_mesh_addr_type_t addr_type

Device address type

uint16_t net_idx

Network ID related NetKey Index

uint8_t net_id[8]

Network ID contained in the advertising packet

int8_t rssi

RSSI of the received advertising packet

struct ble_mesh_proxy_client_recv_filter_status_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_RECV_FILTER_STATUS_EVT.

Public Members

uint8_t conn_handle

Proxy connection handle

uint16_t server_addr

Proxy Server primary element address

uint16_t net_idx

Corresponding NetKey Index

uint8_t filter_type

Proxy Server filter type(whitelist or blacklist)

uint16_t list_size

Number of addresses in the Proxy Server filter list

struct ble_mesh_proxy_client_remove_filter_addr_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_REMOVE_FILTER_ADDR_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client remove filter address

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_client_set_filter_type_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_PROXY_CLIENT_SET_FILTER_TYPE_COMP_EVT.

Public Members

int err_code

Indicate the result of Proxy Client set filter type

uint8_t conn_handle

Proxy connection handle

uint16_t net_idx

Corresponding NetKey Index

struct ble_mesh_proxy_gatt_disable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROXY_GATT_DISABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of disabling Mesh Proxy Service

struct ble_mesh_proxy_gatt_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROXY_GATT_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling Mesh Proxy Service

struct ble_mesh_proxy_identity_enable_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROXY_IDENTITY_ENABLE_COMP_EVT.

Public Members

int err_code

Indicate the result of enabling Mesh Proxy advertising

struct ble_mesh_set_fast_prov_action_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_SET_FAST_PROV_ACTION_COMP_EVT.

Public Members

uint8_t status_action

Indicate the result of setting action of fast provisioning

struct ble_mesh_set_fast_prov_info_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_SET_FAST_PROV_INFO_COMP_EVT.

Public Members

uint8_t status_unicast

Indicate the result of setting unicast address range of fast provisioning

uint8_t status_net_idx

Indicate the result of setting NetKey Index of fast provisioning

uint8_t status_match

Indicate the result of setting matching Device UUID of fast provisioning

struct ble_mesh_set_oob_pub_key_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_PROV_SET_OOB_PUB_KEY_COMP_EVT.

Public Members

int err_code

Indicate the result of setting OOB Public Key

struct ble_mesh_set_unprov_dev_name_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_NODE_SET_UNPROV_DEV_NAME_COMP_EVT.

Public Members

int err_code

Indicate the result of setting BLE Mesh device name

union esp_ble_mesh_server_state_value_t
#include <esp_ble_mesh_defs.h>

Server model state value union.

Public Members

uint8_t onoff

The value of the Generic OnOff state

The value of the Light LC Light OnOff state

struct esp_ble_mesh_server_state_value_t::[anonymous] gen_onoff

The Generic OnOff state

int16_t level

The value of the Generic Level state

struct esp_ble_mesh_server_state_value_t::[anonymous] gen_level

The Generic Level state

uint8_t onpowerup

The value of the Generic OnPowerUp state

struct esp_ble_mesh_server_state_value_t::[anonymous] gen_onpowerup

The Generic OnPowerUp state

uint16_t power

The value of the Generic Power Actual state

struct esp_ble_mesh_server_state_value_t::[anonymous] gen_power_actual

The Generic Power Actual state

uint16_t lightness

The value of the Light Lightness Actual state

The value of the Light Lightness Linear state

The value of the Light CTL Lightness state

The value of the Light HSL Lightness state

The value of the Light xyL Lightness state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_lightness_actual

The Light Lightness Actual state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_lightness_linear

The Light Lightness Linear state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_ctl_lightness

The Light CTL Lightness state

uint16_t temperature

The value of the Light CTL Temperature state

int16_t delta_uv

The value of the Light CTL Delta UV state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_ctl_temp_delta_uv

The Light CTL Temperature & Delta UV states

uint16_t hue

The value of the Light HSL Hue state

uint16_t saturation

The value of the Light HSL Saturation state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_hsl

The Light HSL composite state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_hsl_lightness

The Light HSL Lightness state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_hsl_hue

The Light HSL Hue state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_hsl_saturation

The Light HSL Saturation state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_xyl_lightness

The Light xyL Lightness state

struct esp_ble_mesh_server_state_value_t::[anonymous] light_lc_light_onoff

The Light LC Light OnOff state

union esp_ble_mesh_model_cb_param_t
#include <esp_ble_mesh_defs.h>

BLE Mesh model callback parameters union.

Public Members

struct esp_ble_mesh_model_cb_param_t::ble_mesh_model_operation_evt_param model_operation

Event parameter of ESP_BLE_MESH_MODEL_OPERATION_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_model_send_comp_param model_send_comp

Event parameter of ESP_BLE_MESH_MODEL_SEND_COMP_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_model_publish_comp_param model_publish_comp

Event parameter of ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_mod_recv_publish_msg_param client_recv_publish_msg

Event parameter of ESP_BLE_MESH_CLIENT_MODEL_RECV_PUBLISH_MSG_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_client_model_send_timeout_param client_send_timeout

Event parameter of ESP_BLE_MESH_CLIENT_MODEL_SEND_TIMEOUT_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_model_publish_update_evt_param model_publish_update

Event parameter of ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT

struct esp_ble_mesh_model_cb_param_t::ble_mesh_server_model_update_state_comp_param server_model_update_state

Event parameter of ESP_BLE_MESH_SERVER_MODEL_UPDATE_STATE_COMP_EVT

struct ble_mesh_client_model_send_timeout_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_CLIENT_MODEL_SEND_TIMEOUT_EVT.

Public Members

uint32_t opcode

Opcode of the previously sent message

esp_ble_mesh_model_t *model

Pointer to the model which sends the previous message

esp_ble_mesh_msg_ctx_t *ctx

Pointer to the context of the previous message

struct ble_mesh_mod_recv_publish_msg_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_CLIENT_MODEL_RECV_PUBLISH_MSG_EVT.

Public Members

uint32_t opcode

Opcode of the unsolicited received message

esp_ble_mesh_model_t *model

Pointer to the model which receives the message

esp_ble_mesh_msg_ctx_t *ctx

Pointer to the context of the message

uint16_t length

Length of the received message

uint8_t *msg

Value of the received message

struct ble_mesh_model_operation_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_OPERATION_EVT.

Public Members

uint32_t opcode

Opcode of the received message

esp_ble_mesh_model_t *model

Pointer to the model which receives the message

esp_ble_mesh_msg_ctx_t *ctx

Pointer to the context of the received message

uint16_t length

Length of the received message

uint8_t *msg

Value of the received message

struct ble_mesh_model_publish_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT.

Public Members

int err_code

Indicate the result of publishing a message

esp_ble_mesh_model_t *model

Pointer to the model which publishes the message

struct ble_mesh_model_publish_update_evt_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT.

Public Members

esp_ble_mesh_model_t *model

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

struct ble_mesh_model_send_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_MODEL_SEND_COMP_EVT.

Public Members

int err_code

Indicate the result of sending a message

uint32_t opcode

Opcode of the message

esp_ble_mesh_model_t *model

Pointer to the model which sends the message

esp_ble_mesh_msg_ctx_t *ctx

Context of the message

struct ble_mesh_server_model_update_state_comp_param
#include <esp_ble_mesh_defs.h>

ESP_BLE_MESH_SERVER_MODEL_UPDATE_STATE_COMP_EVT.

Public Members

int err_code

Indicate the result of updating server model state

esp_ble_mesh_model_t *model

Pointer to the server model which state value is updated

esp_ble_mesh_server_state_type_t type

Type of the updated server state

Structures

struct esp_ble_mesh_deinit_param_t

BLE Mesh deinit parameters

Public Members

bool erase_flash

Indicate if erasing flash when deinit mesh stack

struct esp_ble_mesh_elem_t

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

Public Members

uint16_t element_addr

Element Address, assigned during provisioning.

const uint16_t location

Location Descriptor (GATT Bluetooth Namespace Descriptors)

const uint8_t sig_model_count

SIG Model count

const uint8_t vnd_model_count

Vendor Model count

esp_ble_mesh_model_t *sig_models

SIG Models

esp_ble_mesh_model_t *vnd_models

Vendor Models

struct esp_ble_mesh_model_pub_t

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

Public Members

esp_ble_mesh_model_t *model

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

uint16_t publish_addr

Publish Address.

uint16_t app_idx : 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

struct esp_ble_mesh_model_op_t

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

Public Members

const uint32_t opcode

Message opcode

const size_t min_len

Message minimum length

esp_ble_mesh_cb_t param_cb

Callback used to handle message. Initialized by the stack.

struct esp_ble_mesh_model_cbs_t

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

Public Members

esp_ble_mesh_cb_t init_cb

Callback used during model initialization. Initialized by the stack.

struct esp_ble_mesh_model

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

Public Members

const uint16_t model_id

16-bit model identifier

uint16_t company_id

16-bit company identifier

uint16_t model_id

16-bit model identifier

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

Structure encapsulating a model ID with a company ID

union esp_ble_mesh_model::[anonymous] [anonymous]

Model ID

uint8_t element_idx

Internal information, mainly for persistent storage Belongs to Nth element

uint8_t model_idx

Is the Nth model in the element

uint16_t flags

Information about what has changed

esp_ble_mesh_elem_t *element

The Element to which this Model belongs

esp_ble_mesh_model_pub_t *const pub

Model Publication

uint16_t keys[CONFIG_BLE_MESH_MODEL_KEY_COUNT]

AppKey List

uint16_t groups[CONFIG_BLE_MESH_MODEL_GROUP_COUNT]

Subscription List (group or virtual addresses)

esp_ble_mesh_model_op_t *op

Model operation context

esp_ble_mesh_model_cbs_t *cb

Model callback structure

void *user_data

Model-specific user data

struct esp_ble_mesh_msg_ctx_t

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

Public Members

uint16_t net_idx

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

uint16_t app_idx

AppKey Index for message encryption.

uint16_t addr

Remote address.

uint16_t recv_dst

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

int8_t recv_rssi

RSSI of received packet. Not used for sending.

uint8_t recv_ttl : 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

struct esp_ble_mesh_prov_t

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

struct esp_ble_mesh_comp_t

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

Public Members

uint16_t cid

16-bit SIG-assigned company identifier

uint16_t pid

16-bit vendor-assigned product identifier

uint16_t vid

16-bit vendor-assigned product version identifier

size_t element_count

Element count

esp_ble_mesh_elem_t *elements

A sequence of elements

struct esp_ble_mesh_unprov_dev_add_t

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

Public Members

esp_ble_mesh_bd_addr_t addr

Device address

esp_ble_mesh_addr_type_t addr_type

Device address type

uint8_t uuid[16]

Device UUID

uint16_t oob_info

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

esp_ble_mesh_prov_bearer_t bearer

Provisioning Bearer

struct esp_ble_mesh_device_delete_t

Information of the device which is going to be deleted.

Public Members

esp_ble_mesh_bd_addr_t addr

Device address

esp_ble_mesh_addr_type_t addr_type

Device address type

uint8_t uuid[16]

Device UUID

uint8_t flag

BIT0: device address; BIT1: device UUID

struct esp_ble_mesh_prov_data_info_t

Information of the provisioner which is going to be updated.

Public Members

uint16_t net_idx

NetKey Index

uint8_t flags

Flags

uint32_t iv_index

IV Index

uint8_t flag

BIT0: net_idx; BIT1: flags; BIT2: iv_index

struct esp_ble_mesh_node_t

Information of the provisioned node

Public Members

esp_ble_mesh_bd_addr_t addr

Node device address

esp_ble_mesh_addr_type_t addr_type

Node device address type

uint8_t dev_uuid[16]

Device UUID

uint16_t oob_info

Node OOB information

uint16_t unicast_addr

Node unicast address

uint8_t element_num

Node element number

uint16_t net_idx

Node NetKey Index

uint8_t flags

Node key refresh flag and iv update flag

uint32_t iv_index

Node IV Index

uint8_t dev_key[16]

Node device key

char name[ESP_BLE_MESH_NODE_NAME_MAX_LEN + 1]

Node name

uint16_t comp_length

Length of Composition Data

uint8_t *comp_data

Value of Composition Data

struct esp_ble_mesh_fast_prov_info_t

Context of fast provisioning which need to be set.

Public Members

uint16_t unicast_min

Minimum unicast address used for fast provisioning

uint16_t unicast_max

Maximum unicast address used for fast provisioning

uint16_t net_idx

Netkey index used for fast provisioning

uint8_t flags

Flags used for fast provisioning

uint32_t iv_index

IV Index used for fast provisioning

uint8_t offset

Offset of the UUID to be compared

uint8_t match_len

Length of the UUID to be compared

uint8_t match_val[16]

Value of UUID to be compared

struct esp_ble_mesh_heartbeat_filter_info_t

Context of Provisioner heartbeat filter information to be set

Public Members

uint16_t hb_src

Heartbeat source address (unicast address)

uint16_t hb_dst

Heartbeat destination address (unicast address or group address)

struct esp_ble_mesh_client_op_pair_t

BLE Mesh client models related definitions.

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

Public Members

uint32_t cli_op

The client message opcode

uint32_t status_op

The server status opcode corresponding to the client message opcode

struct esp_ble_mesh_client_t

Client Model user data context.

Public Members

esp_ble_mesh_model_t *model

Pointer to the client model. Initialized by the stack.

int op_pair_size

Size of the op_pair

const esp_ble_mesh_client_op_pair_t *op_pair

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

uint32_t publish_status

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

void *internal_data

Pointer to the internal data of client model

uint8_t msg_role

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

struct esp_ble_mesh_client_common_param_t

Common parameters of the messages sent by Client Model.

Public Members

esp_ble_mesh_opcode_t opcode

Message opcode

esp_ble_mesh_model_t *model

Pointer to the client model structure

esp_ble_mesh_msg_ctx_t ctx

The context used to send message

int32_t msg_timeout

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

uint8_t msg_role

Role of the device - Node/Provisioner

struct esp_ble_mesh_state_transition_t

Parameters of the server model state transition

Public Functions

BLE_MESH_ATOMIC_DEFINE(flag, ESP_BLE_MESH_SERVER_FLAG_MAX)

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

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

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

Public Members

bool just_started

Indicate if the state transition has just started

uint8_t trans_time

State transition time

uint8_t remain_time

Remaining time of state transition

uint8_t delay

Delay before starting state transition

uint32_t quo_tt

Duration of each divided transition step

uint32_t counter

Number of steps which the transition duration is divided

uint32_t total_duration

State transition total duration

int64_t start_timestamp

Time when the state transition is started

struct k_delayed_work timer

Timer used for state transition

struct esp_ble_mesh_last_msg_info_t

Parameters of the server model received last same set message.

Public Members

uint8_t tid

Transaction number of the last message

uint16_t src

Source address of the last message

uint16_t dst

Destination address of the last message

int64_t timestamp

Time when the last message is received

struct esp_ble_mesh_server_rsp_ctrl_t

Parameters of the Server Model response control

Public Members

uint8_t get_auto_rsp : 1

BLE Mesh Server Response Option.

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

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

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

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

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

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

uint8_t set_auto_rsp : 1

Response control for Client Set messages

uint8_t status_auto_rsp : 1

Response control for Server Status messages

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 BT_OCTET32[BT_OCTET32_LEN]
typedef uint8_t BD_ADDR[BD_ADDR_LEN]
typedef uint8_t esp_ble_mesh_bd_addr_t[BD_ADDR_LEN]
typedef uint8_t esp_ble_mesh_addr_type_t

BLE device address type.

typedef struct esp_ble_mesh_model esp_ble_mesh_model_t
typedef uint8_t esp_ble_mesh_dev_add_flag_t
typedef uint32_t esp_ble_mesh_opcode_config_client_get_t

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

typedef uint32_t esp_ble_mesh_opcode_config_client_set_t

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

typedef uint32_t esp_ble_mesh_opcode_config_status_t

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

typedef uint8_t esp_ble_mesh_cfg_status_t

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

typedef uint32_t esp_ble_mesh_opcode_health_client_get_t

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

typedef uint32_t esp_ble_mesh_opcode_health_client_set_t

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

typedef uint32_t esp_ble_mesh_health_model_status_t

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

typedef uint32_t esp_ble_mesh_generic_message_opcode_t

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

typedef uint32_t esp_ble_mesh_sensor_message_opcode_t

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

typedef uint32_t esp_ble_mesh_time_scene_message_opcode_t

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

typedef uint32_t esp_ble_mesh_light_message_opcode_t

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

typedef uint32_t esp_ble_mesh_opcode_t

End of defines of esp_ble_mesh_opcode_t

typedef uint8_t esp_ble_mesh_model_status_t

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

Enumerations

enum esp_ble_mesh_cb_type_t

Values:

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_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_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_dev_role_t

Values:

ROLE_NODE = 0
ROLE_PROVISIONER
ROLE_FAST_PROV
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_proxy_filter_type_t

Values:

PROXY_FILTER_WHITELIST
PROXY_FILTER_BLACKLIST
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

Establish a BLE Mesh link event

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

Provisioner establish a BLE Mesh link event

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.

  1. 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.

  1. 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.

  1. 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.

  2. 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.

  3. 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.

  1. 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.

  2. 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.

  3. 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.

  1. 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.

  2. 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.

  3. 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 information

    • Remove 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.

  1. 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.

  2. 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.

  3. 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:

注解

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

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

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

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

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

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

struct k_delayed_work timer

Heartbeat Publication timer

uint16_t dst

Destination address for Heartbeat messages

uint16_t count

Number of Heartbeat messages to be sent

Number of Heartbeat messages received

uint8_t period

Period for sending Heartbeat messages

uint8_t ttl

TTL to be used when sending Heartbeat messages

uint16_t feature

Bit field indicating features that trigger Heartbeat messages when changed

uint16_t net_idx

NetKey Index used by Heartbeat Publication

struct esp_ble_mesh_cfg_srv::[anonymous] heartbeat_pub

Heartbeat Publication

int64_t expiry

Timestamp when Heartbeat subscription period is expired

uint16_t src

Source address for Heartbeat messages

uint8_t min_hops

Minimum hops when receiving Heartbeat messages

uint8_t max_hops

Maximum hops when receiving Heartbeat messages

esp_ble_mesh_cb_t heartbeat_recv_cb

Optional heartbeat subscription tracking function

struct esp_ble_mesh_cfg_srv::[anonymous] heartbeat_sub

Heartbeat Subscription

struct esp_ble_mesh_cfg_composition_data_get_t

Parameters of Config Composition Data Get.

Public Members

uint8_t page

Page number of the Composition Data.

struct esp_ble_mesh_cfg_model_pub_get_t

Parameters of Config Model Publication Get.

Public Members

uint16_t element_addr

The element address

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_sig_model_sub_get_t

Parameters of Config SIG Model Subscription Get.

Public Members

uint16_t element_addr

The element address

uint16_t model_id

The model id

struct esp_ble_mesh_cfg_vnd_model_sub_get_t

Parameters of Config Vendor Model Subscription Get.

Public Members

uint16_t element_addr

The element address

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_app_key_get_t

Parameters of Config AppKey Get.

Public Members

uint16_t net_idx

The network key index

struct esp_ble_mesh_cfg_node_identity_get_t

Parameters of Config Node Identity Get.

Public Members

uint16_t net_idx

The network key index

struct esp_ble_mesh_cfg_sig_model_app_get_t

Parameters of Config SIG Model App Get.

Public Members

uint16_t element_addr

The element address

uint16_t model_id

The model id

struct esp_ble_mesh_cfg_vnd_model_app_get_t

Parameters of Config Vendor Model App Get.

Public Members

uint16_t element_addr

The element address

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_kr_phase_get_t

Parameters of Config Key Refresh Phase Get.

Public Members

uint16_t net_idx

The network key index

struct esp_ble_mesh_cfg_lpn_polltimeout_get_t

Parameters of Config Low Power Node PollTimeout Get.

Public Members

uint16_t lpn_addr

The unicast address of the Low Power node

struct esp_ble_mesh_cfg_beacon_set_t

Parameters of Config Beacon Set.

Public Members

uint8_t beacon

New Secure Network Beacon state

struct esp_ble_mesh_cfg_default_ttl_set_t

Parameters of Config Default TTL Set.

Public Members

uint8_t ttl

The default TTL state value

struct esp_ble_mesh_cfg_friend_set_t

Parameters of Config Friend Set.

Public Members

uint8_t friend_state

The friend state value

struct esp_ble_mesh_cfg_gatt_proxy_set_t

Parameters of Config GATT Proxy Set.

Public Members

uint8_t gatt_proxy

The GATT Proxy state value

struct esp_ble_mesh_cfg_relay_set_t

Parameters of Config Relay Set.

Public Members

uint8_t relay

The relay value

uint8_t relay_retransmit

The relay retransmit value

struct esp_ble_mesh_cfg_net_key_add_t

Parameters of Config NetKey Add.

Public Members

uint16_t net_idx

The network key index

uint8_t net_key[16]

The network key value

struct esp_ble_mesh_cfg_app_key_add_t

Parameters of Config AppKey Add.

Public Members

uint16_t net_idx

The network key index

uint16_t app_idx

The app key index

uint8_t app_key[16]

The app key value

struct esp_ble_mesh_cfg_model_app_bind_t

Parameters of Config Model App Bind.

Public Members

uint16_t element_addr

The element address

uint16_t model_app_idx

Index of the app key to bind with the model

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_model_pub_set_t

Parameters of Config Model Publication Set.

Public Members

uint16_t element_addr

The element address

uint16_t publish_addr

Value of the publish address

uint16_t publish_app_idx

Index of the application key

bool cred_flag

Value of the Friendship Credential Flag

uint8_t publish_ttl

Default TTL value for the publishing messages

uint8_t publish_period

Period for periodic status publishing

uint8_t publish_retransmit

Number of retransmissions and number of 50-millisecond steps between retransmissions

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_model_sub_add_t

Parameters of Config Model Subscription Add.

Public Members

uint16_t element_addr

The element address

uint16_t sub_addr

The address to be added to the Subscription List

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_model_sub_delete_t

Parameters of Config Model Subscription Delete.

Public Members

uint16_t element_addr

The element address

uint16_t sub_addr

The address to be removed from the Subscription List

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_model_sub_overwrite_t

Parameters of Config Model Subscription Overwrite.

Public Members

uint16_t element_addr

The element address

uint16_t sub_addr

The address to be added to the Subscription List

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_model_sub_va_add_t

Parameters of Config Model Subscription Virtual Address Add.

Public Members

uint16_t element_addr

The element address

uint8_t label_uuid[16]

The Label UUID of the virtual address to be added to the Subscription List

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_model_sub_va_delete_t

Parameters of Config Model Subscription Virtual Address Delete.

Public Members

uint16_t element_addr

The element address

uint8_t label_uuid[16]

The Label UUID of the virtual address to be removed from the Subscription List

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_model_sub_va_overwrite_t

Parameters of Config Model Subscription Virtual Address Overwrite.

Public Members

uint16_t element_addr

The element address

uint8_t label_uuid[16]

The Label UUID of the virtual address to be added to the Subscription List

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_model_pub_va_set_t

Parameters of Config Model Publication Virtual Address Set.

Public Members

uint16_t element_addr

The element address

uint8_t label_uuid[16]

Value of the Label UUID publish address

uint16_t publish_app_idx

Index of the application key

bool cred_flag

Value of the Friendship Credential Flag

uint8_t publish_ttl

Default TTL value for the publishing messages

uint8_t publish_period

Period for periodic status publishing

uint8_t publish_retransmit

Number of retransmissions and number of 50-millisecond steps between retransmissions

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_model_sub_delete_all_t

Parameters of Config Model Subscription Delete All.

Public Members

uint16_t element_addr

The element address

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_net_key_update_t

Parameters of Config NetKey Update.

Public Members

uint16_t net_idx

The network key index

uint8_t net_key[16]

The network key value

struct esp_ble_mesh_cfg_net_key_delete_t

Parameters of Config NetKey Delete.

Public Members

uint16_t net_idx

The network key index

struct esp_ble_mesh_cfg_app_key_update_t

Parameters of Config AppKey Update.

Public Members

uint16_t net_idx

The network key index

uint16_t app_idx

The app key index

uint8_t app_key[16]

The app key value

struct esp_ble_mesh_cfg_app_key_delete_t

Parameters of Config AppKey Delete.

Public Members

uint16_t net_idx

The network key index

uint16_t app_idx

The app key index

struct esp_ble_mesh_cfg_node_identity_set_t

Parameters of Config Node Identity Set.

Public Members

uint16_t net_idx

The network key index

uint8_t identity

New Node Identity state

struct esp_ble_mesh_cfg_model_app_unbind_t

Parameters of Config Model App Unbind.

Public Members

uint16_t element_addr

The element address

uint16_t model_app_idx

Index of the app key to bind with the model

uint16_t model_id

The model id

uint16_t company_id

The company id, if not a vendor model, shall set to 0xFFFF

struct esp_ble_mesh_cfg_kr_phase_set_t

Parameters of Config Key Refresh Phase Set.

Public Members

uint16_t net_idx

The network key index

uint8_t transition

New Key Refresh Phase Transition

struct esp_ble_mesh_cfg_net_transmit_set_t

Parameters of Config Network Transmit Set.

Public Members

uint8_t net_transmit

Network Transmit State

struct esp_ble_mesh_cfg_heartbeat_pub_set_t

Parameters of Config Model Heartbeat Publication Set.

Public Members

uint16_t dst

Destination address for Heartbeat messages

uint8_t count

Number of Heartbeat messages to be sent

uint8_t period

Period for sending Heartbeat messages

uint8_t ttl

TTL to be used when sending Heartbeat messages

uint16_t feature

Bit field indicating features that trigger Heartbeat messages when changed

uint16_t net_idx

NetKey Index

struct esp_ble_mesh_cfg_heartbeat_sub_set_t

Parameters of Config Model Heartbeat Subscription Set.

Public Members

uint16_t src

Source address for Heartbeat messages

uint16_t dst

Destination address for Heartbeat messages

uint8_t period

Period for receiving Heartbeat messages

struct esp_ble_mesh_cfg_beacon_status_cb_t

Parameter of Config Beacon Status

Public Members

uint8_t beacon

Secure Network Beacon state value

struct esp_ble_mesh_cfg_comp_data_status_cb_t

Parameters of Config Composition Data Status

Public Members

uint8_t page

Page number of the Composition Data

struct net_buf_simple *composition_data

Pointer to Composition Data for the identified page

struct esp_ble_mesh_cfg_default_ttl_status_cb_t

Parameter of Config Default TTL Status

Public Members

uint8_t default_ttl

Default TTL state value

struct esp_ble_mesh_cfg_gatt_proxy_status_cb_t

Parameter of Config GATT Proxy Status

Public Members

uint8_t gatt_proxy

GATT Proxy state value

struct esp_ble_mesh_cfg_relay_status_cb_t

Parameters of Config Relay Status

Public Members

uint8_t relay

Relay state value

uint8_t retransmit

Relay retransmit value(number of retransmissions and number of 10-millisecond steps between retransmissions)

struct esp_ble_mesh_cfg_model_pub_status_cb_t

Parameters of Config Model Publication Status

Public Members

uint8_t status

Status Code for the request message

uint16_t element_addr

Address of the element

uint16_t publish_addr

Value of the publish address

uint16_t app_idx

Index of the application key

bool cred_flag

Value of the Friendship Credential Flag

uint8_t ttl

Default TTL value for the outgoing messages

uint8_t period

Period for periodic status publishing

uint8_t transmit

Number of retransmissions and number of 50-millisecond steps between retransmissions

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct esp_ble_mesh_cfg_model_sub_status_cb_t

Parameters of Config Model Subscription Status

Public Members

uint8_t status

Status Code for the request message

uint16_t element_addr

Address of the element

uint16_t sub_addr

Value of the address

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct esp_ble_mesh_cfg_net_key_status_cb_t

Parameters of Config NetKey Status

Public Members

uint8_t status

Status Code for the request message

uint16_t net_idx

Index of the NetKey

struct esp_ble_mesh_cfg_app_key_status_cb_t

Parameters of Config AppKey Status

Public Members

uint8_t status

Status Code for the request message

uint16_t net_idx

Index of the NetKey

uint16_t app_idx

Index of the application key

struct esp_ble_mesh_cfg_mod_app_status_cb_t

Parameters of Config Model App Status

Public Members

uint8_t status

Status Code for the request message

uint16_t element_addr

Address of the element

uint16_t app_idx

Index of the application key

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct esp_ble_mesh_cfg_friend_status_cb_t

Parameter of Config Friend Status

Public Members

uint8_t friend_state

Friend state value

struct esp_ble_mesh_cfg_hb_pub_status_cb_t

Parameters of Config Heartbeat Publication Status

Public Members

uint8_t status

Status Code for the request message

uint16_t dst

Destination address for Heartbeat messages

uint8_t count

Number of Heartbeat messages remaining to be sent

uint8_t period

Period for sending Heartbeat messages

uint8_t ttl

TTL to be used when sending Heartbeat messages

uint16_t features

Features that trigger Heartbeat messages when changed

uint16_t net_idx

Index of the NetKey

struct esp_ble_mesh_cfg_hb_sub_status_cb_t

Parameters of Config Heartbeat Subscription Status

Public Members

uint8_t status

Status Code for the request message

uint16_t src

Source address for Heartbeat messages

uint16_t dst

Destination address for Heartbeat messages

uint8_t period

Remaining Period for processing Heartbeat messages

uint8_t count

Number of Heartbeat messages received

uint8_t min_hops

Minimum hops when receiving Heartbeat messages

uint8_t max_hops

Maximum hops when receiving Heartbeat messages

struct esp_ble_mesh_cfg_net_trans_status_cb_t

Parameters of Config Network Transmit Status

Public Members

uint8_t net_trans_count : 3

Number of transmissions for each Network PDU originating from the node

uint8_t net_trans_step : 5

Maximum hops when receiving Heartbeat messages

struct esp_ble_mesh_cfg_model_sub_list_cb_t

Parameters of Config SIG/Vendor Subscription List

Public Members

uint8_t status

Status Code for the request message

uint16_t element_addr

Address of the element

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct net_buf_simple *sub_addr

A block of all addresses from the Subscription List

struct esp_ble_mesh_cfg_net_key_list_cb_t

Parameter of Config NetKey List

Public Members

struct net_buf_simple *net_idx

A list of NetKey Indexes known to the node

struct esp_ble_mesh_cfg_app_key_list_cb_t

Parameters of Config AppKey List

Public Members

uint8_t status

Status Code for the request message

uint16_t net_idx

NetKey Index of the NetKey that the AppKeys are bound to

struct net_buf_simple *app_idx

A list of AppKey indexes that are bound to the NetKey identified by NetKeyIndex

struct esp_ble_mesh_cfg_node_id_status_cb_t

Parameters of Config Node Identity Status

Public Members

uint8_t status

Status Code for the request message

uint16_t net_idx

Index of the NetKey

uint8_t identity

Node Identity state

struct esp_ble_mesh_cfg_model_app_list_cb_t

Parameters of Config SIG/Vendor Model App List

Public Members

uint8_t status

Status Code for the request message

uint16_t element_addr

Address of the element

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct net_buf_simple *app_idx

All AppKey indexes bound to the Model

struct esp_ble_mesh_cfg_kr_phase_status_cb_t

Parameters of Config Key Refresh Phase Status

Public Members

uint8_t status

Status Code for the request message

uint16_t net_idx

Index of the NetKey

uint8_t phase

Key Refresh Phase state

struct esp_ble_mesh_cfg_lpn_pollto_status_cb_t

Parameters of Config Low Power Node PollTimeout Status

Public Members

uint16_t lpn_addr

The unicast address of the Low Power node

int32_t poll_timeout

The current value of the PollTimeout timer of the Low Power node

struct esp_ble_mesh_cfg_client_cb_param_t

Configuration Client Model callback parameters

Public Members

int error_code

Appropriate error code

esp_ble_mesh_client_common_param_t *params

The client common parameters

esp_ble_mesh_cfg_client_common_cb_param_t status_cb

The config status message callback values

struct esp_ble_mesh_state_change_cfg_mod_pub_set_t

Configuration Server model related context.

Public Members

uint16_t element_addr

Element Address

uint16_t pub_addr

Publish Address

uint16_t app_idx

AppKey Index

bool cred_flag

Friendship Credential Flag

uint8_t pub_ttl

Publish TTL

uint8_t pub_period

Publish Period

uint8_t pub_retransmit

Publish Retransmit

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct esp_ble_mesh_state_change_cfg_model_sub_add_t

Parameters of Config Model Subscription Add

Public Members

uint16_t element_addr

Element Address

uint16_t sub_addr

Subscription Address

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct esp_ble_mesh_state_change_cfg_model_sub_delete_t

Parameters of Config Model Subscription Delete

Public Members

uint16_t element_addr

Element Address

uint16_t sub_addr

Subscription Address

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct esp_ble_mesh_state_change_cfg_netkey_add_t

Parameters of Config NetKey Add

Public Members

uint16_t net_idx

NetKey Index

uint8_t net_key[16]

NetKey

struct esp_ble_mesh_state_change_cfg_netkey_update_t

Parameters of Config NetKey Update

Public Members

uint16_t net_idx

NetKey Index

uint8_t net_key[16]

NetKey

struct esp_ble_mesh_state_change_cfg_netkey_delete_t

Parameter of Config NetKey Delete

Public Members

uint16_t net_idx

NetKey Index

struct esp_ble_mesh_state_change_cfg_appkey_add_t

Parameters of Config AppKey Add

Public Members

uint16_t net_idx

NetKey Index

uint16_t app_idx

AppKey Index

uint8_t app_key[16]

AppKey

struct esp_ble_mesh_state_change_cfg_appkey_update_t

Parameters of Config AppKey Update

Public Members

uint16_t net_idx

NetKey Index

uint16_t app_idx

AppKey Index

uint8_t app_key[16]

AppKey

struct esp_ble_mesh_state_change_cfg_appkey_delete_t

Parameters of Config AppKey Delete

Public Members

uint16_t net_idx

NetKey Index

uint16_t app_idx

AppKey Index

struct esp_ble_mesh_state_change_cfg_model_app_bind_t

Parameters of Config Model App Bind

Public Members

uint16_t element_addr

Element Address

uint16_t app_idx

AppKey Index

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct esp_ble_mesh_state_change_cfg_model_app_unbind_t

Parameters of Config Model App Unbind

Public Members

uint16_t element_addr

Element Address

uint16_t app_idx

AppKey Index

uint16_t company_id

Company ID

uint16_t model_id

Model ID

struct esp_ble_mesh_state_change_cfg_kr_phase_set_t

Parameters of Config Key Refresh Phase Set

Public Members

uint16_t net_idx

NetKey Index

uint8_t kr_phase

New Key Refresh Phase Transition

struct esp_ble_mesh_cfg_server_cb_param_t

Configuration Server model callback parameters

Public Members

esp_ble_mesh_model_t *model

Pointer to the server model structure

esp_ble_mesh_msg_ctx_t ctx

Context of the received message

esp_ble_mesh_cfg_server_cb_value_t value

Value of the received configuration messages

Macros

ESP_BLE_MESH_MODEL_CFG_SRV(srv_data)

Define a new Config Server Model.

Note

The Config Server Model can only be included by a Primary Element.

Return

New Config Server Model instance.

Parameters
  • srv_data: Pointer to a unique Config Server Model user_data.

ESP_BLE_MESH_MODEL_CFG_CLI(cli_data)

Define a new Config Client Model.

Note

The Config Client Model can only be included by a Primary Element.

Return

New Config Client Model instance.

Parameters

Type Definitions

typedef struct esp_ble_mesh_cfg_srv esp_ble_mesh_cfg_srv_t

Configuration Server Model context

typedef void (*esp_ble_mesh_cfg_client_cb_t)(esp_ble_mesh_cfg_client_cb_event_t event, esp_ble_mesh_cfg_client_cb_param_t *param)

Bluetooth Mesh Config Client and Server Model functions.

Configuration Client Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

typedef void (*esp_ble_mesh_cfg_server_cb_t)(esp_ble_mesh_cfg_server_cb_event_t event, esp_ble_mesh_cfg_server_cb_param_t *param)

Configuration Server Model callback function type.

Parameters
  • event: Event type

  • param: Pointer to callback parameter

Enumerations

enum esp_ble_mesh_cfg_client_cb_event_t

This enum value is the event of Configuration Client Model

Values:

ESP_BLE_MESH_CFG_CLIENT_GET_STATE_EVT
ESP_BLE_MESH_CFG_CLIENT_SET_STATE_EVT
ESP_BLE_MESH_CFG_CLIENT_PUBLISH_EVT
ESP_BLE_MESH_CFG_CLIENT_TIMEOUT_EVT
ESP_BLE_MESH_CFG_CLIENT_EVT_MAX
enum esp_ble_mesh_cfg_server_cb_event_t

This enum value is the event of Configuration Server model

Values:

ESP_BLE_MESH_CFG_SERVER_STATE_CHANGE_EVT
ESP_BLE_MESH_CFG_SERVER_EVT_MAX

Health Client/Server Models

Functions

esp_err_t esp_ble_mesh_register_health_client_callback(esp_ble_mesh_health_client_cb_t callback)

Register BLE Mesh Health Model callback, the callback will report Health Client & Server Model events.

Return

ESP_OK on success or error code otherwise.

Parameters
  • [in] callback: Pointer to the callback function.

esp_err_t esp_ble_mesh_register_health_server_callback(esp_ble_mesh_health_server_cb_t callback)

Register BLE Mesh Health 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_health_client_get_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_health_client_get_state_t *get_state)

This function is called to get the Health Server states using the Health 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_health_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_health_client_set_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_health_client_set_state_t *set_state)

This function is called to set the Health Server states using the Health 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_health_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.

esp_err_t esp_ble_mesh_health_server_fault_update(esp_ble_mesh_elem_t *element)

This function is called by the Health Server Model to update the context of its Health Current status.

Return

ESP_OK on success or error code otherwise.

Parameters
  • [in] element: The element to which the Health Server Model belongs.

Unions

union esp_ble_mesh_health_client_get_state_t
#include <esp_ble_mesh_health_model_api.h>

For ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_GET ESP_BLE_MESH_MODEL_OP_ATTENTION_GET ESP_BLE_MESH_MODEL_OP_HEALTH_PERIOD_GET the get_state parameter in the esp_ble_mesh_health_client_get_state function should not be set to NULL.

Public Members

esp_ble_mesh_health_fault_get_t fault_get

For ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_GET.

union esp_ble_mesh_health_client_set_state_t
#include <esp_ble_mesh_health_model_api.h>

For ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_CLEAR ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_CLEAR_UNACK ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_TEST ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_TEST_UNACK ESP_BLE_MESH_MODEL_OP_HEALTH_PERIOD_SET ESP_BLE_MESH_MODEL_OP_HEALTH_PERIOD_SET_UNACK ESP_BLE_MESH_MODEL_OP_ATTENTION_SET ESP_BLE_MESH_MODEL_OP_ATTENTION_SET_UNACK the set_state parameter in the esp_ble_mesh_health_client_set_state function should not be set to NULL.

Public Members

esp_ble_mesh_health_attention_set_t attention_set

For ESP_BLE_MESH_MODEL_OP_ATTENTION_SET or ESP_BLE_MESH_MODEL_OP_ATTENTION_SET_UNACK.

esp_ble_mesh_health_period_set_t period_set

For ESP_BLE_MESH_MODEL_OP_HEALTH_PERIOD_SET or ESP_BLE_MESH_MODEL_OP_HEALTH_PERIOD_SET_UNACK.

esp_ble_mesh_health_fault_test_t fault_test

For ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_TEST or ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_TEST_UNACK.

esp_ble_mesh_health_fault_clear_t fault_clear

For ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_CLEAR or ESP_BLE_MESH_MODEL_OP_HEALTH_FAULT_CLEAR_UNACK.

union esp_ble_mesh_health_client_common_cb_param_t
#include <esp_ble_mesh_health_model_api.h>

Health Client Model received message union.

Public Members

esp_ble_mesh_health_current_status_cb_t current_status

The health current status value

esp_ble_mesh_health_fault_status_cb_t fault_status

The health fault status value

esp_ble_mesh_health_period_status_cb_t period_status

The health period status value

esp_ble_mesh_health_attention_status_cb_t attention_status

The health attention status value

union esp_ble_mesh_health_server_cb_param_t
#include <esp_ble_mesh_health_model_api.h>

Health Server Model callback parameters union.

Public Members

esp_ble_mesh_health_fault_update_comp_cb_t fault_update_comp

ESP_BLE_MESH_HEALTH_SERVER_FAULT_UPDATE_COMP_EVT

esp_ble_mesh_health_fault_clear_cb_t fault_clear

ESP_BLE_MESH_HEALTH_SERVER_FAULT_CLEAR_EVT

esp_ble_mesh_health_fault_test_cb_t fault_test

ESP_BLE_MESH_HEALTH_SERVER_FAULT_TEST_EVT

esp_ble_mesh_health_attention_on_cb_t attention_on

ESP_BLE_MESH_HEALTH_SERVER_ATTENTION_ON_EVT

esp_ble_mesh_health_attention_off_cb_t attention_off

ESP_BLE_MESH_HEALTH_SERVER_ATTENTION_OFF_EVT

Structures

struct esp_ble_mesh_health_srv_cb_t

ESP BLE Mesh Health Server callback

Public Members

esp_ble_mesh_cb_t fault_clear

Clear health registered faults. Initialized by the stack.

esp_ble_mesh_cb_t fault_test

Run a specific health test. Initialized by the stack.

esp_ble_mesh_cb_t attention_on

Health attention on callback. Initialized by the stack.

esp_ble_mesh_cb_t attention_off

Health attention off callback. Initialized by the stack.

struct esp_ble_mesh_health_test_t

ESP BLE Mesh Health Server test Context

Public Members

uint8_t id_count

Number of Health self-test ID

const uint8_t *test_ids

Array of Health self-test IDs

uint16_t company_id

Company ID used to identify the Health Fault state

uint8_t prev_test_id

Current test ID of the health fault test

uint8_t current_faults[ESP_BLE_MESH_HEALTH_FAULT_ARRAY_SIZE]

Array of current faults

uint8_t registered_faults[ESP_BLE_MESH_HEALTH_FAULT_ARRAY_SIZE]

Array of registered faults

struct esp_ble_mesh_health_srv_t

ESP BLE Mesh Health Server Model Context

Public Members

esp_ble_mesh_model_t *model

Pointer to Health Server Model

esp_ble_mesh_health_srv_cb_t health_cb

Health callback struct

struct k_delayed_work attention_timer

Attention Timer state

bool attention_timer_start

Attention Timer start flag

esp_ble_mesh_health_test_t health_test

Health Server fault test

struct esp_ble_mesh_health_fault_get_t

Parameter of Health Fault Get

Public Members

uint16_t company_id

Bluetooth assigned 16-bit Company ID

struct esp_ble_mesh_health_attention_set_t

Parameter of Health Attention Set

Public Members

uint8_t attention

Value of the Attention Timer state

struct esp_ble_mesh_health_period_set_t

Parameter of Health Period Set

Public Members

uint8_t fast_period_divisor

Divider for the Publish Period

struct esp_ble_mesh_health_fault_test_t

Parameter of Health Fault Test

Public Members

uint16_t company_id

Bluetooth assigned 16-bit Company ID

uint8_t test_id

ID of a specific test to be performed

struct esp_ble_mesh_health_fault_clear_t

Parameter of Health Fault Clear

Public Members

uint16_t company_id

Bluetooth assigned 16-bit Company ID

struct esp_ble_mesh_health_current_status_cb_t

Parameters of Health Current Status

Public Members

uint8_t test_id

ID of a most recently performed test

uint16_t company_id

Bluetooth assigned 16-bit Company ID

struct net_buf_simple *fault_array

FaultArray field contains a sequence of 1-octet fault values

struct esp_ble_mesh_health_fault_status_cb_t

Parameters of Health Fault Status

Public Members

uint8_t test_id

ID of a most recently performed test

uint16_t company_id

Bluetooth assigned 16-bit Company ID

struct net_buf_simple *fault_array

FaultArray field contains a sequence of 1-octet fault values

struct esp_ble_mesh_health_period_status_cb_t

Parameter of Health Period Status

Public Members

uint8_t fast_period_divisor

Divider for the Publish Period

struct esp_ble_mesh_health_attention_status_cb_t

Parameter of Health Attention Status

Public Members

uint8_t attention

Value of the Attention Timer state

struct esp_ble_mesh_health_client_cb_param_t

Health Client Model callback parameters

Public Members

int error_code

Appropriate error code

esp_ble_mesh_client_common_param_t *params

The client common parameters.

esp_ble_mesh_health_client_common_cb_param_t status_cb

The health message status callback values

struct esp_ble_mesh_health_fault_update_comp_cb_t

Parameter of publishing Health Current Status completion event

Public Members

int error_code

The result of publishing Health Current Status

esp_ble_mesh_elem_t *element

Pointer to the element which contains the Health Server Model

struct esp_ble_mesh_health_fault_clear_cb_t

Parameters of Health Fault Clear event

Public Members

esp_ble_mesh_model_t *model

Pointer to the Health Server Model

uint16_t company_id

Bluetooth assigned 16-bit Company ID

struct esp_ble_mesh_health_fault_test_cb_t

Parameters of Health Fault Test event

Public Members

esp_ble_mesh_model_t *model

Pointer to the Health Server Model

uint8_t test_id

ID of a specific test to be performed

uint16_t company_id

Bluetooth assigned 16-bit Company ID

struct esp_ble_mesh_health_attention_on_cb_t

Parameter of Health Attention On event

Public Members

esp_ble_mesh_model_t *model

Pointer to the Health Server Model

uint8_t time

Duration of attention timer on (in seconds)

struct esp_ble_mesh_health_attention_off_cb_t

Parameter of Health Attention Off event

Public Members

esp_ble_mesh_model_t *model

Pointer to the Health Server Model

Macros

ESP_BLE_MESH_MODEL_HEALTH_SRV(srv, pub)

Define a new Health Server Model.

Note

The Health Server Model can only be included by a Primary Element.

Return

New Health Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_HEALTH_CLI(cli_data)

Define a new Health Client Model.

Note

This API needs to be called for each element on which the application needs to have a Health Client Model.

Return

New Health Client Model instance.

Parameters

ESP_BLE_MESH_HEALTH_PUB_DEFINE(_name, _max, _role)

A helper to define a health publication context

Parameters
  • _name: Name given to the publication context variable.

  • _max: Maximum number of faults the element can have.

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

ESP_BLE_MESH_HEALTH_STANDARD_TEST

SIG identifier of Health Fault Test. 0x01 ~ 0xFF: Vendor Specific Test.

ESP_BLE_MESH_NO_FAULT

Fault values of Health Fault Test. 0x33 ~ 0x7F: Reserved for Future Use. 0x80 ~ 0xFF: Vendor Specific Warning/Error.

ESP_BLE_MESH_BATTERY_LOW_WARNING
ESP_BLE_MESH_BATTERY_LOW_ERROR
ESP_BLE_MESH_SUPPLY_VOLTAGE_TOO_LOW_WARNING
ESP_BLE_MESH_SUPPLY_VOLTAGE_TOO_LOW_ERROR
ESP_BLE_MESH_SUPPLY_VOLTAGE_TOO_HIGH_WARNING
ESP_BLE_MESH_SUPPLY_VOLTAGE_TOO_HIGH_ERROR
ESP_BLE_MESH_POWER_SUPPLY_INTERRUPTED_WARNING
ESP_BLE_MESH_POWER_SUPPLY_INTERRUPTED_ERROR
ESP_BLE_MESH_NO_LOAD_WARNING
ESP_BLE_MESH_NO_LOAD_ERROR
ESP_BLE_MESH_OVERLOAD_WARNING
ESP_BLE_MESH_OVERLOAD_ERROR
ESP_BLE_MESH_OVERHEAT_WARNING
ESP_BLE_MESH_OVERHEAT_ERROR
ESP_BLE_MESH_CONDENSATION_WARNING
ESP_BLE_MESH_CONDENSATION_ERROR
ESP_BLE_MESH_VIBRATION_WARNING
ESP_BLE_MESH_VIBRATION_ERROR
ESP_BLE_MESH_CONFIGURATION_WARNING
ESP_BLE_MESH_CONFIGURATION_ERROR
ESP_BLE_MESH_ELEMENT_NOT_CALIBRATED_WARNING
ESP_BLE_MESH_ELEMENT_NOT_CALIBRATED_ERROR
ESP_BLE_MESH_MEMORY_WARNING
ESP_BLE_MESH_MEMORY_ERROR
ESP_BLE_MESH_SELF_TEST_WARNING
ESP_BLE_MESH_SELF_TEST_ERROR
ESP_BLE_MESH_INPUT_TOO_LOW_WARNING
ESP_BLE_MESH_INPUT_TOO_LOW_ERROR
ESP_BLE_MESH_INPUT_TOO_HIGH_WARNING
ESP_BLE_MESH_INPUT_TOO_HIGH_ERROR
ESP_BLE_MESH_INPUT_NO_CHANGE_WARNING
ESP_BLE_MESH_INPUT_NO_CHANGE_ERROR
ESP_BLE_MESH_ACTUATOR_BLOCKED_WARNING
ESP_BLE_MESH_ACTUATOR_BLOCKED_ERROR
ESP_BLE_MESH_HOUSING_OPENED_WARNING
ESP_BLE_MESH_HOUSING_OPENED_ERROR
ESP_BLE_MESH_TAMPER_WARNING
ESP_BLE_MESH_TAMPER_ERROR
ESP_BLE_MESH_DEVICE_MOVED_WARNING
ESP_BLE_MESH_DEVICE_MOVED_ERROR
ESP_BLE_MESH_DEVICE_DROPPED_WARNING
ESP_BLE_MESH_DEVICE_DROPPED_ERROR
ESP_BLE_MESH_OVERFLOW_WARNING
ESP_BLE_MESH_OVERFLOW_ERROR
ESP_BLE_MESH_EMPTY_WARNING
ESP_BLE_MESH_EMPTY_ERROR
ESP_BLE_MESH_INTERNAL_BUS_WARNING
ESP_BLE_MESH_INTERNAL_BUS_ERROR
ESP_BLE_MESH_MECHANISM_JAMMED_WARNING
ESP_BLE_MESH_MECHANISM_JAMMED_ERROR
ESP_BLE_MESH_HEALTH_FAULT_ARRAY_SIZE

Type Definitions

typedef void (*esp_ble_mesh_health_client_cb_t)(esp_ble_mesh_health_client_cb_event_t event, esp_ble_mesh_health_client_cb_param_t *param)

Bluetooth Mesh Health Client and Server Model function.

Health Client Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

typedef void (*esp_ble_mesh_health_server_cb_t)(esp_ble_mesh_health_server_cb_event_t event, esp_ble_mesh_health_server_cb_param_t *param)

Health Server Model callback function type.

Parameters
  • event: Event type

  • param: Pointer to callback parameter

Enumerations

enum esp_ble_mesh_health_client_cb_event_t

This enum value is the event of Health Client Model

Values:

ESP_BLE_MESH_HEALTH_CLIENT_GET_STATE_EVT
ESP_BLE_MESH_HEALTH_CLIENT_SET_STATE_EVT
ESP_BLE_MESH_HEALTH_CLIENT_PUBLISH_EVT
ESP_BLE_MESH_HEALTH_CLIENT_TIMEOUT_EVT
ESP_BLE_MESH_HEALTH_CLIENT_EVT_MAX
enum esp_ble_mesh_health_server_cb_event_t

This enum value is the event of Health Server Model

Values:

ESP_BLE_MESH_HEALTH_SERVER_FAULT_UPDATE_COMP_EVT
ESP_BLE_MESH_HEALTH_SERVER_FAULT_CLEAR_EVT
ESP_BLE_MESH_HEALTH_SERVER_FAULT_TEST_EVT
ESP_BLE_MESH_HEALTH_SERVER_ATTENTION_ON_EVT
ESP_BLE_MESH_HEALTH_SERVER_ATTENTION_OFF_EVT
ESP_BLE_MESH_HEALTH_SERVER_EVT_MAX

Generic Client/Server Models

Functions

esp_err_t esp_ble_mesh_register_generic_client_callback(esp_ble_mesh_generic_client_cb_t callback)

Register BLE Mesh Generic 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_generic_client_get_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_generic_client_get_state_t *get_state)

Get the value of Generic Server Model states using the Generic 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_generic_message_opcode_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 generic get message value. Shall not be set to NULL.

esp_err_t esp_ble_mesh_generic_client_set_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_generic_client_set_state_t *set_state)

Set the value of Generic Server Model states using the Generic 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_generic_message_opcode_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 generic set message value. Shall not be set to NULL.

esp_err_t esp_ble_mesh_register_generic_server_callback(esp_ble_mesh_generic_server_cb_t callback)

Register BLE Mesh Generic Server Model callback.

Return

ESP_OK on success or error code otherwise.

Parameters
  • [in] callback: Pointer to the callback function.

Unions

union esp_ble_mesh_generic_client_get_state_t
#include <esp_ble_mesh_generic_model_api.h>

Generic Client Model get message union.

Public Members

esp_ble_mesh_gen_user_property_get_t user_property_get

For ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTY_GET

esp_ble_mesh_gen_admin_property_get_t admin_property_get

For ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTY_GET

esp_ble_mesh_gen_manufacturer_property_get_t manufacturer_property_get

For ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTY_SET

esp_ble_mesh_gen_client_properties_get_t client_properties_get

For ESP_BLE_MESH_MODEL_OP_GEN_CLIENT_PROPERTIES_GET

union esp_ble_mesh_generic_client_set_state_t
#include <esp_ble_mesh_generic_model_api.h>

Generic Client Model set message union.

Public Members

esp_ble_mesh_gen_onoff_set_t onoff_set

For ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET & ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET_UNACK

esp_ble_mesh_gen_level_set_t level_set

For ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_SET & ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_SET_UNACK

esp_ble_mesh_gen_delta_set_t delta_set

For ESP_BLE_MESH_MODEL_OP_GEN_DELTA_SET & ESP_BLE_MESH_MODEL_OP_GEN_DELTA_SET_UNACK

esp_ble_mesh_gen_move_set_t move_set

For ESP_BLE_MESH_MODEL_OP_GEN_MOVE_SET & ESP_BLE_MESH_MODEL_OP_GEN_MOVE_SET_UNACK

esp_ble_mesh_gen_def_trans_time_set_t def_trans_time_set

For ESP_BLE_MESH_MODEL_OP_GEN_DEF_TRANS_TIME_SET & ESP_BLE_MESH_MODEL_OP_GEN_DEF_TRANS_TIME_SET_UNACK

esp_ble_mesh_gen_onpowerup_set_t power_set

For ESP_BLE_MESH_MODEL_OP_GEN_ONPOWERUP_SET & ESP_BLE_MESH_MODEL_OP_GEN_ONPOWERUP_SET_UNACK

esp_ble_mesh_gen_power_level_set_t power_level_set

For ESP_BLE_MESH_MODEL_OP_GEN_POWER_LEVEL_SET & ESP_BLE_MESH_MODEL_OP_GEN_POWER_LEVEL_SET_UNACK

esp_ble_mesh_gen_power_default_set_t power_default_set

For ESP_BLE_MESH_MODEL_OP_GEN_POWER_DEFAULT_SET & ESP_BLE_MESH_MODEL_OP_GEN_POWER_DEFAULT_SET_UNACK

esp_ble_mesh_gen_power_range_set_t power_range_set

For ESP_BLE_MESH_MODEL_OP_GEN_POWER_RANGE_SET & ESP_BLE_MESH_MODEL_OP_GEN_POWER_RANGE_SET_UNACK

esp_ble_mesh_gen_loc_global_set_t loc_global_set

For ESP_BLE_MESH_MODEL_OP_GEN_LOC_GLOBAL_SET & ESP_BLE_MESH_MODEL_OP_GEN_LOC_GLOBAL_SET_UNACK

esp_ble_mesh_gen_loc_local_set_t loc_local_set

For ESP_BLE_MESH_MODEL_OP_GEN_LOC_LOCAL_SET & ESP_BLE_MESH_MODEL_OP_GEN_LOC_LOCAL_SET_UNACK

esp_ble_mesh_gen_user_property_set_t user_property_set

For ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTY_SET & ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTY_SET_UNACK

esp_ble_mesh_gen_admin_property_set_t admin_property_set

For ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTY_SET & ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTY_SET_UNACK

esp_ble_mesh_gen_manufacturer_property_set_t manufacturer_property_set

For ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTY_SET & ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTY_SET_UNACK

union esp_ble_mesh_gen_client_status_cb_t
#include <esp_ble_mesh_generic_model_api.h>

Generic Client Model received message union.

Public Members

esp_ble_mesh_gen_onoff_status_cb_t onoff_status

For ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_STATUS

esp_ble_mesh_gen_level_status_cb_t level_status

For ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_STATUS

esp_ble_mesh_gen_def_trans_time_status_cb_t def_trans_time_status

For ESP_BLE_MESH_MODEL_OP_GEN_DEF_TRANS_TIME_STATUS

esp_ble_mesh_gen_onpowerup_status_cb_t onpowerup_status

For ESP_BLE_MESH_MODEL_OP_GEN_ONPOWERUP_STATUS

esp_ble_mesh_gen_power_level_status_cb_t power_level_status

For ESP_BLE_MESH_MODEL_OP_GEN_POWER_LEVEL_STATUS

esp_ble_mesh_gen_power_last_status_cb_t power_last_status

For ESP_BLE_MESH_MODEL_OP_GEN_POWER_LAST_STATUS

esp_ble_mesh_gen_power_default_status_cb_t power_default_status

For ESP_BLE_MESH_MODEL_OP_GEN_POWER_DEFAULT_STATUS

esp_ble_mesh_gen_power_range_status_cb_t power_range_status

For ESP_BLE_MESH_MODEL_OP_GEN_POWER_RANGE_STATUS

esp_ble_mesh_gen_battery_status_cb_t battery_status

For ESP_BLE_MESH_MODEL_OP_GEN_BATTERY_STATUS

esp_ble_mesh_gen_loc_global_status_cb_t location_global_status

For ESP_BLE_MESH_MODEL_OP_GEN_LOC_GLOBAL_STATUS

esp_ble_mesh_gen_loc_local_status_cb_t location_local_status

ESP_BLE_MESH_MODEL_OP_GEN_LOC_LOCAL_STATUS

esp_ble_mesh_gen_user_properties_status_cb_t user_properties_status

ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTIES_STATUS

esp_ble_mesh_gen_user_property_status_cb_t user_property_status

ESP_BLE_MESH_MODEL_OP_GEN_USER_PROPERTY_STATUS

esp_ble_mesh_gen_admin_properties_status_cb_t admin_properties_status

ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTIES_STATUS

esp_ble_mesh_gen_admin_property_status_cb_t admin_property_status

ESP_BLE_MESH_MODEL_OP_GEN_ADMIN_PROPERTY_STATUS

esp_ble_mesh_gen_manufacturer_properties_status_cb_t manufacturer_properties_status

ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTIES_STATUS

esp_ble_mesh_gen_manufacturer_property_status_cb_t manufacturer_property_status

ESP_BLE_MESH_MODEL_OP_GEN_MANUFACTURER_PROPERTY_STATUS

esp_ble_mesh_gen_client_properties_status_cb_t client_properties_status

ESP_BLE_MESH_MODEL_OP_GEN_CLIENT_PROPERTIES_STATUS

union esp_ble_mesh_generic_server_state_change_t
#include <esp_ble_mesh_generic_model_api.h>

Generic Server Model state change value union.

Public Members

esp_ble_mesh_state_change_gen_onoff_set_t onoff_set

The recv_op in ctx can be used to decide which state is changed. Generic OnOff Set

esp_ble_mesh_state_change_gen_level_set_t level_set

Generic Level Set

esp_ble_mesh_state_change_gen_delta_set_t delta_set

Generic Delta Set

esp_ble_mesh_state_change_gen_move_set_t move_set

Generic Move Set

esp_ble_mesh_state_change_gen_def_trans_time_set_t def_trans_time_set

Generic Default Transition Time Set

esp_ble_mesh_state_change_gen_onpowerup_set_t onpowerup_set

Generic OnPowerUp Set

esp_ble_mesh_state_change_gen_power_level_set_t power_level_set

Generic Power Level Set

esp_ble_mesh_state_change_gen_power_default_set_t power_default_set

Generic Power Default Set

esp_ble_mesh_state_change_gen_power_range_set_t power_range_set

Generic Power Range Set

esp_ble_mesh_state_change_gen_loc_global_set_t loc_global_set

Generic Location Global Set

esp_ble_mesh_state_change_gen_loc_local_set_t loc_local_set

Generic Location Local Set

esp_ble_mesh_state_change_gen_user_property_set_t user_property_set

Generic User Property Set

esp_ble_mesh_state_change_gen_admin_property_set_t admin_property_set

Generic Admin Property Set

esp_ble_mesh_state_change_gen_manu_property_set_t manu_property_set

Generic Manufacturer Property Set

union esp_ble_mesh_generic_server_recv_get_msg_t
#include <esp_ble_mesh_generic_model_api.h>

Generic Server Model received get message union.

Public Members

esp_ble_mesh_server_recv_gen_user_property_get_t user_property

Generic User Property Get

esp_ble_mesh_server_recv_gen_admin_property_get_t admin_property

Generic Admin Property Get

esp_ble_mesh_server_recv_gen_manufacturer_property_get_t manu_property

Generic Manufacturer Property Get

esp_ble_mesh_server_recv_gen_client_properties_get_t client_properties

Generic Client Properties Get

union esp_ble_mesh_generic_server_recv_set_msg_t
#include <esp_ble_mesh_generic_model_api.h>

Generic Server Model received set message union.

Public Members

esp_ble_mesh_server_recv_gen_onoff_set_t onoff

Generic OnOff Set/Generic OnOff Set Unack

esp_ble_mesh_server_recv_gen_level_set_t level

Generic Level Set/Generic Level Set Unack

esp_ble_mesh_server_recv_gen_delta_set_t delta

Generic Delta Set/Generic Delta Set Unack

esp_ble_mesh_server_recv_gen_move_set_t move

Generic Move Set/Generic Move Set Unack

esp_ble_mesh_server_recv_gen_def_trans_time_set_t def_trans_time

Generic Default Transition Time Set/Generic Default Transition Time Set Unack

esp_ble_mesh_server_recv_gen_onpowerup_set_t onpowerup

Generic OnPowerUp Set/Generic OnPowerUp Set Unack

esp_ble_mesh_server_recv_gen_power_level_set_t power_level

Generic Power Level Set/Generic Power Level Set Unack

esp_ble_mesh_server_recv_gen_power_default_set_t power_default

Generic Power Default Set/Generic Power Default Set Unack

esp_ble_mesh_server_recv_gen_power_range_set_t power_range

Generic Power Range Set/Generic Power Range Set Unack

esp_ble_mesh_server_recv_gen_loc_global_set_t location_global

Generic Location Global Set/Generic Location Global Set Unack

esp_ble_mesh_server_recv_gen_loc_local_set_t location_local

Generic Location Local Set/Generic Location Local Set Unack

esp_ble_mesh_server_recv_gen_user_property_set_t user_property

Generic User Property Set/Generic User Property Set Unack

esp_ble_mesh_server_recv_gen_admin_property_set_t admin_property

Generic Admin Property Set/Generic Admin Property Set Unack

esp_ble_mesh_server_recv_gen_manufacturer_property_set_t manu_property

Generic Manufacturer Property Set/Generic Manufacturer Property Set Unack

union esp_ble_mesh_generic_server_cb_value_t
#include <esp_ble_mesh_generic_model_api.h>

Generic Server Model callback value union.

Public Members

esp_ble_mesh_generic_server_state_change_t state_change

ESP_BLE_MESH_GENERIC_SERVER_STATE_CHANGE_EVT

esp_ble_mesh_generic_server_recv_get_msg_t get

ESP_BLE_MESH_GENERIC_SERVER_RECV_GET_MSG_EVT

esp_ble_mesh_generic_server_recv_set_msg_t set

ESP_BLE_MESH_GENERIC_SERVER_RECV_SET_MSG_EVT

Structures

struct esp_ble_mesh_gen_onoff_set_t

Bluetooth Mesh Generic Client Model Get and Set parameters structure.

Parameters of Generic OnOff Set.

Public Members

bool op_en

Indicate if optional parameters are included

uint8_t onoff

Target value of Generic OnOff state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_gen_level_set_t

Parameters of Generic Level Set.

Public Members

bool op_en

Indicate if optional parameters are included

int16_t level

Target value of Generic Level state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_gen_delta_set_t

Parameters of Generic Delta Set.

Public Members

bool op_en

Indicate if optional parameters are included

int32_t level

Delta change of Generic Level state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_gen_move_set_t

Parameters of Generic Move Set.

Public Members

bool op_en

Indicate if optional parameters are included

int16_t delta_level

Delta Level step to calculate Move speed for Generic Level state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_gen_def_trans_time_set_t

Parameter of Generic Default Transition Time Set.

Public Members

uint8_t trans_time

The value of the Generic Default Transition Time state

struct esp_ble_mesh_gen_onpowerup_set_t

Parameter of Generic OnPowerUp Set.

Public Members

uint8_t onpowerup

The value of the Generic OnPowerUp state

struct esp_ble_mesh_gen_power_level_set_t

Parameters of Generic Power Level Set.

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t power

Target value of Generic Power Actual state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_gen_power_default_set_t

Parameter of Generic Power Default Set.

Public Members

uint16_t power

The value of the Generic Power Default state

struct esp_ble_mesh_gen_power_range_set_t

Parameters of Generic Power Range Set.

Public Members

uint16_t range_min

Value of Range Min field of Generic Power Range state

uint16_t range_max

Value of Range Max field of Generic Power Range state

struct esp_ble_mesh_gen_loc_global_set_t

Parameters of Generic Location Global Set.

Public Members

int32_t global_latitude

Global Coordinates (Latitude)

int32_t global_longitude

Global Coordinates (Longitude)

int16_t global_altitude

Global Altitude

struct esp_ble_mesh_gen_loc_local_set_t

Parameters of Generic Location Local Set.

Public Members

int16_t local_north

Local Coordinates (North)

int16_t local_east

Local Coordinates (East)

int16_t local_altitude

Local Altitude

uint8_t floor_number

Floor Number

uint16_t uncertainty

Uncertainty

struct esp_ble_mesh_gen_user_property_get_t

Parameter of Generic User Property Get.

Public Members

uint16_t property_id

Property ID identifying a Generic User Property

struct esp_ble_mesh_gen_user_property_set_t

Parameters of Generic User Property Set.

Public Members

uint16_t property_id

Property ID identifying a Generic User Property

struct net_buf_simple *property_value

Raw value for the User Property

struct esp_ble_mesh_gen_admin_property_get_t

Parameter of Generic Admin Property Get.

Public Members

uint16_t property_id

Property ID identifying a Generic Admin Property

struct esp_ble_mesh_gen_admin_property_set_t

Parameters of Generic Admin Property Set.

Public Members

uint16_t property_id

Property ID identifying a Generic Admin Property

uint8_t user_access

Enumeration indicating user access

struct net_buf_simple *property_value

Raw value for the Admin Property

struct esp_ble_mesh_gen_manufacturer_property_get_t

Parameter of Generic Manufacturer Property Get.

Public Members

uint16_t property_id

Property ID identifying a Generic Manufacturer Property

struct esp_ble_mesh_gen_manufacturer_property_set_t

Parameters of Generic Manufacturer Property Set.

Public Members

uint16_t property_id

Property ID identifying a Generic Manufacturer Property

uint8_t user_access

Enumeration indicating user access

struct esp_ble_mesh_gen_client_properties_get_t

Parameter of Generic Client Properties Get.

Public Members

uint16_t property_id

A starting Client Property ID present within an element

struct esp_ble_mesh_gen_onoff_status_cb_t

Bluetooth Mesh Generic Client Model Get and Set callback parameters structure.

Parameters of Generic OnOff Status.

Public Members

bool op_en

Indicate if optional parameters are included

uint8_t present_onoff

Current value of Generic OnOff state

uint8_t target_onoff

Target value of Generic OnOff state (optional)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_gen_level_status_cb_t

Parameters of Generic Level Status.

Public Members

bool op_en

Indicate if optional parameters are included

int16_t present_level

Current value of Generic Level state

int16_t target_level

Target value of the Generic Level state (optional)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_gen_def_trans_time_status_cb_t

Parameter of Generic Default Transition Time Status.

Public Members

uint8_t trans_time

The value of the Generic Default Transition Time state

struct esp_ble_mesh_gen_onpowerup_status_cb_t

Parameter of Generic OnPowerUp Status.

Public Members

uint8_t onpowerup

The value of the Generic OnPowerUp state

struct esp_ble_mesh_gen_power_level_status_cb_t

Parameters of Generic Power Level Status.

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t present_power

Current value of Generic Power Actual state

uint16_t target_power

Target value of Generic Power Actual state (optional)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_gen_power_last_status_cb_t

Parameter of Generic Power Last Status.

Public Members

uint16_t power

The value of the Generic Power Last state

struct esp_ble_mesh_gen_power_default_status_cb_t

Parameter of Generic Power Default Status.

Public Members

uint16_t power

The value of the Generic Default Last state

struct esp_ble_mesh_gen_power_range_status_cb_t

Parameters of Generic Power Range Status.

Public Members

uint8_t status_code

Status Code for the request message

uint16_t range_min

Value of Range Min field of Generic Power Range state

uint16_t range_max

Value of Range Max field of Generic Power Range state

struct esp_ble_mesh_gen_battery_status_cb_t

Parameters of Generic Battery Status.

Public Members

uint32_t battery_level : 8

Value of Generic Battery Level state

uint32_t time_to_discharge : 24

Value of Generic Battery Time to Discharge state

uint32_t time_to_charge : 24

Value of Generic Battery Time to Charge state

uint32_t flags : 8

Value of Generic Battery Flags state

struct esp_ble_mesh_gen_loc_global_status_cb_t

Parameters of Generic Location Global Status.

Public Members

int32_t global_latitude

Global Coordinates (Latitude)

int32_t global_longitude

Global Coordinates (Longitude)

int16_t global_altitude

Global Altitude

struct esp_ble_mesh_gen_loc_local_status_cb_t

Parameters of Generic Location Local Status.

Public Members

int16_t local_north

Local Coordinates (North)

int16_t local_east

Local Coordinates (East)

int16_t local_altitude

Local Altitude

uint8_t floor_number

Floor Number

uint16_t uncertainty

Uncertainty

struct esp_ble_mesh_gen_user_properties_status_cb_t

Parameter of Generic User Properties Status.

Public Members

struct net_buf_simple *property_ids

Buffer contains a sequence of N User Property IDs

struct esp_ble_mesh_gen_user_property_status_cb_t

Parameters of Generic User Property Status.

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t property_id

Property ID identifying a Generic User Property

uint8_t user_access

Enumeration indicating user access (optional)

struct net_buf_simple *property_value

Raw value for the User Property (C.1)

struct esp_ble_mesh_gen_admin_properties_status_cb_t

Parameter of Generic Admin Properties Status.

Public Members

struct net_buf_simple *property_ids

Buffer contains a sequence of N Admin Property IDs

struct esp_ble_mesh_gen_admin_property_status_cb_t

Parameters of Generic Admin Property Status.

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t property_id

Property ID identifying a Generic Admin Property

uint8_t user_access

Enumeration indicating user access (optional)

struct net_buf_simple *property_value

Raw value for the Admin Property (C.1)

struct esp_ble_mesh_gen_manufacturer_properties_status_cb_t

Parameter of Generic Manufacturer Properties Status.

Public Members

struct net_buf_simple *property_ids

Buffer contains a sequence of N Manufacturer Property IDs

struct esp_ble_mesh_gen_manufacturer_property_status_cb_t

Parameters of Generic Manufacturer Property Status.

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t property_id

Property ID identifying a Generic Manufacturer Property

uint8_t user_access

Enumeration indicating user access (optional)

struct net_buf_simple *property_value

Raw value for the Manufacturer Property (C.1)

struct esp_ble_mesh_gen_client_properties_status_cb_t

Parameter of Generic Client Properties Status.

Public Members

struct net_buf_simple *property_ids

Buffer contains a sequence of N Client Property IDs

struct esp_ble_mesh_generic_client_cb_param_t

Generic Client Model callback parameters

Public Members

int error_code

Appropriate error code

esp_ble_mesh_client_common_param_t *params

The client common parameters.

esp_ble_mesh_gen_client_status_cb_t status_cb

The generic status message callback values

struct esp_ble_mesh_gen_onoff_state_t

Parameters of Generic OnOff state

Public Members

uint8_t onoff

The present value of the Generic OnOff state

uint8_t target_onoff

The target value of the Generic OnOff state

struct esp_ble_mesh_gen_onoff_srv_t

User data of Generic OnOff Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic OnOff Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_onoff_state_t state

Parameters of the Generic OnOff state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

struct esp_ble_mesh_gen_level_state_t

Parameters of Generic Level state

Public Members

int16_t level

The present value of the Generic Level state

int16_t target_level

The target value of the Generic Level state

int16_t last_level

When a new transaction starts, level should be set to last_last, and use “level + incoming delta” to calculate the target level. In another word, “last_level” is used to record “level” of the last transaction, and “last_delta” is used to record the previously received delta_level value. The last value of the Generic Level state

int32_t last_delta

The last delta change of the Generic Level state

bool move_start

Indicate if the transition of the Generic Level state has been started

bool positive

Indicate if the transition is positive or negative

struct esp_ble_mesh_gen_level_srv_t

User data of Generic Level Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Level Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_level_state_t state

Parameters of the Generic Level state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

int32_t tt_delta_level

Delta change value of level state transition

struct esp_ble_mesh_gen_def_trans_time_state_t

Parameter of Generic Default Transition Time state

Public Members

uint8_t trans_time

The value of the Generic Default Transition Time state

struct esp_ble_mesh_gen_def_trans_time_srv_t

User data of Generic Default Transition Time Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Default Transition Time Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_def_trans_time_state_t state

Parameters of the Generic Default Transition Time state

struct esp_ble_mesh_gen_onpowerup_state_t

Parameter of Generic OnPowerUp state

Public Members

uint8_t onpowerup

The value of the Generic OnPowerUp state

struct esp_ble_mesh_gen_power_onoff_srv_t

User data of Generic Power OnOff Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Power OnOff Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_onpowerup_state_t *state

Parameters of the Generic OnPowerUp state

struct esp_ble_mesh_gen_power_onoff_setup_srv_t

User data of Generic Power OnOff Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Power OnOff Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_onpowerup_state_t *state

Parameters of the Generic OnPowerUp state

struct esp_ble_mesh_gen_power_level_state_t

Parameters of Generic Power Level state

Public Members

uint16_t power_actual

The present value of the Generic Power Actual state

uint16_t target_power_actual

The target value of the Generic Power Actual state

uint16_t power_last

The value of the Generic Power Last state

uint16_t power_default

The value of the Generic Power Default state

uint8_t status_code

The status code of setting Generic Power Range state

uint16_t power_range_min

The minimum value of the Generic Power Range state

uint16_t power_range_max

The maximum value of the Generic Power Range state

struct esp_ble_mesh_gen_power_level_srv_t

User data of Generic Power Level Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Power Level Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_power_level_state_t *state

Parameters of the Generic Power Level state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

int32_t tt_delta_level

Delta change value of level state transition

struct esp_ble_mesh_gen_power_level_setup_srv_t

User data of Generic Power Level Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Power Level Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_power_level_state_t *state

Parameters of the Generic Power Level state

struct esp_ble_mesh_gen_battery_state_t

Parameters of Generic Battery state

Public Members

uint32_t battery_level : 8

The value of the Generic Battery Level state

uint32_t time_to_discharge : 24

The value of the Generic Battery Time to Discharge state

uint32_t time_to_charge : 24

The value of the Generic Battery Time to Charge state

uint32_t battery_flags : 8

The value of the Generic Battery Flags state

struct esp_ble_mesh_gen_battery_srv_t

User data of Generic Battery Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Battery Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_battery_state_t state

Parameters of the Generic Battery state

struct esp_ble_mesh_gen_location_state_t

Parameters of Generic Location state

Public Members

int32_t global_latitude

The value of the Global Latitude field

int32_t global_longitude

The value of the Global Longitude field

int16_t global_altitude

The value of the Global Altitude field

int16_t local_north

The value of the Local North field

int16_t local_east

The value of the Local East field

int16_t local_altitude

The value of the Local Altitude field

uint8_t floor_number

The value of the Floor Number field

uint16_t uncertainty

The value of the Uncertainty field

struct esp_ble_mesh_gen_location_srv_t

User data of Generic Location Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Location Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_location_state_t *state

Parameters of the Generic Location state

struct esp_ble_mesh_gen_location_setup_srv_t

User data of Generic Location Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Location Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_gen_location_state_t *state

Parameters of the Generic Location state

struct esp_ble_mesh_generic_property_t

Parameters of Generic Property states

Public Members

uint16_t id

The value of User/Admin/Manufacturer Property ID

uint8_t user_access

The value of User Access field

uint8_t admin_access

The value of Admin Access field

uint8_t manu_access

The value of Manufacturer Access field

struct net_buf_simple *val

The value of User/Admin/Manufacturer Property

struct esp_ble_mesh_gen_user_prop_srv_t

User data of Generic User Property Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic User Property Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

uint8_t property_count

Generic User Property count

esp_ble_mesh_generic_property_t *properties

Parameters of the Generic User Property state

struct esp_ble_mesh_gen_admin_prop_srv_t

User data of Generic Admin Property Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Admin Property Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

uint8_t property_count

Generic Admin Property count

esp_ble_mesh_generic_property_t *properties

Parameters of the Generic Admin Property state

struct esp_ble_mesh_gen_manu_prop_srv_t

User data of Generic Manufacturer Property Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Manufacturer Property Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

uint8_t property_count

Generic Manufacturer Property count

esp_ble_mesh_generic_property_t *properties

Parameters of the Generic Manufacturer Property state

struct esp_ble_mesh_gen_client_prop_srv_t

User data of Generic Client Property Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Generic Client Property Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

uint8_t id_count

Generic Client Property ID count

uint16_t *property_ids

Parameters of the Generic Client Property state

struct esp_ble_mesh_state_change_gen_onoff_set_t

Parameter of Generic OnOff Set state change event

Public Members

uint8_t onoff

The value of Generic OnOff state

struct esp_ble_mesh_state_change_gen_level_set_t

Parameter of Generic Level Set state change event

Public Members

int16_t level

The value of Generic Level state

struct esp_ble_mesh_state_change_gen_delta_set_t

Parameter of Generic Delta Set state change event

Public Members

int16_t level

The value of Generic Level state

struct esp_ble_mesh_state_change_gen_move_set_t

Parameter of Generic Move Set state change event

Public Members

int16_t level

The value of Generic Level state

struct esp_ble_mesh_state_change_gen_def_trans_time_set_t

Parameter of Generic Default Transition Time Set state change event

Public Members

uint8_t trans_time

The value of Generic Default Transition Time state

struct esp_ble_mesh_state_change_gen_onpowerup_set_t

Parameter of Generic OnPowerUp Set state change event

Public Members

uint8_t onpowerup

The value of Generic OnPowerUp state

struct esp_ble_mesh_state_change_gen_power_level_set_t

Parameter of Generic Power Level Set state change event

Public Members

uint16_t power

The value of Generic Power Actual state

struct esp_ble_mesh_state_change_gen_power_default_set_t

Parameter of Generic Power Default Set state change event

Public Members

uint16_t power

The value of Generic Power Default state

struct esp_ble_mesh_state_change_gen_power_range_set_t

Parameters of Generic Power Range Set state change event

Public Members

uint16_t range_min

The minimum value of Generic Power Range state

uint16_t range_max

The maximum value of Generic Power Range state

struct esp_ble_mesh_state_change_gen_loc_global_set_t

Parameters of Generic Location Global Set state change event

Public Members

int32_t latitude

The Global Latitude value of Generic Location state

int32_t longitude

The Global Longitude value of Generic Location state

int16_t altitude

The Global Altitude value of Generic Location state

struct esp_ble_mesh_state_change_gen_loc_local_set_t

Parameters of Generic Location Local Set state change event

Public Members

int16_t north

The Local North value of Generic Location state

int16_t east

The Local East value of Generic Location state

int16_t altitude

The Local Altitude value of Generic Location state

uint8_t floor_number

The Floor Number value of Generic Location state

uint16_t uncertainty

The Uncertainty value of Generic Location state

struct esp_ble_mesh_state_change_gen_user_property_set_t

Parameters of Generic User Property Set state change event

Public Members

uint16_t id

The property id of Generic User Property state

struct net_buf_simple *value

The property value of Generic User Property state

struct esp_ble_mesh_state_change_gen_admin_property_set_t

Parameters of Generic Admin Property Set state change event

Public Members

uint16_t id

The property id of Generic Admin Property state

uint8_t access

The property access of Generic Admin Property state

struct net_buf_simple *value

The property value of Generic Admin Property state

struct esp_ble_mesh_state_change_gen_manu_property_set_t

Parameters of Generic Manufacturer Property Set state change event

Public Members

uint16_t id

The property id of Generic Manufacturer Property state

uint8_t access

The property value of Generic Manufacturer Property state

struct esp_ble_mesh_server_recv_gen_user_property_get_t

Context of the received Generic User Property Get message

Public Members

uint16_t property_id

Property ID identifying a Generic User Property

struct esp_ble_mesh_server_recv_gen_admin_property_get_t

Context of the received Generic Admin Property Get message

Public Members

uint16_t property_id

Property ID identifying a Generic Admin Property

struct esp_ble_mesh_server_recv_gen_manufacturer_property_get_t

Context of the received Generic Manufacturer Property message

Public Members

uint16_t property_id

Property ID identifying a Generic Manufacturer Property

struct esp_ble_mesh_server_recv_gen_client_properties_get_t

Context of the received Generic Client Properties Get message

Public Members

uint16_t property_id

A starting Client Property ID present within an element

struct esp_ble_mesh_server_recv_gen_onoff_set_t

Context of the received Generic OnOff Set message

Public Members

bool op_en

Indicate if optional parameters are included

uint8_t onoff

Target value of Generic OnOff state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_gen_level_set_t

Context of the received Generic Level Set message

Public Members

bool op_en

Indicate if optional parameters are included

int16_t level

Target value of Generic Level state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_gen_delta_set_t

Context of the received Generic Delta Set message

Public Members

bool op_en

Indicate if optional parameters are included

int32_t delta_level

Delta change of Generic Level state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_gen_move_set_t

Context of the received Generic Move Set message

Public Members

bool op_en

Indicate if optional parameters are included

int16_t delta_level

Delta Level step to calculate Move speed for Generic Level state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_gen_def_trans_time_set_t

Context of the received Generic Default Transition Time Set message

Public Members

uint8_t trans_time

The value of the Generic Default Transition Time state

struct esp_ble_mesh_server_recv_gen_onpowerup_set_t

Context of the received Generic OnPowerUp Set message

Public Members

uint8_t onpowerup

The value of the Generic OnPowerUp state

struct esp_ble_mesh_server_recv_gen_power_level_set_t

Context of the received Generic Power Level Set message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t power

Target value of Generic Power Actual state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_gen_power_default_set_t

Context of the received Generic Power Default Set message

Public Members

uint16_t power

The value of the Generic Power Default state

struct esp_ble_mesh_server_recv_gen_power_range_set_t

Context of the received Generic Power Range Set message

Public Members

uint16_t range_min

Value of Range Min field of Generic Power Range state

uint16_t range_max

Value of Range Max field of Generic Power Range state

struct esp_ble_mesh_server_recv_gen_loc_global_set_t

Context of the received Generic Location Global Set message

Public Members

int32_t global_latitude

Global Coordinates (Latitude)

int32_t global_longitude

Global Coordinates (Longitude)

int16_t global_altitude

Global Altitude

struct esp_ble_mesh_server_recv_gen_loc_local_set_t

Context of the received Generic Location Local Set message

Public Members

int16_t local_north

Local Coordinates (North)

int16_t local_east

Local Coordinates (East)

int16_t local_altitude

Local Altitude

uint8_t floor_number

Floor Number

uint16_t uncertainty

Uncertainty

struct esp_ble_mesh_server_recv_gen_user_property_set_t

Context of the received Generic User Property Set message

Public Members

uint16_t property_id

Property ID identifying a Generic User Property

struct net_buf_simple *property_value

Raw value for the User Property

struct esp_ble_mesh_server_recv_gen_admin_property_set_t

Context of the received Generic Admin Property Set message

Public Members

uint16_t property_id

Property ID identifying a Generic Admin Property

uint8_t user_access

Enumeration indicating user access

struct net_buf_simple *property_value

Raw value for the Admin Property

struct esp_ble_mesh_server_recv_gen_manufacturer_property_set_t

Context of the received Generic Manufacturer Property Set message

Public Members

uint16_t property_id

Property ID identifying a Generic Manufacturer Property

uint8_t user_access

Enumeration indicating user access

struct esp_ble_mesh_generic_server_cb_param_t

Generic Server Model callback parameters

Public Members

esp_ble_mesh_model_t *model

Pointer to Generic Server Models

esp_ble_mesh_msg_ctx_t ctx

Context of the received messages

esp_ble_mesh_generic_server_cb_value_t value

Value of the received Generic Messages

Macros

ESP_BLE_MESH_MODEL_GEN_ONOFF_CLI(cli_pub, cli_data)

Define a new Generic OnOff Client Model.

Note

This API needs to be called for each element on which the application needs to have a Generic OnOff Client Model.

Return

New Generic OnOff Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_LEVEL_CLI(cli_pub, cli_data)

Define a new Generic Level Client Model.

Note

This API needs to be called for each element on which the application needs to have a Generic Level Client Model.

Return

New Generic Level Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_DEF_TRANS_TIME_CLI(cli_pub, cli_data)

Define a new Generic Default Transition Time Client Model.

Note

This API needs to be called for each element on which the application needs to have a Generic Default Transition Time Client Model.

Return

New Generic Default Transition Time Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_POWER_ONOFF_CLI(cli_pub, cli_data)

Define a new Generic Power OnOff Client Model.

Note

This API needs to be called for each element on which the application needs to have a Generic Power OnOff Client Model.

Return

New Generic Power OnOff Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_POWER_LEVEL_CLI(cli_pub, cli_data)

Define a new Generic Power Level Client Model.

Note

This API needs to be called for each element on which the application needs to have a Generic Power Level Client Model.

Return

New Generic Power Level Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_BATTERY_CLI(cli_pub, cli_data)

Define a new Generic Battery Client Model.

Note

This API needs to be called for each element on which the application needs to have a Generic Battery Client Model.

Return

New Generic Battery Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_LOCATION_CLI(cli_pub, cli_data)

Define a new Generic Location Client Model.

Note

This API needs to be called for each element on which the application needs to have a Generic Location Client Model.

Return

New Generic Location Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_PROPERTY_CLI(cli_pub, cli_data)

Define a new Generic Property Client Model.

Note

This API needs to be called for each element on which the application needs to have a Generic Property Client Model.

Return

New Generic Location Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_ONOFF_SRV(srv_pub, srv_data)

Generic Server Models related context.

Define a new Generic OnOff Server Model.

Note

1. The Generic OnOff Server Model is a root model.

  1. This model shall support model publication and model subscription.

Return

New Generic OnOff Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_LEVEL_SRV(srv_pub, srv_data)

Define a new Generic Level Server Model.

Note

1. The Generic Level Server Model is a root model.

  1. This model shall support model publication and model subscription.

Return

New Generic Level Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_DEF_TRANS_TIME_SRV(srv_pub, srv_data)

Define a new Generic Default Transition Time Server Model.

Note

1. The Generic Default Transition Time Server Model is a root model.

  1. This model shall support model publication and model subscription.

Return

New Generic Default Transition Time Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_POWER_ONOFF_SRV(srv_pub, srv_data)

Define a new Generic Power OnOff Server Model.

Note

1. The Generic Power OnOff Server model extends the Generic OnOff Server model. When this model is present on an element, the corresponding Generic Power OnOff Setup Server model shall also be present.

  1. This model may be used to represent a variety of devices that do not fit any of the model descriptions that have been defined but support the generic properties of On/Off.

  2. This model shall support model publication and model subscription.

Return

New Generic Power OnOff Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_POWER_ONOFF_SETUP_SRV(srv_pub, srv_data)

Define a new Generic Power OnOff Setup Server Model.

Note

1. The Generic Power OnOff Setup Server model extends the Generic Power OnOff Server model and the Generic Default Transition Time Server model.

  1. This model shall support model subscription.

Return

New Generic Power OnOff Setup Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_POWER_LEVEL_SRV(srv_pub, srv_data)

Define a new Generic Power Level Server Model.

Note

1. The Generic Power Level Server model extends the Generic Power OnOff Server model and the Generic Level Server model. When this model is present on an Element, the corresponding Generic Power Level Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

Return

New Generic Power Level Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_POWER_LEVEL_SETUP_SRV(srv_pub, srv_data)

Define a new Generic Power Level Setup Server Model.

Note

1. The Generic Power Level Setup Server model extends the Generic Power Level Server model and the Generic Power OnOff Setup Server model.

  1. This model shall support model subscription.

Return

New Generic Power Level Setup Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_BATTERY_SRV(srv_pub, srv_data)

Define a new Generic Battery Server Model.

Note

1. The Generic Battery Server Model is a root model.

  1. This model shall support model publication and model subscription.

  2. The model may be used to represent an element that is powered by a battery.

Return

New Generic Battery Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_LOCATION_SRV(srv_pub, srv_data)

Define a new Generic Location Server Model.

Note

1. The Generic Location Server model is a root model. When this model is present on an Element, the corresponding Generic Location Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

  2. The model may be used to represent an element that knows its location (global or local).

Return

New Generic Location Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_LOCATION_SETUP_SRV(srv_pub, srv_data)

Define a new Generic Location Setup Server Model.

Note

1. The Generic Location Setup Server model extends the Generic Location Server model.

  1. This model shall support model subscription.

Return

New Generic Location Setup Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_USER_PROP_SRV(srv_pub, srv_data)

Define a new Generic User Property Server Model.

Note

1. The Generic User Property Server model is a root model.

  1. This model shall support model publication and model subscription.

Return

New Generic User Property Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_ADMIN_PROP_SRV(srv_pub, srv_data)

Define a new Generic Admin Property Server Model.

Note

1. The Generic Admin Property Server model extends the Generic User Property Server model.

  1. This model shall support model publication and model subscription.

Return

New Generic Admin Property Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_MANUFACTURER_PROP_SRV(srv_pub, srv_data)

Define a new Generic Manufacturer Property Server Model.

Note

1. The Generic Manufacturer Property Server model extends the Generic User Property Server model.

  1. This model shall support model publication and model subscription.

Return

New Generic Manufacturer Property Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_GEN_CLIENT_PROP_SRV(srv_pub, srv_data)

Define a new Generic User Property Server Model.

Note

1. The Generic Client Property Server model is a root model.

  1. This model shall support model publication and model subscription.

Return

New Generic Client Property Server Model instance.

Parameters

Type Definitions

typedef void (*esp_ble_mesh_generic_client_cb_t)(esp_ble_mesh_generic_client_cb_event_t event, esp_ble_mesh_generic_client_cb_param_t *param)

Bluetooth Mesh Generic Client Model function.

Generic Client Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

typedef void (*esp_ble_mesh_generic_server_cb_t)(esp_ble_mesh_generic_server_cb_event_t event, esp_ble_mesh_generic_server_cb_param_t *param)

Bluetooth Mesh Generic Server Model function.

Generic Server Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

Enumerations

enum esp_ble_mesh_generic_client_cb_event_t

This enum value is the event of Generic Client Model

Values:

ESP_BLE_MESH_GENERIC_CLIENT_GET_STATE_EVT
ESP_BLE_MESH_GENERIC_CLIENT_SET_STATE_EVT
ESP_BLE_MESH_GENERIC_CLIENT_PUBLISH_EVT
ESP_BLE_MESH_GENERIC_CLIENT_TIMEOUT_EVT
ESP_BLE_MESH_GENERIC_CLIENT_EVT_MAX
enum esp_ble_mesh_gen_user_prop_access_t

This enum value is the access value of Generic User Property

Values:

ESP_BLE_MESH_GEN_USER_ACCESS_PROHIBIT
ESP_BLE_MESH_GEN_USER_ACCESS_READ
ESP_BLE_MESH_GEN_USER_ACCESS_WRITE
ESP_BLE_MESH_GEN_USER_ACCESS_READ_WRITE
enum esp_ble_mesh_gen_admin_prop_access_t

This enum value is the access value of Generic Admin Property

Values:

ESP_BLE_MESH_GEN_ADMIN_NOT_USER_PROP
ESP_BLE_MESH_GEN_ADMIN_ACCESS_READ
ESP_BLE_MESH_GEN_ADMIN_ACCESS_WRITE
ESP_BLE_MESH_GEN_ADMIN_ACCESS_READ_WRITE
enum esp_ble_mesh_gen_manu_prop_access_t

This enum value is the access value of Generic Manufacturer Property

Values:

ESP_BLE_MESH_GEN_MANU_NOT_USER_PROP
ESP_BLE_MESH_GEN_MANU_ACCESS_READ
enum esp_ble_mesh_generic_server_cb_event_t

This enum value is the event of Generic Server Model

Values:

ESP_BLE_MESH_GENERIC_SERVER_STATE_CHANGE_EVT

  1. When get_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, no event will be callback to the application layer when Generic Get messages are received.

  2. When set_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, this event will be callback to the application layer when Generic Set/Set Unack messages are received.

ESP_BLE_MESH_GENERIC_SERVER_RECV_GET_MSG_EVT

When get_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when Generic Get messages are received.

ESP_BLE_MESH_GENERIC_SERVER_RECV_SET_MSG_EVT

When set_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when Generic Set/Set Unack messages are received.

ESP_BLE_MESH_GENERIC_SERVER_EVT_MAX

Sensor Client/Server Models

Functions

esp_err_t esp_ble_mesh_register_sensor_client_callback(esp_ble_mesh_sensor_client_cb_t callback)

Register BLE Mesh Sensor 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_sensor_client_get_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_sensor_client_get_state_t *get_state)

Get the value of Sensor Server Model states using the Sensor Client Model get messages.

Note

If you want to know the opcodes and corresponding meanings accepted by this API, please refer to esp_ble_mesh_sensor_message_opcode_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 sensor get message value. Shall not be set to NULL.

esp_err_t esp_ble_mesh_sensor_client_set_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_sensor_client_set_state_t *set_state)

Set the value of Sensor Server Model states using the Sensor Client Model set messages.

Note

If you want to know the opcodes and corresponding meanings accepted by this API, please refer to esp_ble_mesh_sensor_message_opcode_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 sensor set message value. Shall not be set to NULL.

esp_err_t esp_ble_mesh_register_sensor_server_callback(esp_ble_mesh_sensor_server_cb_t callback)

Register BLE Mesh Sensor Server Model callback.

Return

ESP_OK on success or error code otherwise.

Parameters
  • [in] callback: Pointer to the callback function.

Unions

union esp_ble_mesh_sensor_client_get_state_t
#include <esp_ble_mesh_sensor_model_api.h>

Sensor Client Model get message union.

Public Members

esp_ble_mesh_sensor_descriptor_get_t descriptor_get

For ESP_BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_GET

esp_ble_mesh_sensor_cadence_get_t cadence_get

For ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_GET

esp_ble_mesh_sensor_settings_get_t settings_get

For ESP_BLE_MESH_MODEL_OP_SENSOR_SETTINGS_GET

esp_ble_mesh_sensor_setting_get_t setting_get

For ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_GET

esp_ble_mesh_sensor_get_t sensor_get

For ESP_BLE_MESH_MODEL_OP_SENSOR_GET

esp_ble_mesh_sensor_column_get_t column_get

For ESP_BLE_MESH_MODEL_OP_SENSOR_COLUMN_GET

esp_ble_mesh_sensor_series_get_t series_get

For ESP_BLE_MESH_MODEL_OP_SENSOR_SERIES_GET

union esp_ble_mesh_sensor_client_set_state_t
#include <esp_ble_mesh_sensor_model_api.h>

Sensor Client Model set message union.

Public Members

esp_ble_mesh_sensor_cadence_set_t cadence_set

For ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_SET & ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_SET_UNACK

esp_ble_mesh_sensor_setting_set_t setting_set

For ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_SET & ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_SET_UNACK

union esp_ble_mesh_sensor_client_status_cb_t
#include <esp_ble_mesh_sensor_model_api.h>

Sensor Client Model received message union.

Public Members

esp_ble_mesh_sensor_descriptor_status_cb_t descriptor_status

For ESP_BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_STATUS

esp_ble_mesh_sensor_cadence_status_cb_t cadence_status

For ESP_BLE_MESH_MODEL_OP_SENSOR_CADENCE_STATUS

esp_ble_mesh_sensor_settings_status_cb_t settings_status

For ESP_BLE_MESH_MODEL_OP_SENSOR_SETTINGS_STATUS

esp_ble_mesh_sensor_setting_status_cb_t setting_status

For ESP_BLE_MESH_MODEL_OP_SENSOR_SETTING_STATUS

esp_ble_mesh_sensor_status_cb_t sensor_status

For ESP_BLE_MESH_MODEL_OP_SENSOR_STATUS

esp_ble_mesh_sensor_column_status_cb_t column_status

For ESP_BLE_MESH_MODEL_OP_SENSOR_COLUMN_STATUS

esp_ble_mesh_sensor_series_status_cb_t series_status

For ESP_BLE_MESH_MODEL_OP_SENSOR_SERIES_STATUS

union esp_ble_mesh_sensor_server_state_change_t
#include <esp_ble_mesh_sensor_model_api.h>

Sensor Server Model state change value union.

Public Members

esp_ble_mesh_state_change_sensor_cadence_set_t sensor_cadence_set

The recv_op in ctx can be used to decide which state is changed. Sensor Cadence Set

esp_ble_mesh_state_change_sensor_setting_set_t sensor_setting_set

Sensor Setting Set

union esp_ble_mesh_sensor_server_recv_get_msg_t
#include <esp_ble_mesh_sensor_model_api.h>

Sensor Server Model received get message union.

Public Members

esp_ble_mesh_server_recv_sensor_descriptor_get_t sensor_descriptor

Sensor Descriptor Get

esp_ble_mesh_server_recv_sensor_cadence_get_t sensor_cadence

Sensor Cadence Get

esp_ble_mesh_server_recv_sensor_settings_get_t sensor_settings

Sensor Settings Get

esp_ble_mesh_server_recv_sensor_setting_get_t sensor_setting

Sensor Setting Get

esp_ble_mesh_server_recv_sensor_get_t sensor_data

Sensor Get

esp_ble_mesh_server_recv_sensor_column_get_t sensor_column

Sensor Column Get

esp_ble_mesh_server_recv_sensor_series_get_t sensor_series

Sensor Series Get

union esp_ble_mesh_sensor_server_recv_set_msg_t
#include <esp_ble_mesh_sensor_model_api.h>

Sensor Server Model received set message union.

Public Members

esp_ble_mesh_server_recv_sensor_cadence_set_t sensor_cadence

Sensor Cadence Set

esp_ble_mesh_server_recv_sensor_setting_set_t sensor_setting

Sensor Setting Set

union esp_ble_mesh_sensor_server_cb_value_t
#include <esp_ble_mesh_sensor_model_api.h>

Sensor Server Model callback value union.

Public Members

esp_ble_mesh_sensor_server_state_change_t state_change

ESP_BLE_MESH_SENSOR_SERVER_STATE_CHANGE_EVT

esp_ble_mesh_sensor_server_recv_get_msg_t get

ESP_BLE_MESH_SENSOR_SERVER_RECV_GET_MSG_EVT

esp_ble_mesh_sensor_server_recv_set_msg_t set

ESP_BLE_MESH_SENSOR_SERVER_RECV_SET_MSG_EVT

Structures

struct esp_ble_mesh_sensor_descriptor_get_t

Bluetooth Mesh Sensor Client Model Get and Set parameters structure.

Parameters of Sensor Descriptor Get

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t property_id

Property ID of a sensor (optional)

struct esp_ble_mesh_sensor_cadence_get_t

Parameter of Sensor Cadence Get

Public Members

uint16_t property_id

Property ID of a sensor

struct esp_ble_mesh_sensor_cadence_set_t

Parameters of Sensor Cadence Set

Public Members

uint16_t property_id

Property ID for the sensor

uint8_t fast_cadence_period_divisor : 7

Divisor for the publish period

uint8_t status_trigger_type : 1

The unit and format of the Status Trigger Delta fields

struct net_buf_simple *status_trigger_delta_down

Delta down value that triggers a status message

struct net_buf_simple *status_trigger_delta_up

Delta up value that triggers a status message

uint8_t status_min_interval

Minimum interval between two consecutive Status messages

struct net_buf_simple *fast_cadence_low

Low value for the fast cadence range

struct net_buf_simple *fast_cadence_high

Fast value for the fast cadence range

struct esp_ble_mesh_sensor_settings_get_t

Parameter of Sensor Settings Get

Public Members

uint16_t sensor_property_id

Property ID of a sensor

struct esp_ble_mesh_sensor_setting_get_t

Parameters of Sensor Setting Get

Public Members

uint16_t sensor_property_id

Property ID of a sensor

uint16_t sensor_setting_property_id

Setting ID identifying a setting within a sensor

struct esp_ble_mesh_sensor_setting_set_t

Parameters of Sensor Setting Set

Public Members

uint16_t sensor_property_id

Property ID identifying a sensor

uint16_t sensor_setting_property_id

Setting ID identifying a setting within a sensor

struct net_buf_simple *sensor_setting_raw

Raw value for the setting

struct esp_ble_mesh_sensor_get_t

Parameters of Sensor Get

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t property_id

Property ID for the sensor (optional)

struct esp_ble_mesh_sensor_column_get_t

Parameters of Sensor Column Get

Public Members

uint16_t property_id

Property identifying a sensor

struct net_buf_simple *raw_value_x

Raw value identifying a column

struct esp_ble_mesh_sensor_series_get_t

Parameters of Sensor Series Get

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t property_id

Property identifying a sensor

struct net_buf_simple *raw_value_x1

Raw value identifying a starting column (optional)

struct net_buf_simple *raw_value_x2

Raw value identifying an ending column (C.1)

struct esp_ble_mesh_sensor_descriptor_status_cb_t

Bluetooth Mesh Sensor Client Model Get and Set callback parameters structure.

Parameter of Sensor Descriptor Status

Public Members

struct net_buf_simple *descriptor

Sequence of 8-octet sensor descriptors (optional)

struct esp_ble_mesh_sensor_cadence_status_cb_t

Parameters of Sensor Cadence Status

Public Members

uint16_t property_id

Property for the sensor

struct net_buf_simple *sensor_cadence_value

Value of sensor cadence state

struct esp_ble_mesh_sensor_settings_status_cb_t

Parameters of Sensor Settings Status

Public Members

uint16_t sensor_property_id

Property ID identifying a sensor

struct net_buf_simple *sensor_setting_property_ids

A sequence of N sensor setting property IDs (optional)

struct esp_ble_mesh_sensor_setting_status_cb_t

Parameters of Sensor Setting Status

Public Members

bool op_en

Indicate id optional parameters are included

uint16_t sensor_property_id

Property ID identifying a sensor

uint16_t sensor_setting_property_id

Setting ID identifying a setting within a sensor

uint8_t sensor_setting_access

Read/Write access rights for the setting (optional)

struct net_buf_simple *sensor_setting_raw

Raw value for the setting

struct esp_ble_mesh_sensor_status_cb_t

Parameter of Sensor Status

Public Members

struct net_buf_simple *marshalled_sensor_data

Value of sensor data state (optional)

struct esp_ble_mesh_sensor_column_status_cb_t

Parameters of Sensor Column Status

Public Members

uint16_t property_id

Property identifying a sensor and the Y axis

struct net_buf_simple *sensor_column_value

Left values of sensor column status

struct esp_ble_mesh_sensor_series_status_cb_t

Parameters of Sensor Series Status

Public Members

uint16_t property_id

Property identifying a sensor and the Y axis

struct net_buf_simple *sensor_series_value

Left values of sensor series status

struct esp_ble_mesh_sensor_client_cb_param_t

Sensor Client Model callback parameters

Public Members

int error_code

0: success, otherwise failure. For the error code values please refer to errno.h file. A negative sign is added to the standard error codes in errno.h.

esp_ble_mesh_client_common_param_t *params

The client common parameters.

esp_ble_mesh_sensor_client_status_cb_t status_cb

The sensor status message callback values

struct esp_ble_mesh_sensor_descriptor_t

Parameters of Sensor Descriptor state

Public Members

uint32_t positive_tolerance : 12

The value of Sensor Positive Tolerance field

uint32_t negative_tolerance : 12

The value of Sensor Negative Tolerance field

uint32_t sampling_function : 8

The value of Sensor Sampling Function field

uint8_t measure_period

The value of Sensor Measurement Period field

uint8_t update_interval

The value of Sensor Update Interval field

struct esp_ble_mesh_sensor_setting_t

Parameters of Sensor Setting state

Public Members

uint16_t property_id

The value of Sensor Setting Property ID field

uint8_t access

The value of Sensor Setting Access field

struct net_buf_simple *raw

The value of Sensor Setting Raw field

struct esp_ble_mesh_sensor_cadence_t

Parameters of Sensor Cadence state

Public Members

uint8_t period_divisor : 7

The value of Fast Cadence Period Divisor field

uint8_t trigger_type : 1

The value of Status Trigger Type field

struct net_buf_simple *trigger_delta_down

Note: The parameter “size” in trigger_delta_down, trigger_delta_up, fast_cadence_low & fast_cadence_high indicates the exact length of these four parameters, and they are associated with the Sensor Property ID. Users need to initialize the “size” precisely. The value of Status Trigger Delta Down field

struct net_buf_simple *trigger_delta_up

The value of Status Trigger Delta Up field

uint8_t min_interval

The value of Status Min Interval field

struct net_buf_simple *fast_cadence_low

The value of Fast Cadence Low field

struct net_buf_simple *fast_cadence_high

The value of Fast Cadence High field

struct esp_ble_mesh_sensor_data_t

Parameters of Sensor Data state

Public Members

uint8_t format : 1

Format A: The Length field is a 1-based uint4 value (valid range 0x0–0xF, representing range of 1 – 16). Format B: The Length field is a 1-based uint7 value (valid range 0x0–0x7F, representing range of 1 – 127). The value 0x7F represents a length of zero. The value of the Sensor Data format

uint8_t length : 7

The value of the Sensor Data length

struct net_buf_simple *raw_value

The value of Sensor Data raw value

struct esp_ble_mesh_sensor_series_column_t

Parameters of Sensor Series Column state

Public Members

struct net_buf_simple *raw_value_x

The value of Sensor Raw Value X field

struct net_buf_simple *column_width

The value of Sensor Column Width field

struct net_buf_simple *raw_value_y

The value of Sensor Raw Value Y field

struct esp_ble_mesh_sensor_state_t

Parameters of Sensor states

Public Members

uint16_t sensor_property_id

The value of Sensor Property ID field

esp_ble_mesh_sensor_descriptor_t descriptor

Parameters of the Sensor Descriptor state

const uint8_t setting_count

Multiple Sensor Setting states may be present for each sensor. The Sensor Setting Property ID values shall be unique for each Sensor Property ID that identifies a sensor within an element.

esp_ble_mesh_sensor_setting_t *settings

Parameters of the Sensor Setting state

esp_ble_mesh_sensor_cadence_t *cadence

The Sensor Cadence state may be not supported by sensors based on device properties referencing “non-scalar characteristics” such as “histograms” or “composite characteristics”. Parameters of the Sensor Cadence state

esp_ble_mesh_sensor_data_t sensor_data

Parameters of the Sensor Data state

esp_ble_mesh_sensor_series_column_t series_column

Parameters of the Sensor Series Column state

struct esp_ble_mesh_sensor_srv_t

User data of Sensor Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Sensor Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

const uint8_t state_count

Sensor state count

esp_ble_mesh_sensor_state_t *states

Parameters of the Sensor states

struct esp_ble_mesh_sensor_setup_srv_t

User data of Sensor Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Sensor Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

const uint8_t state_count

Sensor state count

esp_ble_mesh_sensor_state_t *states

Parameters of the Sensor states

struct esp_ble_mesh_state_change_sensor_cadence_set_t

Parameters of Sensor Cadence Set state change event

Public Members

uint16_t property_id

The value of Sensor Property ID state

uint8_t period_divisor : 7

The value of Fast Cadence Period Divisor state

uint8_t trigger_type : 1

The value of Status Trigger Type state

struct net_buf_simple *trigger_delta_down

The value of Status Trigger Delta Down state

struct net_buf_simple *trigger_delta_up

The value of Status Trigger Delta Up state

uint8_t min_interval

The value of Status Min Interval state

struct net_buf_simple *fast_cadence_low

The value of Fast Cadence Low state

struct net_buf_simple *fast_cadence_high

The value of Fast Cadence High state

struct esp_ble_mesh_state_change_sensor_setting_set_t

Parameters of Sensor Setting Set state change event

Public Members

uint16_t property_id

The value of Sensor Property ID state

uint16_t setting_property_id

The value of Sensor Setting Property ID state

struct net_buf_simple *setting_value

The value of Sensor Property Value state

struct esp_ble_mesh_server_recv_sensor_descriptor_get_t

Context of the received Sensor Descriptor Get message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t property_id

Property ID of a sensor (optional)

struct esp_ble_mesh_server_recv_sensor_cadence_get_t

Context of the received Sensor Cadence Get message

Public Members

uint16_t property_id

Property ID of a sensor

struct esp_ble_mesh_server_recv_sensor_settings_get_t

Context of the received Sensor Settings Get message

Public Members

uint16_t property_id

Property ID of a sensor

struct esp_ble_mesh_server_recv_sensor_setting_get_t

Context of the received Sensor Setting Get message

Public Members

uint16_t property_id

Property ID of a sensor

uint16_t setting_property_id

Setting ID identifying a setting within a sensor

struct esp_ble_mesh_server_recv_sensor_get_t

Context of the received Sensor Get message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t property_id

Property ID for the sensor (optional)

struct esp_ble_mesh_server_recv_sensor_column_get_t

Context of the received Sensor Column Get message

Public Members

uint16_t property_id

Property identifying a sensor

struct net_buf_simple *raw_value_x

Raw value identifying a column

struct esp_ble_mesh_server_recv_sensor_series_get_t

Context of the received Sensor Series Get message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t property_id

Property identifying a sensor

struct net_buf_simple *raw_value

Raw value containing X1 and X2 (optional)

struct esp_ble_mesh_server_recv_sensor_cadence_set_t

Context of the received Sensor Cadence Set message

Public Members

uint16_t property_id

Property ID for the sensor

struct net_buf_simple *cadence

Value of Sensor Cadence state

struct esp_ble_mesh_server_recv_sensor_setting_set_t

Context of the received Sensor Setting Set message

Public Members

uint16_t property_id

Property ID identifying a sensor

uint16_t setting_property_id

Setting ID identifying a setting within a sensor

struct net_buf_simple *setting_raw

Raw value for the setting

struct esp_ble_mesh_sensor_server_cb_param_t

Sensor Server Model callback parameters

Public Members

esp_ble_mesh_model_t *model

Pointer to Sensor Server Models

esp_ble_mesh_msg_ctx_t ctx

Context of the received messages

esp_ble_mesh_sensor_server_cb_value_t value

Value of the received Sensor Messages

Macros

ESP_BLE_MESH_MODEL_SENSOR_CLI(cli_pub, cli_data)

Define a new Sensor Client Model.

Note

This API needs to be called for each element on which the application needs to have a Sensor Client Model.

Return

New Sensor Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_SENSOR_SRV(srv_pub, srv_data)

Sensor Server Models related context.

Define a new Sensor Server Model.

Note

1. The Sensor Server model is a root model. When this model is present on an element, the corresponding Sensor Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

Return

New Sensor Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_SENSOR_SETUP_SRV(srv_pub, srv_data)

Define a new Sensor Setup Server Model.

Note

1. The Sensor Setup Server model extends the Sensor Server model.

  1. This model shall support model publication and model subscription.

Return

New Sensor Setup Server Model instance.

Parameters

ESP_BLE_MESH_INVALID_SENSOR_PROPERTY_ID

Invalid Sensor Property ID

ESP_BLE_MESH_SENSOR_PROPERTY_ID_LEN

Length of Sensor Property ID

ESP_BLE_MESH_SENSOR_DESCRIPTOR_LEN

Length of Sensor Descriptor state

ESP_BLE_MESH_SENSOR_UNSPECIFIED_POS_TOLERANCE

Unspecified Sensor Positive Tolerance

ESP_BLE_MESH_SENSOR_UNSPECIFIED_NEG_TOLERANCE

Unspecified Sensor Negative Tolerance

ESP_BLE_MESH_SENSOR_NOT_APPL_MEASURE_PERIOD

Not applicable Sensor Measurement Period

ESP_BLE_MESH_SENSOR_NOT_APPL_UPDATE_INTERVAL

Not applicable Sensor Update Interval

ESP_BLE_MESH_INVALID_SENSOR_SETTING_PROPERTY_ID

Invalid Sensor Setting Property ID

ESP_BLE_MESH_SENSOR_SETTING_PROPERTY_ID_LEN

Length of Sensor Setting Property ID

ESP_BLE_MESH_SENSOR_SETTING_ACCESS_LEN

Length of Sensor Setting Access

ESP_BLE_MESH_SENSOR_SETTING_ACCESS_READ

Sensor Setting Access - Read

ESP_BLE_MESH_SENSOR_SETTING_ACCESS_READ_WRITE

Sensor Setting Access - Read & Write

ESP_BLE_MESH_SENSOR_DIVISOR_TRIGGER_TYPE_LEN

Length of Sensor Divisor Trigger Type

ESP_BLE_MESH_SENSOR_STATUS_MIN_INTERVAL_LEN

Length of Sensor Status Min Interval

ESP_BLE_MESH_SENSOR_PERIOD_DIVISOR_MAX_VALUE

Maximum value of Sensor Period Divisor

ESP_BLE_MESH_SENSOR_STATUS_MIN_INTERVAL_MAX

Maximum value of Sensor Status Min Interval

ESP_BLE_MESH_SENSOR_STATUS_TRIGGER_TYPE_CHAR

Sensor Status Trigger Type - Format Type of the characteristic that the Sensor Property ID state references

ESP_BLE_MESH_SENSOR_STATUS_TRIGGER_TYPE_UINT16

Sensor Status Trigger Type - Format Type “uint16”

ESP_BLE_MESH_SENSOR_DATA_FORMAT_A

Sensor Data Format A

ESP_BLE_MESH_SENSOR_DATA_FORMAT_B

Sensor Data Format B

ESP_BLE_MESH_SENSOR_DATA_FORMAT_A_MPID_LEN

MPID length of Sensor Data Format A

ESP_BLE_MESH_SENSOR_DATA_FORMAT_B_MPID_LEN

MPID length of Sensor Data Format B

ESP_BLE_MESH_SENSOR_DATA_ZERO_LEN

Zero length of Sensor Data.

Note: The Length field is a 1-based uint7 value (valid range 0x0–0x7F, representing range of 1–127). The value 0x7F represents a length of zero.

ESP_BLE_MESH_GET_SENSOR_DATA_FORMAT(_data)

Get format of the sensor data.

Note

Multiple sensor data may be concatenated. Make sure the _data pointer is updated before getting the format of the corresponding sensor data.

Return

Format of the sensor data.

Parameters
  • _data: Pointer to the start of the sensor data.

ESP_BLE_MESH_GET_SENSOR_DATA_LENGTH(_data, _fmt)

Get length of the sensor data.

Note

Multiple sensor data may be concatenated. Make sure the _data pointer is updated before getting the length of the corresponding sensor data.

Return

Length (zero-based) of the sensor data.

Parameters
  • _data: Pointer to the start of the sensor data.

  • _fmt: Format of the sensor data.

ESP_BLE_MESH_GET_SENSOR_DATA_PROPERTY_ID(_data, _fmt)

Get Sensor Property ID of the sensor data.

Note

Multiple sensor data may be concatenated. Make sure the _data pointer is updated before getting Sensor Property ID of the corresponding sensor data.

Return

Sensor Property ID of the sensor data.

Parameters
  • _data: Pointer to the start of the sensor data.

  • _fmt: Format of the sensor data.

ESP_BLE_MESH_SENSOR_DATA_FORMAT_A_MPID(_len, _id)

Generate a MPID value for sensor data with Format A.

Note

1. The Format field is 0b0 and indicates that Format A is used.

  1. The Length field is a 1-based uint4 value (valid range 0x0–0xF, representing range of 1–16).

  2. The Property ID is an 11-bit bit field representing 11 LSb of a Property ID.

  3. This format may be used for Property Values that are not longer than 16 octets and for Property IDs less than 0x0800.

Return

2-octet MPID value for sensor data with Format A.

Parameters
  • _len: Length of Sensor Raw value.

  • _id: Sensor Property ID.

ESP_BLE_MESH_SENSOR_DATA_FORMAT_B_MPID(_len, _id)

Generate a MPID value for sensor data with Format B.

Note

1. The Format field is 0b1 and indicates Format B is used.

  1. The Length field is a 1-based uint7 value (valid range 0x0–0x7F, representing range of 1–127). The value 0x7F represents a length of zero.

  2. The Property ID is a 16-bit bit field representing a Property ID.

  3. This format may be used for Property Values not longer than 128 octets and for any Property IDs. Property values longer than 128 octets are not supported by the Sensor Status message.

  4. Exclude the generated 1-octet value, the 2-octet Sensor Property ID

Return

3-octet MPID value for sensor data with Format B.

Parameters
  • _len: Length of Sensor Raw value.

  • _id: Sensor Property ID.

Type Definitions

typedef void (*esp_ble_mesh_sensor_client_cb_t)(esp_ble_mesh_sensor_client_cb_event_t event, esp_ble_mesh_sensor_client_cb_param_t *param)

Bluetooth Mesh Sensor Client Model function.

Sensor Client Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

typedef void (*esp_ble_mesh_sensor_server_cb_t)(esp_ble_mesh_sensor_server_cb_event_t event, esp_ble_mesh_sensor_server_cb_param_t *param)

Bluetooth Mesh Sensor Server Model function.

Sensor Server Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

Enumerations

enum esp_ble_mesh_sensor_client_cb_event_t

This enum value is the event of Sensor Client Model

Values:

ESP_BLE_MESH_SENSOR_CLIENT_GET_STATE_EVT
ESP_BLE_MESH_SENSOR_CLIENT_SET_STATE_EVT
ESP_BLE_MESH_SENSOR_CLIENT_PUBLISH_EVT
ESP_BLE_MESH_SENSOR_CLIENT_TIMEOUT_EVT
ESP_BLE_MESH_SENSOR_CLIENT_EVT_MAX
enum esp_ble_mesh_sensor_sample_func

This enum value is value of Sensor Sampling Function

Values:

ESP_BLE_MESH_SAMPLE_FUNC_UNSPECIFIED
ESP_BLE_MESH_SAMPLE_FUNC_INSTANTANEOUS
ESP_BLE_MESH_SAMPLE_FUNC_ARITHMETIC_MEAN
ESP_BLE_MESH_SAMPLE_FUNC_RMS
ESP_BLE_MESH_SAMPLE_FUNC_MAXIMUM
ESP_BLE_MESH_SAMPLE_FUNC_MINIMUM
ESP_BLE_MESH_SAMPLE_FUNC_ACCUMULATED
ESP_BLE_MESH_SAMPLE_FUNC_COUNT
enum esp_ble_mesh_sensor_server_cb_event_t

This enum value is the event of Sensor Server Model

Values:

ESP_BLE_MESH_SENSOR_SERVER_STATE_CHANGE_EVT

  1. When get_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, no event will be callback to the application layer when Sensor Get messages are received.

  2. When set_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, this event will be callback to the application layer when Sensor Set/Set Unack messages are received.

ESP_BLE_MESH_SENSOR_SERVER_RECV_GET_MSG_EVT

When get_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when Sensor Get messages are received.

ESP_BLE_MESH_SENSOR_SERVER_RECV_SET_MSG_EVT

When set_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when Sensor Set/Set Unack messages are received.

ESP_BLE_MESH_SENSOR_SERVER_EVT_MAX

Time and Scenes Client/Server Models

Functions

esp_err_t esp_ble_mesh_register_time_scene_client_callback(esp_ble_mesh_time_scene_client_cb_t callback)

Register BLE Mesh Time Scene 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_time_scene_client_get_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_time_scene_client_get_state_t *get_state)

Get the value of Time Scene Server Model states using the Time Scene Client Model get messages.

Note

If you want to know the opcodes and corresponding meanings accepted by this API, please refer to esp_ble_mesh_time_scene_message_opcode_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 time scene get message value. Shall not be set to NULL.

esp_err_t esp_ble_mesh_time_scene_client_set_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_time_scene_client_set_state_t *set_state)

Set the value of Time Scene Server Model states using the Time Scene Client Model set messages.

Note

If you want to know the opcodes and corresponding meanings accepted by this API, please refer to esp_ble_mesh_time_scene_message_opcode_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 time scene set message value. Shall not be set to NULL.

esp_err_t esp_ble_mesh_register_time_scene_server_callback(esp_ble_mesh_time_scene_server_cb_t callback)

Register BLE Mesh Time and Scenes Server Model callback.

Return

ESP_OK on success or error code otherwise.

Parameters
  • [in] callback: Pointer to the callback function.

Unions

union esp_ble_mesh_time_scene_client_get_state_t
#include <esp_ble_mesh_time_scene_model_api.h>

Time Scene Client Model get message union.

Public Members

esp_ble_mesh_scheduler_act_get_t scheduler_act_get

For ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_GET

union esp_ble_mesh_time_scene_client_set_state_t
#include <esp_ble_mesh_time_scene_model_api.h>

Time Scene Client Model set message union.

Public Members

esp_ble_mesh_time_set_t time_set

For ESP_BLE_MESH_MODEL_OP_TIME_SET

esp_ble_mesh_time_zone_set_t time_zone_set

For ESP_BLE_MESH_MODEL_OP_TIME_ZONE_SET

esp_ble_mesh_tai_utc_delta_set_t tai_utc_delta_set

For ESP_BLE_MESH_MODEL_OP_TAI_UTC_DELTA_SET

esp_ble_mesh_time_role_set_t time_role_set

For ESP_BLE_MESH_MODEL_OP_TIME_ROLE_SET

esp_ble_mesh_scene_store_t scene_store

For ESP_BLE_MESH_MODEL_OP_SCENE_STORE & ESP_BLE_MESH_MODEL_OP_SCENE_STORE_UNACK

esp_ble_mesh_scene_recall_t scene_recall

For ESP_BLE_MESH_MODEL_OP_SCENE_RECALL & ESP_BLE_MESH_MODEL_OP_SCENE_RECALL_UNACK

esp_ble_mesh_scene_delete_t scene_delete

For ESP_BLE_MESH_MODEL_OP_SCENE_DELETE & ESP_BLE_MESH_MODEL_OP_SCENE_DELETE_UNACK

esp_ble_mesh_scheduler_act_set_t scheduler_act_set

For ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_SET & ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_SET_UNACK

union esp_ble_mesh_time_scene_client_status_cb_t
#include <esp_ble_mesh_time_scene_model_api.h>

Time Scene Client Model received message union.

Public Members

esp_ble_mesh_time_status_cb_t time_status

For ESP_BLE_MESH_MODEL_OP_TIME_STATUS

esp_ble_mesh_time_zone_status_cb_t time_zone_status

For ESP_BLE_MESH_MODEL_OP_TIME_ZONE_STATUS

esp_ble_mesh_tai_utc_delta_status_cb_t tai_utc_delta_status

For ESP_BLE_MESH_MODEL_OP_TAI_UTC_DELTA_STATUS

esp_ble_mesh_time_role_status_cb_t time_role_status

For ESP_BLE_MESH_MODEL_OP_TIME_ROLE_STATUS

esp_ble_mesh_scene_status_cb_t scene_status

For ESP_BLE_MESH_MODEL_OP_SCENE_STATUS

esp_ble_mesh_scene_register_status_cb_t scene_register_status

For ESP_BLE_MESH_MODEL_OP_SCENE_REGISTER_STATUS

esp_ble_mesh_scheduler_status_cb_t scheduler_status

For ESP_BLE_MESH_MODEL_OP_SCHEDULER_STATUS

esp_ble_mesh_scheduler_act_status_cb_t scheduler_act_status

For ESP_BLE_MESH_MODEL_OP_SCHEDULER_ACT_STATUS

union esp_ble_mesh_time_scene_server_state_change_t
#include <esp_ble_mesh_time_scene_model_api.h>

Time Scene Server Model state change value union.

Public Members

esp_ble_mesh_state_change_time_set_t time_set

The recv_op in ctx can be used to decide which state is changed. Time Set

esp_ble_mesh_state_change_time_status_t time_status

Time Status

esp_ble_mesh_state_change_time_zone_set_t time_zone_set

Time Zone Set

esp_ble_mesh_state_change_tai_utc_delta_set_t tai_utc_delta_set

TAI UTC Delta Set

esp_ble_mesh_state_change_time_role_set_t time_role_set

Time Role Set

esp_ble_mesh_state_change_scene_store_t scene_store

Scene Store

esp_ble_mesh_state_change_scene_recall_t scene_recall

Scene Recall

esp_ble_mesh_state_change_scene_delete_t scene_delete

Scene Delete

esp_ble_mesh_state_change_scheduler_act_set_t scheduler_act_set

Scheduler Action Set

union esp_ble_mesh_time_scene_server_recv_get_msg_t
#include <esp_ble_mesh_time_scene_model_api.h>

Time Scene Server Model received get message union.

Public Members

esp_ble_mesh_server_recv_scheduler_act_get_t scheduler_act

Scheduler Action Get

union esp_ble_mesh_time_scene_server_recv_set_msg_t
#include <esp_ble_mesh_time_scene_model_api.h>

Time Scene Server Model received set message union.

Public Members

esp_ble_mesh_server_recv_time_set_t time

Time Set

esp_ble_mesh_server_recv_time_zone_set_t time_zone

Time Zone Set

esp_ble_mesh_server_recv_tai_utc_delta_set_t tai_utc_delta

TAI-UTC Delta Set

esp_ble_mesh_server_recv_time_role_set_t time_role

Time Role Set

esp_ble_mesh_server_recv_scene_store_t scene_store

Scene Store/Scene Store Unack

esp_ble_mesh_server_recv_scene_recall_t scene_recall

Scene Recall/Scene Recall Unack

esp_ble_mesh_server_recv_scene_delete_t scene_delete

Scene Delete/Scene Delete Unack

esp_ble_mesh_server_recv_scheduler_act_set_t scheduler_act

Scheduler Action Set/Scheduler Action Set Unack

union esp_ble_mesh_time_scene_server_recv_status_msg_t
#include <esp_ble_mesh_time_scene_model_api.h>

Time Scene Server Model received status message union.

Public Members

esp_ble_mesh_server_recv_time_status_t time_status

Time Status

union esp_ble_mesh_time_scene_server_cb_value_t
#include <esp_ble_mesh_time_scene_model_api.h>

Time Scene Server Model callback value union.

Public Members

esp_ble_mesh_time_scene_server_state_change_t state_change

ESP_BLE_MESH_TIME_SCENE_SERVER_STATE_CHANGE_EVT

esp_ble_mesh_time_scene_server_recv_get_msg_t get

ESP_BLE_MESH_TIME_SCENE_SERVER_RECV_GET_MSG_EVT

esp_ble_mesh_time_scene_server_recv_set_msg_t set

ESP_BLE_MESH_TIME_SCENE_SERVER_RECV_SET_MSG_EVT

esp_ble_mesh_time_scene_server_recv_status_msg_t status

ESP_BLE_MESH_TIME_SCENE_SERVER_RECV_STATUS_MSG_EVT

Structures

struct esp_ble_mesh_time_set_t

Bluetooth Mesh Time Scene Client Model Get and Set parameters structure.

Parameters of Time Set

Public Members

uint8_t tai_seconds[5]

The current TAI time in seconds

uint8_t sub_second

The sub-second time in units of 1/256 second

uint8_t uncertainty

The estimated uncertainty in 10-millisecond steps

uint16_t time_authority : 1

0 = No Time Authority, 1 = Time Authority

uint16_t tai_utc_delta : 15

Current difference between TAI and UTC in seconds

uint8_t time_zone_offset

The local time zone offset in 15-minute increments

struct esp_ble_mesh_time_zone_set_t

Parameters of Time Zone Set

Public Members

uint8_t time_zone_offset_new

Upcoming local time zone offset

uint8_t tai_zone_change[5]

TAI Seconds time of the upcoming Time Zone Offset change

struct esp_ble_mesh_tai_utc_delta_set_t

Parameters of TAI-UTC Delta Set

Public Members

uint16_t tai_utc_delta_new : 15

Upcoming difference between TAI and UTC in seconds

uint16_t padding : 1

Always 0b0. Other values are Prohibited.

uint8_t tai_delta_change[5]

TAI Seconds time of the upcoming TAI-UTC Delta change

struct esp_ble_mesh_time_role_set_t

Parameter of Time Role Set

Public Members

uint8_t time_role

The Time Role for the element

struct esp_ble_mesh_scene_store_t

Parameter of Scene Store

Public Members

uint16_t scene_number

The number of scenes to be stored

struct esp_ble_mesh_scene_recall_t

Parameters of Scene Recall

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t scene_number

The number of scenes to be recalled

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_scene_delete_t

Parameter of Scene Delete

Public Members

uint16_t scene_number

The number of scenes to be deleted

struct esp_ble_mesh_scheduler_act_get_t

Parameter of Scheduler Action Get

Public Members

uint8_t index

Index of the Schedule Register entry to get

struct esp_ble_mesh_scheduler_act_set_t

Parameters of Scheduler Action Set

Public Members

uint64_t index : 4

Index of the Schedule Register entry to set

uint64_t year : 7

Scheduled year for the action

uint64_t month : 12

Scheduled month for the action

uint64_t day : 5

Scheduled day of the month for the action

uint64_t hour : 5

Scheduled hour for the action

uint64_t minute : 6

Scheduled minute for the action

uint64_t second : 6

Scheduled second for the action

uint64_t day_of_week : 7

Schedule days of the week for the action

uint64_t action : 4

Action to be performed at the scheduled time

uint64_t trans_time : 8

Transition time for this action

uint16_t scene_number

Transition time for this action

struct esp_ble_mesh_time_status_cb_t

Bluetooth Mesh Time Scene Client Model Get and Set callback parameters structure.

Parameters of Time Status

Public Members

uint8_t tai_seconds[5]

The current TAI time in seconds

uint8_t sub_second

The sub-second time in units of 1/256 second

uint8_t uncertainty

The estimated uncertainty in 10-millisecond steps

uint16_t time_authority : 1

0 = No Time Authority, 1 = Time Authority

uint16_t tai_utc_delta : 15

Current difference between TAI and UTC in seconds

uint8_t time_zone_offset

The local time zone offset in 15-minute increments

struct esp_ble_mesh_time_zone_status_cb_t

Parameters of Time Zone Status

Public Members

uint8_t time_zone_offset_curr

Current local time zone offset

uint8_t time_zone_offset_new

Upcoming local time zone offset

uint8_t tai_zone_change[5]

TAI Seconds time of the upcoming Time Zone Offset change

struct esp_ble_mesh_tai_utc_delta_status_cb_t

Parameters of TAI-UTC Delta Status

Public Members

uint16_t tai_utc_delta_curr : 15

Current difference between TAI and UTC in seconds

uint16_t padding_1 : 1

Always 0b0. Other values are Prohibited.

uint16_t tai_utc_delta_new : 15

Upcoming difference between TAI and UTC in seconds

uint16_t padding_2 : 1

Always 0b0. Other values are Prohibited.

uint8_t tai_delta_change[5]

TAI Seconds time of the upcoming TAI-UTC Delta change

struct esp_ble_mesh_time_role_status_cb_t

Parameter of Time Role Status

Public Members

uint8_t time_role

The Time Role for the element

struct esp_ble_mesh_scene_status_cb_t

Parameters of Scene Status

Public Members

bool op_en

Indicate if optional parameters are included

uint8_t status_code

Status code of the last operation

uint16_t current_scene

Scene Number of the current scene

uint16_t target_scene

Scene Number of the target scene (optional)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_scene_register_status_cb_t

Parameters of Scene Register Status

Public Members

uint8_t status_code

Status code for the previous operation

uint16_t current_scene

Scene Number of the current scene

struct net_buf_simple *scenes

A list of scenes stored within an element

struct esp_ble_mesh_scheduler_status_cb_t

Parameter of Scheduler Status

Public Members

uint16_t schedules

Bit field indicating defined Actions in the Schedule Register

struct esp_ble_mesh_scheduler_act_status_cb_t

Parameters of Scheduler Action Status

Public Members

uint64_t index : 4

Enumerates (selects) a Schedule Register entry

uint64_t year : 7

Scheduled year for the action

uint64_t month : 12

Scheduled month for the action

uint64_t day : 5

Scheduled day of the month for the action

uint64_t hour : 5

Scheduled hour for the action

uint64_t minute : 6

Scheduled minute for the action

uint64_t second : 6

Scheduled second for the action

uint64_t day_of_week : 7

Schedule days of the week for the action

uint64_t action : 4

Action to be performed at the scheduled time

uint64_t trans_time : 8

Transition time for this action

uint16_t scene_number

Transition time for this action

struct esp_ble_mesh_time_scene_client_cb_param_t

Time Scene Client Model callback parameters

Public Members

int error_code

Appropriate error code

esp_ble_mesh_client_common_param_t *params

The client common parameters.

esp_ble_mesh_time_scene_client_status_cb_t status_cb

The scene status message callback values

struct esp_ble_mesh_time_state_t

Parameters of Time state

Public Members

uint8_t tai_seconds[5]

The value of the TAI Seconds state

uint8_t subsecond

The value of the Subsecond field

uint8_t uncertainty

The value of the Uncertainty field

uint8_t time_zone_offset_curr

The value of the Time Zone Offset Current field

uint8_t time_zone_offset_new

The value of the Time Zone Offset New state

uint8_t tai_zone_change[5]

The value of the TAI of Zone Chaneg field

uint16_t time_authority : 1

The value of the Time Authority bit

uint16_t tai_utc_delta_curr : 15

The value of the TAI-UTC Delta Current state

uint16_t tai_utc_delta_new : 15

The value of the TAI-UTC Delta New state

uint8_t tai_delta_change[5]

The value of the TAI of Delta Change field

struct esp_ble_mesh_time_state_t::[anonymous] time

Parameters of the Time state

uint8_t time_role

The value of the Time Role state

struct esp_ble_mesh_time_srv_t

User data of Time Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Time Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_time_state_t *state

Parameters of the Time state

struct esp_ble_mesh_time_setup_srv_t

User data of Time Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Time Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_time_state_t *state

Parameters of the Time state

struct esp_ble_mesh_scene_register_t

  1. Scene Store is an operation of storing values of a present state of an element.

  2. The structure and meaning of the stored state is determined by a model. States to be stored are specified by each model.

  3. The Scene Store operation shall persistently store all values of all states marked as Stored with Scene for all models present on all elements of a node.

  4. If a model is extending another model, the extending model shall determine the Stored with Scene behavior of that model. Parameters of Scene Register state

Public Members

uint16_t scene_number

The value of the Scene Number

uint8_t scene_type

The value of the Scene Type

struct net_buf_simple *scene_value

Scene value may use a union to represent later, the union contains structures of all the model states which can be stored in a scene. The value of the Scene Value

struct esp_ble_mesh_scenes_state_t

Parameters of Scenes state.

Scenes serve as memory banks for storage of states (e.g., a power level or a light level/color). Values of states of an element can be stored as a scene and can be recalled later from the scene memory.

A scene is represented by a Scene Number, which is a 16-bit non-zero, mesh-wide value. (There can be a maximum of 65535 scenes in a mesh network.) The meaning of a scene, as well as the state storage container associated with it, are determined by a model.

The Scenes state change may start numerous parallel model transitions. In that case, each individual model handles the transition internally.

The scene transition is defined as a group of individual model transitions started by a Scene Recall operation. The scene transition is in progress when at least one transition from the group of individual model transitions is in progress.

Public Members

const uint16_t scene_count

The Scenes state’s scene count

esp_ble_mesh_scene_register_t *scenes

Parameters of the Scenes state

uint16_t current_scene

The Current Scene state is a 16-bit value that contains either the Scene Number of the currently active scene or a value of 0x0000 when no scene is active.

When a Scene Store operation or a Scene Recall operation completes with success, the Current Scene state value shall be to the Scene Number used during that operation.

When the Current Scene Number is deleted from a Scene Register state as a result of Scene Delete operation, the Current Scene state shall be set to 0x0000.

When any of the element’s state that is marked as “Stored with Scene” has changed not as a result of a Scene Recall operation, the value of the Current Scene state shall be set to 0x0000.

When a scene transition is in progress, the value of the Current Scene state shall be set to 0x0000. The value of the Current Scene state

uint16_t target_scene

The Target Scene state is a 16-bit value that contains the target Scene Number when a scene transition is in progress.

When the scene transition is in progress and the target Scene Number is deleted from a Scene Register state as a result of Scene Delete operation, the Target Scene state shall be set to 0x0000.

When the scene transition is in progress and a new Scene Number is stored in the Scene Register as a result of Scene Store operation, the Target Scene state shall be set to the new Scene Number.

When the scene transition is not in progress, the value of the Target Scene state shall be set to 0x0000. The value of the Target Scene state

uint8_t status_code

The status code of the last scene operation

bool in_progress

Indicate if the scene transition is in progress

struct esp_ble_mesh_scene_srv_t

User data of Scene Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Scene Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_scenes_state_t *state

Parameters of the Scenes state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

struct esp_ble_mesh_scene_setup_srv_t

User data of Scene Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Scene Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_scenes_state_t *state

Parameters of the Scenes state

struct esp_ble_mesh_schedule_register_t

Parameters of Scheduler Register state

Public Members

bool in_use

Indicate if the registered schedule is in use

uint64_t year : 7

The value of Scheduled year for the action

uint64_t month : 12

The value of Scheduled month for the action

uint64_t day : 5

The value of Scheduled day of the month for the action

uint64_t hour : 5

The value of Scheduled hour for the action

uint64_t minute : 6

The value of Scheduled minute for the action

uint64_t second : 6

The value of Scheduled second for the action

uint64_t day_of_week : 7

The value of Schedule days of the week for the action

uint64_t action : 4

The value of Action to be performed at the scheduled time

uint64_t trans_time : 8

The value of Transition time for this action

uint16_t scene_number

The value of Scene Number to be used for some actions

struct esp_ble_mesh_scheduler_state_t

Parameters of Scheduler state

Public Members

const uint8_t schedule_count

Scheduler count

esp_ble_mesh_schedule_register_t *schedules

Up to 16 scheduled entries

struct esp_ble_mesh_scheduler_srv_t

User data of Scheduler Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Scheduler Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_scheduler_state_t *state

Parameters of the Scheduler state

struct esp_ble_mesh_scheduler_setup_srv_t

User data of Scheduler Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Scheduler Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_scheduler_state_t *state

Parameters of the Scheduler state

struct esp_ble_mesh_state_change_time_set_t

Parameters of Time Set state change event

Public Members

uint8_t tai_seconds[5]

The current TAI time in seconds

uint8_t subsecond

The sub-second time in units of 1/256 second

uint8_t uncertainty

The estimated uncertainty in 10-millisecond steps

uint16_t time_authority : 1

0 = No Time Authority, 1 = Time Authority

uint16_t tai_utc_delta_curr : 15

Current difference between TAI and UTC in seconds

uint8_t time_zone_offset_curr

The local time zone offset in 15-minute increments

struct esp_ble_mesh_state_change_time_status_t

Parameters of Time Status state change event

Public Members

uint8_t tai_seconds[5]

The current TAI time in seconds

uint8_t subsecond

The sub-second time in units of 1/256 second

uint8_t uncertainty

The estimated uncertainty in 10-millisecond steps

uint16_t time_authority : 1

0 = No Time Authority, 1 = Time Authority

uint16_t tai_utc_delta_curr : 15

Current difference between TAI and UTC in seconds

uint8_t time_zone_offset_curr

The local time zone offset in 15-minute increments

struct esp_ble_mesh_state_change_time_zone_set_t

Parameters of Time Zone Set state change event

Public Members

uint8_t time_zone_offset_new

Upcoming local time zone offset

uint8_t tai_zone_change[5]

TAI Seconds time of the upcoming Time Zone Offset change

struct esp_ble_mesh_state_change_tai_utc_delta_set_t

Parameters of TAI UTC Delta Set state change event

Public Members

uint16_t tai_utc_delta_new : 15

Upcoming difference between TAI and UTC in seconds

uint8_t tai_delta_change[5]

TAI Seconds time of the upcoming TAI-UTC Delta change

struct esp_ble_mesh_state_change_time_role_set_t

Parameter of Time Role Set state change event

Public Members

uint8_t time_role

The Time Role for the element

struct esp_ble_mesh_state_change_scene_store_t

Parameter of Scene Store state change event

Public Members

uint16_t scene_number

The number of scenes to be stored

struct esp_ble_mesh_state_change_scene_recall_t

Parameter of Scene Recall state change event

Public Members

uint16_t scene_number

The number of scenes to be recalled

struct esp_ble_mesh_state_change_scene_delete_t

Parameter of Scene Delete state change event

Public Members

uint16_t scene_number

The number of scenes to be deleted

struct esp_ble_mesh_state_change_scheduler_act_set_t

Parameter of Scheduler Action Set state change event

Public Members

uint64_t index : 4

Index of the Schedule Register entry to set

uint64_t year : 7

Scheduled year for the action

uint64_t month : 12

Scheduled month for the action

uint64_t day : 5

Scheduled day of the month for the action

uint64_t hour : 5

Scheduled hour for the action

uint64_t minute : 6

Scheduled minute for the action

uint64_t second : 6

Scheduled second for the action

uint64_t day_of_week : 7

Schedule days of the week for the action

uint64_t action : 4

Action to be performed at the scheduled time

uint64_t trans_time : 8

Transition time for this action

uint16_t scene_number

Scene number to be used for some actions

struct esp_ble_mesh_server_recv_scheduler_act_get_t

Context of the received Scheduler Action Get message

Public Members

uint8_t index

Index of the Schedule Register entry to get

struct esp_ble_mesh_server_recv_time_set_t

Context of the received Time Set message

Public Members

uint8_t tai_seconds[5]

The current TAI time in seconds

uint8_t subsecond

The sub-second time in units of 1/256 second

uint8_t uncertainty

The estimated uncertainty in 10-millisecond steps

uint16_t time_authority : 1

0 = No Time Authority, 1 = Time Authority

uint16_t tai_utc_delta : 15

Current difference between TAI and UTC in seconds

uint8_t time_zone_offset

The local time zone offset in 15-minute increments

struct esp_ble_mesh_server_recv_time_zone_set_t

Context of the received Time Zone Set message

Public Members

uint8_t time_zone_offset_new

Upcoming local time zone offset

uint8_t tai_zone_change[5]

TAI Seconds time of the upcoming Time Zone Offset change

struct esp_ble_mesh_server_recv_tai_utc_delta_set_t

Context of the received TAI UTC Delta Set message

Public Members

uint16_t tai_utc_delta_new : 15

Upcoming difference between TAI and UTC in seconds

uint16_t padding : 1

Always 0b0. Other values are Prohibited.

uint8_t tai_delta_change[5]

TAI Seconds time of the upcoming TAI-UTC Delta change

struct esp_ble_mesh_server_recv_time_role_set_t

Context of the received Time Role Set message

Public Members

uint8_t time_role

The Time Role for the element

struct esp_ble_mesh_server_recv_scene_store_t

Context of the received Scene Store message

Public Members

uint16_t scene_number

The number of scenes to be stored

struct esp_ble_mesh_server_recv_scene_recall_t

Context of the received Scene Recall message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t scene_number

The number of scenes to be recalled

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_scene_delete_t

Context of the received Scene Delete message

Public Members

uint16_t scene_number

The number of scenes to be deleted

struct esp_ble_mesh_server_recv_scheduler_act_set_t

Context of the received Scheduler Action Set message

Public Members

uint64_t index : 4

Index of the Schedule Register entry to set

uint64_t year : 7

Scheduled year for the action

uint64_t month : 12

Scheduled month for the action

uint64_t day : 5

Scheduled day of the month for the action

uint64_t hour : 5

Scheduled hour for the action

uint64_t minute : 6

Scheduled minute for the action

uint64_t second : 6

Scheduled second for the action

uint64_t day_of_week : 7

Schedule days of the week for the action

uint64_t action : 4

Action to be performed at the scheduled time

uint64_t trans_time : 8

Transition time for this action

uint16_t scene_number

Scene number to be used for some actions

struct esp_ble_mesh_server_recv_time_status_t

Context of the received Time Status message

Public Members

uint8_t tai_seconds[5]

The current TAI time in seconds

uint8_t subsecond

The sub-second time in units of 1/256 second

uint8_t uncertainty

The estimated uncertainty in 10-millisecond steps

uint16_t time_authority : 1

0 = No Time Authority, 1 = Time Authority

uint16_t tai_utc_delta : 15

Current difference between TAI and UTC in seconds

uint8_t time_zone_offset

The local time zone offset in 15-minute increments

struct esp_ble_mesh_time_scene_server_cb_param_t

Time Scene Server Model callback parameters

Public Members

esp_ble_mesh_model_t *model

Pointer to Time and Scenes Server Models

esp_ble_mesh_msg_ctx_t ctx

Context of the received messages

esp_ble_mesh_time_scene_server_cb_value_t value

Value of the received Time and Scenes Messages

Macros

ESP_BLE_MESH_MODEL_TIME_CLI(cli_pub, cli_data)

Define a new Time Client Model.

Note

This API needs to be called for each element on which the application needs to have a Time Client Model.

Return

New Time Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_SCENE_CLI(cli_pub, cli_data)

Define a new Scene Client Model.

Note

This API needs to be called for each element on which the application needs to have a Scene Client Model.

Return

New Scene Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_SCHEDULER_CLI(cli_pub, cli_data)

Define a new Scheduler Client Model.

Note

This API needs to be called for each element on which the application needs to have a Scheduler Client Model.

Return

New Scheduler Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_TIME_SRV(srv_pub, srv_data)

Time Scene Server Models related context.

Define a new Time Server Model.

Note

1. The Time Server model is a root model. When this model is present on an Element, the corresponding Time Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

Return

New Time Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_TIME_SETUP_SRV(srv_data)

Define a new Time Setup Server Model.

Note

1. The Time Setup Server model extends the Time Server model. Time is sensitive information that is propagated across a mesh network.

  1. Only an authorized Time Client should be allowed to change the Time and Time Role states. A dedicated application key Bluetooth SIG Proprietary should be used on the Time Setup Server to restrict access to the server to only authorized Time Clients.

  2. This model does not support subscribing nor publishing.

Return

New Time Setup Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_SCENE_SRV(srv_pub, srv_data)

Define a new Scene Server Model.

Note

1. The Scene Server model is a root model. When this model is present on an Element, the corresponding Scene Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

  2. The model may be present only on the Primary element of a node.

Return

New Scene Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_SCENE_SETUP_SRV(srv_pub, srv_data)

Define a new Scene Setup Server Model.

Note

1. The Scene Setup Server model extends the Scene Server model and the Generic Default Transition Time Server model.

  1. This model shall support model subscription.

  2. The model may be present only on the Primary element of a node.

Return

New Scene Setup Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_SCHEDULER_SRV(srv_pub, srv_data)

Define a new Scheduler Server Model.

Note

1. The Scheduler Server model extends the Scene Server model. When this model is present on an Element, the corresponding Scheduler Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

  2. The model may be present only on the Primary element of a node.

  3. The model requires the Time Server model shall be present on the element.

Return

New Scheduler Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_SCHEDULER_SETUP_SRV(srv_pub, srv_data)

Define a new Scheduler Setup Server Model.

Note

1. The Scheduler Setup Server model extends the Scheduler Server and the Scene Setup Server models.

  1. This model shall support model subscription.

  2. The model may be present only on the Primary element of a node.

Return

New Scheduler Setup Server Model instance.

Parameters

ESP_BLE_MESH_UNKNOWN_TAI_SECONDS

Unknown TAI Seconds

ESP_BLE_MESH_UNKNOWN_TAI_ZONE_CHANGE

Unknown TAI of Zone Change

ESP_BLE_MESH_UNKNOWN_TAI_DELTA_CHANGE

Unknown TAI of Delta Change

ESP_BLE_MESH_TAI_UTC_DELTA_MAX_VALUE

Maximum TAI-UTC Delta value

ESP_BLE_MESH_TAI_SECONDS_LEN

Length of TAI Seconds

ESP_BLE_MESH_TAI_OF_ZONE_CHANGE_LEN

Length of TAI of Zone Change

ESP_BLE_MESH_TAI_OF_DELTA_CHANGE_LEN

Length of TAI of Delta Change

ESP_BLE_MESH_INVALID_SCENE_NUMBER

Invalid Scene Number

ESP_BLE_MESH_SCENE_NUMBER_LEN

Length of the Scene Number

ESP_BLE_MESH_SCHEDULE_YEAR_ANY_YEAR

Any year of the Scheduled year

ESP_BLE_MESH_SCHEDULE_DAY_ANY_DAY

Any day of the Scheduled day

ESP_BLE_MESH_SCHEDULE_HOUR_ANY_HOUR

Any hour of the Scheduled hour

ESP_BLE_MESH_SCHEDULE_HOUR_ONCE_A_DAY

Any hour of the Scheduled Day

ESP_BLE_MESH_SCHEDULE_SEC_ANY_OF_HOUR

Any minute of the Scheduled hour

ESP_BLE_MESH_SCHEDULE_SEC_EVERY_15_MIN

Every 15 minutes of the Scheduled hour

ESP_BLE_MESH_SCHEDULE_SEC_EVERY_20_MIN

Every 20 minutes of the Scheduled hour

ESP_BLE_MESH_SCHEDULE_SEC_ONCE_AN_HOUR

Once of the Scheduled hour

ESP_BLE_MESH_SCHEDULE_SEC_ANY_OF_MIN

Any second of the Scheduled minute

ESP_BLE_MESH_SCHEDULE_SEC_EVERY_15_SEC

Every 15 seconds of the Scheduled minute

ESP_BLE_MESH_SCHEDULE_SEC_EVERY_20_SEC

Every 20 seconds of the Scheduled minute

ESP_BLE_MESH_SCHEDULE_SEC_ONCE_AN_MIN

Once of the Scheduled minute

ESP_BLE_MESH_SCHEDULE_ACT_TURN_OFF

Scheduled Action - Turn Off

ESP_BLE_MESH_SCHEDULE_ACT_TURN_ON

Scheduled Action - Turn On

ESP_BLE_MESH_SCHEDULE_ACT_SCENE_RECALL

Scheduled Action - Scene Recall

ESP_BLE_MESH_SCHEDULE_ACT_NO_ACTION

Scheduled Action - No Action

ESP_BLE_MESH_SCHEDULE_SCENE_NO_SCENE

Scheduled Scene - No Scene

ESP_BLE_MESH_SCHEDULE_ENTRY_MAX_INDEX

Maximum number of Scheduled entries

ESP_BLE_MESH_TIME_NONE

Time Role - None

ESP_BLE_MESH_TIME_AUTHORITY

Time Role - Mesh Time Authority

ESP_BLE_MESH_TIME_RELAY

Time Role - Mesh Time Relay

ESP_BLE_MESH_TIME_CLINET

Time Role - Mesh Time Client

ESP_BLE_MESH_SCENE_SUCCESS

Scene operation - Success

ESP_BLE_MESH_SCENE_REG_FULL

Scene operation - Scene Register Full

ESP_BLE_MESH_SCENE_NOT_FOUND

Scene operation - Scene Not Found

Type Definitions

typedef void (*esp_ble_mesh_time_scene_client_cb_t)(esp_ble_mesh_time_scene_client_cb_event_t event, esp_ble_mesh_time_scene_client_cb_param_t *param)

Bluetooth Mesh Time Scene Client Model function.

Time Scene Client Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

typedef void (*esp_ble_mesh_time_scene_server_cb_t)(esp_ble_mesh_time_scene_server_cb_event_t event, esp_ble_mesh_time_scene_server_cb_param_t *param)

Bluetooth Mesh Time and Scenes Server Model function.

Time Scene Server Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

Enumerations

enum esp_ble_mesh_time_scene_client_cb_event_t

This enum value is the event of Time Scene Client Model

Values:

ESP_BLE_MESH_TIME_SCENE_CLIENT_GET_STATE_EVT
ESP_BLE_MESH_TIME_SCENE_CLIENT_SET_STATE_EVT
ESP_BLE_MESH_TIME_SCENE_CLIENT_PUBLISH_EVT
ESP_BLE_MESH_TIME_SCENE_CLIENT_TIMEOUT_EVT
ESP_BLE_MESH_TIME_SCENE_CLIENT_EVT_MAX
enum esp_ble_mesh_time_scene_server_cb_event_t

This enum value is the event of Time Scene Server Model

Values:

ESP_BLE_MESH_TIME_SCENE_SERVER_STATE_CHANGE_EVT

  1. When get_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, no event will be callback to the application layer when Time Scene Get messages are received.

  2. When set_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, this event will be callback to the application layer when Time Scene Set/Set Unack messages are received.

ESP_BLE_MESH_TIME_SCENE_SERVER_RECV_GET_MSG_EVT

When get_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when Time Scene Get messages are received.

ESP_BLE_MESH_TIME_SCENE_SERVER_RECV_SET_MSG_EVT

When set_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when Time Scene Set/Set Unack messages are received.

ESP_BLE_MESH_TIME_SCENE_SERVER_RECV_STATUS_MSG_EVT

When status_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when TIme Status message is received.

ESP_BLE_MESH_TIME_SCENE_SERVER_EVT_MAX

Lighting Client/Server Models

Functions

esp_err_t esp_ble_mesh_register_light_client_callback(esp_ble_mesh_light_client_cb_t callback)

Register BLE Mesh Light 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_light_client_get_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_light_client_get_state_t *get_state)

Get the value of Light Server Model states using the Light Client Model get messages.

Note

If you want to know the opcodes and corresponding meanings accepted by this API, please refer to esp_ble_mesh_light_message_opcode_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 of light get message value. Shall not be set to NULL.

esp_err_t esp_ble_mesh_light_client_set_state(esp_ble_mesh_client_common_param_t *params, esp_ble_mesh_light_client_set_state_t *set_state)

Set the value of Light Server Model states using the Light Client Model set messages.

Note

If you want to know the opcodes and corresponding meanings accepted by this API, please refer to esp_ble_mesh_light_message_opcode_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 of light set message value. Shall not be set to NULL.

esp_err_t esp_ble_mesh_register_lighting_server_callback(esp_ble_mesh_lighting_server_cb_t callback)

Register BLE Mesh Lighting Server Model callback.

Return

ESP_OK on success or error code otherwise.

Parameters
  • [in] callback: Pointer to the callback function.

Unions

union esp_ble_mesh_light_client_get_state_t
#include <esp_ble_mesh_lighting_model_api.h>

Lighting Client Model get message union.

Public Members

esp_ble_mesh_light_lc_property_get_t lc_property_get

For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_GET

union esp_ble_mesh_light_client_set_state_t
#include <esp_ble_mesh_lighting_model_api.h>

Lighting Client Model set message union.

Public Members

esp_ble_mesh_light_lightness_set_t lightness_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_SET_UNACK

esp_ble_mesh_light_lightness_linear_set_t lightness_linear_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_SET_UNACK

esp_ble_mesh_light_lightness_default_set_t lightness_default_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_DEFAULT_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_DEFAULT_SET_UNACK

esp_ble_mesh_light_lightness_range_set_t lightness_range_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_RANGE_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_RANGE_SET_UNACK

esp_ble_mesh_light_ctl_set_t ctl_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_SET_UNACK

esp_ble_mesh_light_ctl_temperature_set_t ctl_temperature_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_SET_UNACK

esp_ble_mesh_light_ctl_temperature_range_set_t ctl_temperature_range_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_RANGE_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_RANGE_SET_UNACK

esp_ble_mesh_light_ctl_default_set_t ctl_default_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_DEFAULT_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_DEFAULT_SET_UNACK

esp_ble_mesh_light_hsl_set_t hsl_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SET_UNACK

esp_ble_mesh_light_hsl_hue_set_t hsl_hue_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_HUE_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_HUE_SET_UNACK

esp_ble_mesh_light_hsl_saturation_set_t hsl_saturation_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SATURATION_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SATURATION_SET_UNACK

esp_ble_mesh_light_hsl_default_set_t hsl_default_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_DEFAULT_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_DEFAULT_SET_UNACK

esp_ble_mesh_light_hsl_range_set_t hsl_range_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_RANGE_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_RANGE_SET_UNACK

esp_ble_mesh_light_xyl_set_t xyl_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_SET_UNACK

esp_ble_mesh_light_xyl_default_set_t xyl_default_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_DEFAULT_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_DEFAULT_SET_UNACK

esp_ble_mesh_light_xyl_range_set_t xyl_range_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_RANGE_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_RANGE_SET_UNACK

esp_ble_mesh_light_lc_mode_set_t lc_mode_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_MODE_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LC_MODE_SET_UNACK

esp_ble_mesh_light_lc_om_set_t lc_om_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_OM_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LC_OM_SET_UNACK

esp_ble_mesh_light_lc_light_onoff_set_t lc_light_onoff_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_LIGHT_ONOFF_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LC_LIGHT_ONOFF_SET_UNACK

esp_ble_mesh_light_lc_property_set_t lc_property_set

For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_SET & ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_SET_UNACK

union esp_ble_mesh_light_client_status_cb_t
#include <esp_ble_mesh_lighting_model_api.h>

Lighting Client Model received message union.

Public Members

esp_ble_mesh_light_lightness_status_cb_t lightness_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_STATUS

esp_ble_mesh_light_lightness_linear_status_cb_t lightness_linear_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LINEAR_STATUS

esp_ble_mesh_light_lightness_last_status_cb_t lightness_last_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_LAST_STATUS

esp_ble_mesh_light_lightness_default_status_cb_t lightness_default_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_DEFAULT_STATUS

esp_ble_mesh_light_lightness_range_status_cb_t lightness_range_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_RANGE_STATUS

esp_ble_mesh_light_ctl_status_cb_t ctl_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_STATUS

esp_ble_mesh_light_ctl_temperature_status_cb_t ctl_temperature_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_STATUS

esp_ble_mesh_light_ctl_temperature_range_status_cb_t ctl_temperature_range_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_TEMPERATURE_RANGE_STATUS

esp_ble_mesh_light_ctl_default_status_cb_t ctl_default_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_CTL_DEFAULT_STATUS

esp_ble_mesh_light_hsl_status_cb_t hsl_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_STATUS

esp_ble_mesh_light_hsl_target_status_cb_t hsl_target_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_TARGET_STATUS

esp_ble_mesh_light_hsl_hue_status_cb_t hsl_hue_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_HUE_STATUS

esp_ble_mesh_light_hsl_saturation_status_cb_t hsl_saturation_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SATURATION_STATUS

esp_ble_mesh_light_hsl_default_status_cb_t hsl_default_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_DEFAULT_STATUS

esp_ble_mesh_light_hsl_range_status_cb_t hsl_range_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_RANGE_STATUS

esp_ble_mesh_light_xyl_status_cb_t xyl_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_STATUS

esp_ble_mesh_light_xyl_target_status_cb_t xyl_target_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_TARGET_STATUS

esp_ble_mesh_light_xyl_default_status_cb_t xyl_default_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_DEFAULT_STATUS

esp_ble_mesh_light_xyl_range_status_cb_t xyl_range_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_XYL_RANGE_STATUS

esp_ble_mesh_light_lc_mode_status_cb_t lc_mode_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_MODE_STATUS

esp_ble_mesh_light_lc_om_status_cb_t lc_om_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_OM_STATUS

esp_ble_mesh_light_lc_light_onoff_status_cb_t lc_light_onoff_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_LIGHT_ONOFF_STATUS

esp_ble_mesh_light_lc_property_status_cb_t lc_property_status

For ESP_BLE_MESH_MODEL_OP_LIGHT_LC_PROPERTY_STATUS

union esp_ble_mesh_lighting_server_state_change_t
#include <esp_ble_mesh_lighting_model_api.h>

Lighting Server Model state change value union.

Public Members

esp_ble_mesh_state_change_light_lightness_set_t lightness_set

The recv_op in ctx can be used to decide which state is changed. Light Lightness Set

esp_ble_mesh_state_change_light_lightness_linear_set_t lightness_linear_set

Light Lightness Linear Set

esp_ble_mesh_state_change_light_lightness_default_set_t lightness_default_set

Light Lightness Default Set

esp_ble_mesh_state_change_light_lightness_range_set_t lightness_range_set

Light Lightness Range Set

esp_ble_mesh_state_change_light_ctl_set_t ctl_set

Light CTL Set

esp_ble_mesh_state_change_light_ctl_temperature_set_t ctl_temp_set

Light CTL Temperature Set

esp_ble_mesh_state_change_light_ctl_temperature_range_set_t ctl_temp_range_set

Light CTL Temperature Range Set

esp_ble_mesh_state_change_light_ctl_default_set_t ctl_default_set

Light CTL Default Set

esp_ble_mesh_state_change_light_hsl_set_t hsl_set

Light HSL Set

esp_ble_mesh_state_change_light_hsl_hue_set_t hsl_hue_set

Light HSL Hue Set

esp_ble_mesh_state_change_light_hsl_saturation_set_t hsl_saturation_set

Light HSL Saturation Set

esp_ble_mesh_state_change_light_hsl_default_set_t hsl_default_set

Light HSL Default Set

esp_ble_mesh_state_change_light_hsl_range_set_t hsl_range_set

Light HSL Range Set

esp_ble_mesh_state_change_light_xyl_set_t xyl_set

Light xyL Set

esp_ble_mesh_state_change_light_xyl_default_set_t xyl_default_set

Light xyL Default Set

esp_ble_mesh_state_change_light_xyl_range_set_t xyl_range_set

Light xyL Range Set

esp_ble_mesh_state_change_light_lc_mode_set_t lc_mode_set

Light LC Mode Set

esp_ble_mesh_state_change_light_lc_om_set_t lc_om_set

Light LC Occupancy Mode Set

esp_ble_mesh_state_change_light_lc_light_onoff_set_t lc_light_onoff_set

Light LC Light OnOff Set

esp_ble_mesh_state_change_light_lc_property_set_t lc_property_set

Light LC Property Set

esp_ble_mesh_state_change_sensor_status_t sensor_status

Sensor Status

union esp_ble_mesh_lighting_server_recv_get_msg_t
#include <esp_ble_mesh_lighting_model_api.h>

Lighting Server Model received get message union.

Public Members

esp_ble_mesh_server_recv_light_lc_property_get_t lc_property

Light LC Property Get

union esp_ble_mesh_lighting_server_recv_set_msg_t
#include <esp_ble_mesh_lighting_model_api.h>

Lighting Server Model received set message union.

Public Members

esp_ble_mesh_server_recv_light_lightness_set_t lightness

Light Lightness Set/Light Lightness Set Unack

esp_ble_mesh_server_recv_light_lightness_linear_set_t lightness_linear

Light Lightness Linear Set/Light Lightness Linear Set Unack

esp_ble_mesh_server_recv_light_lightness_default_set_t lightness_default

Light Lightness Default Set/Light Lightness Default Set Unack

esp_ble_mesh_server_recv_light_lightness_range_set_t lightness_range

Light Lightness Range Set/Light Lightness Range Set Unack

esp_ble_mesh_server_recv_light_ctl_set_t ctl

Light CTL Set/Light CTL Set Unack

esp_ble_mesh_server_recv_light_ctl_temperature_set_t ctl_temp

Light CTL Temperature Set/Light CTL Temperature Set Unack

esp_ble_mesh_server_recv_light_ctl_temperature_range_set_t ctl_temp_range

Light CTL Temperature Range Set/Light CTL Temperature Range Set Unack

esp_ble_mesh_server_recv_light_ctl_default_set_t ctl_default

Light CTL Default Set/Light CTL Default Set Unack

esp_ble_mesh_server_recv_light_hsl_set_t hsl

Light HSL Set/Light HSL Set Unack

esp_ble_mesh_server_recv_light_hsl_hue_set_t hsl_hue

Light HSL Hue Set/Light HSL Hue Set Unack

esp_ble_mesh_server_recv_light_hsl_saturation_set_t hsl_saturation

Light HSL Saturation Set/Light HSL Saturation Set Unack

esp_ble_mesh_server_recv_light_hsl_default_set_t hsl_default

Light HSL Default Set/Light HSL Default Set Unack

esp_ble_mesh_server_recv_light_hsl_range_set_t hsl_range

Light HSL Range Set/Light HSL Range Set Unack

esp_ble_mesh_server_recv_light_xyl_set_t xyl

Light xyL Set/Light xyL Set Unack

esp_ble_mesh_server_recv_light_xyl_default_set_t xyl_default

Light xyL Default Set/Light xyL Default Set Unack

esp_ble_mesh_server_recv_light_xyl_range_set_t xyl_range

Light xyL Range Set/Light xyL Range Set Unack

esp_ble_mesh_server_recv_light_lc_mode_set_t lc_mode

Light LC Mode Set/Light LC Mode Set Unack

esp_ble_mesh_server_recv_light_lc_om_set_t lc_om

Light LC OM Set/Light LC OM Set Unack

esp_ble_mesh_server_recv_light_lc_light_onoff_set_t lc_light_onoff

Light LC Light OnOff Set/Light LC Light OnOff Set Unack

esp_ble_mesh_server_recv_light_lc_property_set_t lc_property

Light LC Property Set/Light LC Property Set Unack

union esp_ble_mesh_lighting_server_recv_status_msg_t
#include <esp_ble_mesh_lighting_model_api.h>

Lighting Server Model received status message union.

Public Members

esp_ble_mesh_server_recv_sensor_status_t sensor_status

Sensor Status

union esp_ble_mesh_lighting_server_cb_value_t
#include <esp_ble_mesh_lighting_model_api.h>

Lighting Server Model callback value union.

Public Members

esp_ble_mesh_lighting_server_state_change_t state_change

ESP_BLE_MESH_LIGHTING_SERVER_STATE_CHANGE_EVT

esp_ble_mesh_lighting_server_recv_get_msg_t get

ESP_BLE_MESH_LIGHTING_SERVER_RECV_GET_MSG_EVT

esp_ble_mesh_lighting_server_recv_set_msg_t set

ESP_BLE_MESH_LIGHTING_SERVER_RECV_SET_MSG_EVT

esp_ble_mesh_lighting_server_recv_status_msg_t status

ESP_BLE_MESH_LIGHTING_SERVER_RECV_STATUS_MSG_EVT

Structures

struct esp_ble_mesh_light_lightness_set_t

Bluetooth Mesh Light Lightness Client Model Get and Set parameters structure.

Parameters of Light Lightness Set

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t lightness

Target value of light lightness actual state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_light_lightness_linear_set_t

Parameters of Light Lightness Linear Set

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t lightness

Target value of light lightness linear state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_light_lightness_default_set_t

Parameter of Light Lightness Default Set

Public Members

uint16_t lightness

The value of the Light Lightness Default state

struct esp_ble_mesh_light_lightness_range_set_t

Parameters of Light Lightness Range Set

Public Members

uint16_t range_min

Value of range min field of light lightness range state

uint16_t range_max

Value of range max field of light lightness range state

struct esp_ble_mesh_light_ctl_set_t

Parameters of Light CTL Set

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t ctl_lightness

Target value of light ctl lightness state

uint16_t ctl_temperatrue

Target value of light ctl temperature state

int16_t ctl_delta_uv

Target value of light ctl delta UV state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_light_ctl_temperature_set_t

Parameters of Light CTL Temperature Set

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t ctl_temperatrue

Target value of light ctl temperature state

int16_t ctl_delta_uv

Target value of light ctl delta UV state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_light_ctl_temperature_range_set_t

Parameters of Light CTL Temperature Range Set

Public Members

uint16_t range_min

Value of temperature range min field of light ctl temperature range state

uint16_t range_max

Value of temperature range max field of light ctl temperature range state

struct esp_ble_mesh_light_ctl_default_set_t

Parameters of Light CTL Default Set

Public Members

uint16_t lightness

Value of light lightness default state

uint16_t temperature

Value of light temperature default state

int16_t delta_uv

Value of light delta UV default state

struct esp_ble_mesh_light_hsl_set_t

Parameters of Light HSL Set

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t hsl_lightness

Target value of light hsl lightness state

uint16_t hsl_hue

Target value of light hsl hue state

uint16_t hsl_saturation

Target value of light hsl saturation state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_light_hsl_hue_set_t

Parameters of Light HSL Hue Set

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t hue

Target value of light hsl hue state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_light_hsl_saturation_set_t

Parameters of Light HSL Saturation Set

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t saturation

Target value of light hsl hue state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_light_hsl_default_set_t

Parameters of Light HSL Default Set

Public Members

uint16_t lightness

Value of light lightness default state

uint16_t hue

Value of light hue default state

uint16_t saturation

Value of light saturation default state

struct esp_ble_mesh_light_hsl_range_set_t

Parameters of Light HSL Range Set

Public Members

uint16_t hue_range_min

Value of hue range min field of light hsl hue range state

uint16_t hue_range_max

Value of hue range max field of light hsl hue range state

uint16_t saturation_range_min

Value of saturation range min field of light hsl saturation range state

uint16_t saturation_range_max

Value of saturation range max field of light hsl saturation range state

struct esp_ble_mesh_light_xyl_set_t

Parameters of Light xyL Set

Public Members

bool op_en

Indicate whether optional parameters included

uint16_t xyl_lightness

The target value of the Light xyL Lightness state

uint16_t xyl_x

The target value of the Light xyL x state

uint16_t xyl_y

The target value of the Light xyL y state

uint8_t tid

Transaction Identifier

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_light_xyl_default_set_t

Parameters of Light xyL Default Set

Public Members

uint16_t lightness

The value of the Light Lightness Default state

uint16_t xyl_x

The value of the Light xyL x Default state

uint16_t xyl_y

The value of the Light xyL y Default state

struct esp_ble_mesh_light_xyl_range_set_t

Parameters of Light xyL Range Set

Public Members

uint16_t xyl_x_range_min

The value of the xyL x Range Min field of the Light xyL x Range state

uint16_t xyl_x_range_max

The value of the xyL x Range Max field of the Light xyL x Range state

uint16_t xyl_y_range_min

The value of the xyL y Range Min field of the Light xyL y Range state

uint16_t xyl_y_range_max

The value of the xyL y Range Max field of the Light xyL y Range state

struct esp_ble_mesh_light_lc_mode_set_t

Parameter of Light LC Mode Set

Public Members

uint8_t mode

The target value of the Light LC Mode state

struct esp_ble_mesh_light_lc_om_set_t

Parameter of Light LC OM Set

Public Members

uint8_t mode

The target value of the Light LC Occupancy Mode state

struct esp_ble_mesh_light_lc_light_onoff_set_t

Parameters of Light LC Light OnOff Set

Public Members

bool op_en

Indicate whether optional parameters included

uint8_t light_onoff

The target value of the Light LC Light OnOff state

uint8_t tid

Transaction Identifier

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_light_lc_property_get_t

Parameter of Light LC Property Get

Public Members

uint16_t property_id

Property ID identifying a Light LC Property

struct esp_ble_mesh_light_lc_property_set_t

Parameters of Light LC Property Set

Public Members

uint16_t property_id

Property ID identifying a Light LC Property

struct net_buf_simple *property_value

Raw value for the Light LC Property

struct esp_ble_mesh_light_lightness_status_cb_t

Bluetooth Mesh Light Lightness Client Model Get and Set callback parameters structure.

Parameters of Light Lightness Status

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t present_lightness

Current value of light lightness actual state

uint16_t target_lightness

Target value of light lightness actual state (optional)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_light_lightness_linear_status_cb_t

Parameters of Light Lightness Linear Status

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t present_lightness

Current value of light lightness linear state

uint16_t target_lightness

Target value of light lightness linear state (optional)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_light_lightness_last_status_cb_t

Parameter of Light Lightness Last Status

Public Members

uint16_t lightness

The value of the Light Lightness Last state

struct esp_ble_mesh_light_lightness_default_status_cb_t

Parameter of Light Lightness Default Status

Public Members

uint16_t lightness

The value of the Light Lightness default State

struct esp_ble_mesh_light_lightness_range_status_cb_t

Parameters of Light Lightness Range Status

Public Members

uint8_t status_code

Status Code for the request message

uint16_t range_min

Value of range min field of light lightness range state

uint16_t range_max

Value of range max field of light lightness range state

struct esp_ble_mesh_light_ctl_status_cb_t

Parameters of Light CTL Status

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t present_ctl_lightness

Current value of light ctl lightness state

uint16_t present_ctl_temperature

Current value of light ctl temperature state

uint16_t target_ctl_lightness

Target value of light ctl lightness state (optional)

uint16_t target_ctl_temperature

Target value of light ctl temperature state (C.1)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_light_ctl_temperature_status_cb_t

Parameters of Light CTL Temperature Status

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t present_ctl_temperature

Current value of light ctl temperature state

uint16_t present_ctl_delta_uv

Current value of light ctl delta UV state

uint16_t target_ctl_temperature

Target value of light ctl temperature state (optional)

uint16_t target_ctl_delta_uv

Target value of light ctl delta UV state (C.1)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_light_ctl_temperature_range_status_cb_t

Parameters of Light CTL Temperature Range Status

Public Members

uint8_t status_code

Status code for the request message

uint16_t range_min

Value of temperature range min field of light ctl temperature range state

uint16_t range_max

Value of temperature range max field of light ctl temperature range state

struct esp_ble_mesh_light_ctl_default_status_cb_t

Parameters of Light CTL Default Status

Public Members

uint16_t lightness

Value of light lightness default state

uint16_t temperature

Value of light temperature default state

int16_t delta_uv

Value of light delta UV default state

struct esp_ble_mesh_light_hsl_status_cb_t

Parameters of Light HSL Status

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t hsl_lightness

Current value of light hsl lightness state

uint16_t hsl_hue

Current value of light hsl hue state

uint16_t hsl_saturation

Current value of light hsl saturation state

uint8_t remain_time

Time to complete state transition (optional)

struct esp_ble_mesh_light_hsl_target_status_cb_t

Parameters of Light HSL Target Status

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t hsl_lightness_target

Target value of light hsl lightness state

uint16_t hsl_hue_target

Target value of light hsl hue state

uint16_t hsl_saturation_target

Target value of light hsl saturation state

uint8_t remain_time

Time to complete state transition (optional)

struct esp_ble_mesh_light_hsl_hue_status_cb_t

Parameters of Light HSL Hue Status

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t present_hue

Current value of light hsl hue state

uint16_t target_hue

Target value of light hsl hue state (optional)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_light_hsl_saturation_status_cb_t

Parameters of Light HSL Saturation Status

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t present_saturation

Current value of light hsl saturation state

uint16_t target_saturation

Target value of light hsl saturation state (optional)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_light_hsl_default_status_cb_t

Parameters of Light HSL Default Status

Public Members

uint16_t lightness

Value of light lightness default state

uint16_t hue

Value of light hue default state

uint16_t saturation

Value of light saturation default state

struct esp_ble_mesh_light_hsl_range_status_cb_t

Parameters of Light HSL Range Status

Public Members

uint8_t status_code

Status code for the request message

uint16_t hue_range_min

Value of hue range min field of light hsl hue range state

uint16_t hue_range_max

Value of hue range max field of light hsl hue range state

uint16_t saturation_range_min

Value of saturation range min field of light hsl saturation range state

uint16_t saturation_range_max

Value of saturation range max field of light hsl saturation range state

struct esp_ble_mesh_light_xyl_status_cb_t

Parameters of Light xyL Status

Public Members

bool op_en

Indicate whether optional parameters included

uint16_t xyl_lightness

The present value of the Light xyL Lightness state

uint16_t xyl_x

The present value of the Light xyL x state

uint16_t xyl_y

The present value of the Light xyL y state

uint8_t remain_time

Time to complete state transition (optional)

struct esp_ble_mesh_light_xyl_target_status_cb_t

Parameters of Light xyL Target Status

Public Members

bool op_en

Indicate whether optional parameters included

uint16_t target_xyl_lightness

The target value of the Light xyL Lightness state

uint16_t target_xyl_x

The target value of the Light xyL x state

uint16_t target_xyl_y

The target value of the Light xyL y state

uint8_t remain_time

Time to complete state transition (optional)

struct esp_ble_mesh_light_xyl_default_status_cb_t

Parameters of Light xyL Default Status

Public Members

uint16_t lightness

The value of the Light Lightness Default state

uint16_t xyl_x

The value of the Light xyL x Default state

uint16_t xyl_y

The value of the Light xyL y Default state

struct esp_ble_mesh_light_xyl_range_status_cb_t

Parameters of Light xyL Range Status

Public Members

uint8_t status_code

Status Code for the requesting message

uint16_t xyl_x_range_min

The value of the xyL x Range Min field of the Light xyL x Range state

uint16_t xyl_x_range_max

The value of the xyL x Range Max field of the Light xyL x Range state

uint16_t xyl_y_range_min

The value of the xyL y Range Min field of the Light xyL y Range state

uint16_t xyl_y_range_max

The value of the xyL y Range Max field of the Light xyL y Range state

struct esp_ble_mesh_light_lc_mode_status_cb_t

Parameter of Light LC Mode Status

Public Members

uint8_t mode

The present value of the Light LC Mode state

struct esp_ble_mesh_light_lc_om_status_cb_t

Parameter of Light LC OM Status

Public Members

uint8_t mode

The present value of the Light LC Occupancy Mode state

struct esp_ble_mesh_light_lc_light_onoff_status_cb_t

Parameters of Light LC Light OnOff Status

Public Members

bool op_en

Indicate whether optional parameters included

uint8_t present_light_onoff

The present value of the Light LC Light OnOff state

uint8_t target_light_onoff

The target value of the Light LC Light OnOff state (Optional)

uint8_t remain_time

Time to complete state transition (C.1)

struct esp_ble_mesh_light_lc_property_status_cb_t

Parameters of Light LC Property Status

Public Members

uint16_t property_id

Property ID identifying a Light LC Property

struct net_buf_simple *property_value

Raw value for the Light LC Property

struct esp_ble_mesh_light_client_cb_param_t

Lighting Client Model callback parameters

Public Members

int error_code

Appropriate error code

esp_ble_mesh_client_common_param_t *params

The client common parameters.

esp_ble_mesh_light_client_status_cb_t status_cb

The light status message callback values

struct esp_ble_mesh_light_lightness_state_t

Parameters of Light Lightness state

Public Members

uint16_t lightness_linear

The present value of Light Lightness Linear state

uint16_t target_lightness_linear

The target value of Light Lightness Linear state

uint16_t lightness_actual

The present value of Light Lightness Actual state

uint16_t target_lightness_actual

The target value of Light Lightness Actual state

uint16_t lightness_last

The value of Light Lightness Last state

uint16_t lightness_default

The value of Light Lightness Default state

uint8_t status_code

The status code of setting Light Lightness Range state

uint16_t lightness_range_min

The minimum value of Light Lightness Range state

uint16_t lightness_range_max

The maximum value of Light Lightness Range state

struct esp_ble_mesh_light_lightness_srv_t

User data of Light Lightness Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting Lightness Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_lightness_state_t *state

Parameters of the Light Lightness state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t actual_transition

Parameters of state transition

esp_ble_mesh_state_transition_t linear_transition

Parameters of state transition

int32_t tt_delta_lightness_actual

Delta change value of lightness actual state transition

int32_t tt_delta_lightness_linear

Delta change value of lightness linear state transition

struct esp_ble_mesh_light_lightness_setup_srv_t

User data of Light Lightness Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting Lightness Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_lightness_state_t *state

Parameters of the Light Lightness state

struct esp_ble_mesh_light_ctl_state_t

Parameters of Light CTL state

Public Members

uint16_t lightness

The present value of Light CTL Lightness state

uint16_t target_lightness

The target value of Light CTL Lightness state

uint16_t temperature

The present value of Light CTL Temperature state

uint16_t target_temperature

The target value of Light CTL Temperature state

int16_t delta_uv

The present value of Light CTL Delta UV state

int16_t target_delta_uv

The target value of Light CTL Delta UV state

uint8_t status_code

The statue code of setting Light CTL Temperature Range state

uint16_t temperature_range_min

The minimum value of Light CTL Temperature Range state

uint16_t temperature_range_max

The maximum value of Light CTL Temperature Range state

uint16_t lightness_default

The value of Light Lightness Default state

uint16_t temperature_default

The value of Light CTL Temperature Default state

int16_t delta_uv_default

The value of Light CTL Delta UV Default state

struct esp_ble_mesh_light_ctl_srv_t

User data of Light CTL Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting CTL Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_ctl_state_t *state

Parameters of the Light CTL state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

int32_t tt_delta_lightness

Delta change value of lightness state transition

int32_t tt_delta_temperature

Delta change value of temperature state transition

int32_t tt_delta_delta_uv

Delta change value of delta uv state transition

struct esp_ble_mesh_light_ctl_setup_srv_t

User data of Light CTL Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting CTL Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_ctl_state_t *state

Parameters of the Light CTL state

struct esp_ble_mesh_light_ctl_temp_srv_t

User data of Light CTL Temperature Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting CTL Temperature Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_ctl_state_t *state

Parameters of the Light CTL state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

int32_t tt_delta_temperature

Delta change value of temperature state transition

int32_t tt_delta_delta_uv

Delta change value of delta uv state transition

struct esp_ble_mesh_light_hsl_state_t

Parameters of Light HSL state

Public Members

uint16_t lightness

The present value of Light HSL Lightness state

uint16_t target_lightness

The target value of Light HSL Lightness state

uint16_t hue

The present value of Light HSL Hue state

uint16_t target_hue

The target value of Light HSL Hue state

uint16_t saturation

The present value of Light HSL Saturation state

uint16_t target_saturation

The target value of Light HSL Saturation state

uint16_t lightness_default

The value of Light Lightness Default state

uint16_t hue_default

The value of Light HSL Hue Default state

uint16_t saturation_default

The value of Light HSL Saturation Default state

uint8_t status_code

The status code of setting Light HSL Hue & Saturation Range state

uint16_t hue_range_min

The minimum value of Light HSL Hue Range state

uint16_t hue_range_max

The maximum value of Light HSL Hue Range state

uint16_t saturation_range_min

The minimum value of Light HSL Saturation state

uint16_t saturation_range_max

The maximum value of Light HSL Saturation state

struct esp_ble_mesh_light_hsl_srv_t

User data of Light HSL Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting HSL Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_hsl_state_t *state

Parameters of the Light HSL state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

int32_t tt_delta_lightness

Delta change value of lightness state transition

int32_t tt_delta_hue

Delta change value of hue state transition

int32_t tt_delta_saturation

Delta change value of saturation state transition

struct esp_ble_mesh_light_hsl_setup_srv_t

User data of Light HSL Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting HSL Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_hsl_state_t *state

Parameters of the Light HSL state

struct esp_ble_mesh_light_hsl_hue_srv_t

User data of Light HSL Hue Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting HSL Hue Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_hsl_state_t *state

Parameters of the Light HSL state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

int32_t tt_delta_hue

Delta change value of hue state transition

struct esp_ble_mesh_light_hsl_sat_srv_t

User data of Light HSL Saturation Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting HSL Saturation Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_hsl_state_t *state

Parameters of the Light HSL state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

int32_t tt_delta_saturation

Delta change value of saturation state transition

struct esp_ble_mesh_light_xyl_state_t

Parameters of Light xyL state

Public Members

uint16_t lightness

The present value of Light xyL Lightness state

uint16_t target_lightness

The target value of Light xyL Lightness state

uint16_t x

The present value of Light xyL x state

uint16_t target_x

The target value of Light xyL x state

uint16_t y

The present value of Light xyL y state

uint16_t target_y

The target value of Light xyL y state

uint16_t lightness_default

The value of Light Lightness Default state

uint16_t x_default

The value of Light xyL x Default state

uint16_t y_default

The value of Light xyL y Default state

uint8_t status_code

The status code of setting Light xyL x & y Range state

uint16_t x_range_min

The minimum value of Light xyL x Range state

uint16_t x_range_max

The maximum value of Light xyL x Range state

uint16_t y_range_min

The minimum value of Light xyL y Range state

uint16_t y_range_max

The maximum value of Light xyL y Range state

struct esp_ble_mesh_light_xyl_srv_t

User data of Light xyL Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting xyL Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_xyl_state_t *state

Parameters of the Light xyL state

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

int32_t tt_delta_lightness

Delta change value of lightness state transition

int32_t tt_delta_x

Delta change value of x state transition

int32_t tt_delta_y

Delta change value of y state transition

struct esp_ble_mesh_light_xyl_setup_srv_t

User data of Light xyL Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting xyL Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_xyl_state_t *state

Parameters of the Light xyL state

struct esp_ble_mesh_light_lc_state_t

Parameters of Light LC states

Public Members

uint32_t mode : 1

0b0 The controller is turned off.

  • The binding with the Light Lightness state is disabled. 0b1 The controller is turned on.

  • The binding with the Light Lightness state is enabled. The value of Light LC Mode state

uint32_t occupancy_mode : 1

The value of Light LC Occupancy Mode state

uint32_t light_onoff : 1

The present value of Light LC Light OnOff state

uint32_t target_light_onoff : 1

The target value of Light LC Light OnOff state

uint32_t occupancy : 1

The value of Light LC Occupancy state

uint32_t ambient_luxlevel : 24

The value of Light LC Ambient LuxLevel state

uint16_t linear_output

  1. Light LC Linear Output = max((Lightness Out)^2/65535, Regulator Output)

  2. If the Light LC Mode state is set to 0b1, the binding is enabled and upon a change of the Light LC Linear Output state, the following operation shall be performed: Light Lightness Linear = Light LC Linear Output

  3. If the Light LC Mode state is set to 0b0, the binding is disabled (i.e., upon a change of the Light LC Linear Output state, no operation on the Light Lightness Linear state is performed). The value of Light LC Linear Output state

struct esp_ble_mesh_light_lc_property_state_t

Parameters of Light Property states. The Light LC Property states are read / write states that determine the configuration of a Light Lightness Controller. Each state is represented by a device property and is controlled by Light LC Property messages.

Public Members

uint32_t time_occupancy_delay

A timing state that determines the delay for changing the Light LC Occupancy state upon receiving a Sensor Status message from an occupancy sensor. The value of Light LC Time Occupancy Delay state

uint32_t time_fade_on

A timing state that determines the time the controlled lights fade to the level determined by the Light LC Lightness On state. The value of Light LC Time Fade On state

uint32_t time_run_on

A timing state that determines the time the controlled lights stay at the level determined by the Light LC Lightness On state. The value of Light LC Time Run On state

uint32_t time_fade

A timing state that determines the time the controlled lights fade from the level determined by the Light LC Lightness On state to the level determined by the Light Lightness Prolong state. The value of Light LC Time Fade state

uint32_t time_prolong

A timing state that determines the time the controlled lights stay at the level determined by the Light LC Lightness Prolong state. The value of Light LC Time Prolong state

uint32_t time_fade_standby_auto

A timing state that determines the time the controlled lights fade from the level determined by the Light LC Lightness Prolong state to the level determined by the Light LC Lightness Standby state when the transition is automatic. The value of Light LC Time Fade Standby Auto state

uint32_t time_fade_standby_manual

A timing state that determines the time the controlled lights fade from the level determined by the Light LC Lightness Prolong state to the level determined by the Light LC Lightness Standby state when the transition is triggered by a change in the Light LC Light OnOff state. The value of Light LC Time Fade Standby Manual state

uint16_t lightness_on

A lightness state that determines the perceptive light lightness at the Occupancy and Run internal controller states. The value of Light LC Lightness On state

uint16_t lightness_prolong

A lightness state that determines the light lightness at the Prolong internal controller state. The value of Light LC Lightness Prolong state

uint16_t lightness_standby

A lightness state that determines the light lightness at the Standby internal controller state. The value of Light LC Lightness Standby state

uint16_t ambient_luxlevel_on

A uint16 state representing the Ambient LuxLevel level that determines if the controller transitions from the Light Control Standby state. The value of Light LC Ambient LuxLevel On state

uint16_t ambient_luxlevel_prolong

A uint16 state representing the required Ambient LuxLevel level in the Prolong state. The value of Light LC Ambient LuxLevel Prolong state

uint16_t ambient_luxlevel_standby

A uint16 state representing the required Ambient LuxLevel level in the Standby state. The value of Light LC Ambient LuxLevel Standby state

float regulator_kiu

A float32 state representing the integral coefficient that determines the integral part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is less than LuxLevel Out. Valid range: 0.0 ~ 1000.0. The default value is 250.0. The value of Light LC Regulator Kiu state

float regulator_kid

A float32 state representing the integral coefficient that determines the integral part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is greater than or equal to the value of the LuxLevel Out state. Valid range: 0.0 ~ 1000.0. The default value is 25.0. The value of Light LC Regulator Kid state

float regulator_kpu

A float32 state representing the proportional coefficient that determines the proportional part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is less than the value of the LuxLevel Out state. Valid range: 0.0 ~ 1000.0. The default value is 80.0. The value of Light LC Regulator Kpu state

float regulator_kpd

A float32 state representing the proportional coefficient that determines the proportional part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is greater than or equal to the value of the LuxLevel Out state. Valid range: 0.0 ~ 1000.0. The default value is 80.0. The value of Light LC Regulator Kpd state

int8_t regulator_accuracy

A int8 state representing the percentage accuracy of the Light LC PI Feedback Regulator. Valid range: 0.0 ~ 100.0. The default value is 2.0. The value of Light LC Regulator Accuracy state

uint32_t set_occupancy_to_1_delay

If the message Raw field contains a Raw Value for the Time Since Motion Sensed device property, which represents a value less than or equal to the value of the Light LC Occupancy Delay state, it shall delay setting the Light LC Occupancy state to 0b1 by the difference between the value of the Light LC Occupancy Delay state and the received Time Since Motion value. The value of the difference between value of the Light LC Occupancy Delay state and the received Time Since Motion value

struct esp_ble_mesh_light_lc_state_machine_t

Parameters of Light LC state machine

Public Members

uint8_t fade_on

The value of transition time of Light LC Time Fade On

uint8_t fade

The value of transition time of Light LC Time Fade

uint8_t fade_standby_auto

The value of transition time of Light LC Time Fade Standby Auto

uint8_t fade_standby_manual

The value of transition time of Light LC Time Fade Standby Manual

struct esp_ble_mesh_light_lc_state_machine_t::[anonymous] trans_time

The Fade On, Fade, Fade Standby Auto, and Fade Standby Manual states are transition states that define the transition of the Lightness Out and LuxLevel Out states. This transition can be started as a result of the Light LC State Machine change or as a result of receiving the Light LC Light OnOff Set or Light LC Light Set Unacknowledged message. The value of transition time

esp_ble_mesh_lc_state_t state

The value of Light LC state machine state

struct k_delayed_work timer

Timer of Light LC state machine

struct esp_ble_mesh_light_control_t

Parameters of Light Lightness controller

Public Members

esp_ble_mesh_light_lc_state_t state

Parameters of Light LC state

esp_ble_mesh_light_lc_property_state_t prop_state

Parameters of Light LC Property state

esp_ble_mesh_light_lc_state_machine_t state_machine

Parameters of Light LC state machine

struct esp_ble_mesh_light_lc_srv_t

User data of Light LC Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting LC Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_control_t *lc

Parameters of the Light controller

esp_ble_mesh_last_msg_info_t last

Parameters of the last received set message

esp_ble_mesh_state_transition_t transition

Parameters of state transition

struct esp_ble_mesh_light_lc_setup_srv_t

User data of Light LC Setup Server Model

Public Members

esp_ble_mesh_model_t *model

Pointer to the Lighting LC Setup Server Model. Initialized internally.

esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl

Response control of the server model received messages

esp_ble_mesh_light_control_t *lc

Parameters of the Light controller

struct esp_ble_mesh_state_change_light_lightness_set_t

Parameter of Light Lightness Actual state change event

Public Members

uint16_t lightness

The value of Light Lightness Actual state

struct esp_ble_mesh_state_change_light_lightness_linear_set_t

Parameter of Light Lightness Linear state change event

Public Members

uint16_t lightness

The value of Light Lightness Linear state

struct esp_ble_mesh_state_change_light_lightness_default_set_t

Parameter of Light Lightness Default state change event

Public Members

uint16_t lightness

The value of Light Lightness Default state

struct esp_ble_mesh_state_change_light_lightness_range_set_t

Parameters of Light Lightness Range state change event

Public Members

uint16_t range_min

The minimum value of Light Lightness Range state

uint16_t range_max

The maximum value of Light Lightness Range state

struct esp_ble_mesh_state_change_light_ctl_set_t

Parameters of Light CTL state change event

Public Members

uint16_t lightness

The value of Light CTL Lightness state

uint16_t temperature

The value of Light CTL Temperature state

int16_t delta_uv

The value of Light CTL Delta UV state

struct esp_ble_mesh_state_change_light_ctl_temperature_set_t

Parameters of Light CTL Temperature state change event

Public Members

uint16_t temperature

The value of Light CTL Temperature state

int16_t delta_uv

The value of Light CTL Delta UV state

struct esp_ble_mesh_state_change_light_ctl_temperature_range_set_t

Parameters of Light CTL Temperature Range state change event

Public Members

uint16_t range_min

The minimum value of Light CTL Temperature Range state

uint16_t range_max

The maximum value of Light CTL Temperature Range state

struct esp_ble_mesh_state_change_light_ctl_default_set_t

Parameters of Light CTL Default state change event

Public Members

uint16_t lightness

The value of Light Lightness Default state

uint16_t temperature

The value of Light CTL Temperature Default state

int16_t delta_uv

The value of Light CTL Delta UV Default state

struct esp_ble_mesh_state_change_light_hsl_set_t

Parameters of Light HSL state change event

Public Members

uint16_t lightness

The value of Light HSL Lightness state

uint16_t hue

The value of Light HSL Hue state

uint16_t saturation

The value of Light HSL Saturation state

struct esp_ble_mesh_state_change_light_hsl_hue_set_t

Parameter of Light HSL Hue state change event

Public Members

uint16_t hue

The value of Light HSL Hue state

struct esp_ble_mesh_state_change_light_hsl_saturation_set_t

Parameter of Light HSL Saturation state change event

Public Members

uint16_t saturation

The value of Light HSL Saturation state

struct esp_ble_mesh_state_change_light_hsl_default_set_t

Parameters of Light HSL Default state change event

Public Members

uint16_t lightness

The value of Light HSL Lightness Default state

uint16_t hue

The value of Light HSL Hue Default state

uint16_t saturation

The value of Light HSL Saturation Default state

struct esp_ble_mesh_state_change_light_hsl_range_set_t

Parameters of Light HSL Range state change event

Public Members

uint16_t hue_range_min

The minimum hue value of Light HSL Range state

uint16_t hue_range_max

The maximum hue value of Light HSL Range state

uint16_t saturation_range_min

The minimum saturation value of Light HSL Range state

uint16_t saturation_range_max

The maximum saturation value of Light HSL Range state

struct esp_ble_mesh_state_change_light_xyl_set_t

Parameters of Light xyL state change event

Public Members

uint16_t lightness

The value of Light xyL Lightness state

uint16_t x

The value of Light xyL x state

uint16_t y

The value of Light xyL y state

struct esp_ble_mesh_state_change_light_xyl_default_set_t

Parameters of Light xyL Default state change event

Public Members

uint16_t lightness

The value of Light Lightness Default state

uint16_t x

The value of Light xyL x Default state

uint16_t y

The value of Light xyL y Default state

struct esp_ble_mesh_state_change_light_xyl_range_set_t

Parameters of Light xyL Range state change event

Public Members

uint16_t x_range_min

The minimum value of Light xyL x Range state

uint16_t x_range_max

The maximum value of Light xyL x Range state

uint16_t y_range_min

The minimum value of Light xyL y Range state

uint16_t y_range_max

The maximum value of Light xyL y Range state

struct esp_ble_mesh_state_change_light_lc_mode_set_t

Parameter of Light LC Mode state change event

Public Members

uint8_t mode

The value of Light LC Mode state

struct esp_ble_mesh_state_change_light_lc_om_set_t

Parameter of Light LC Occupancy Mode state change event

Public Members

uint8_t mode

The value of Light LC Occupancy Mode state

struct esp_ble_mesh_state_change_light_lc_light_onoff_set_t

Parameter of Light LC Light OnOff state change event

Public Members

uint8_t onoff

The value of Light LC Light OnOff state

struct esp_ble_mesh_state_change_light_lc_property_set_t

Parameters of Light LC Property state change event

Public Members

uint16_t property_id

The property id of Light LC Property state

struct net_buf_simple *property_value

The property value of Light LC Property state

struct esp_ble_mesh_state_change_sensor_status_t

Parameters of Sensor Status state change event

Public Members

uint16_t property_id

The value of Sensor Property ID

uint8_t occupancy

The value of Light LC Occupancy state

uint32_t set_occupancy_to_1_delay

The value of Light LC Set Occupancy to 1 Delay state

uint32_t ambient_luxlevel

The value of Light LC Ambient Luxlevel state

union esp_ble_mesh_state_change_sensor_status_t::[anonymous] state

Parameters of Sensor Status related state

struct esp_ble_mesh_server_recv_light_lc_property_get_t

Context of the received Light LC Property Get message

Public Members

uint16_t property_id

Property ID identifying a Light LC Property

struct esp_ble_mesh_server_recv_light_lightness_set_t

Context of the received Light Lightness Set message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t lightness

Target value of light lightness actual state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_light_lightness_linear_set_t

Context of the received Light Lightness Linear Set message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t lightness

Target value of light lightness linear state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_light_lightness_default_set_t

Context of the received Light Lightness Default Set message

Public Members

uint16_t lightness

The value of the Light Lightness Default state

struct esp_ble_mesh_server_recv_light_lightness_range_set_t

Context of the received Light Lightness Range Set message

Public Members

uint16_t range_min

Value of range min field of light lightness range state

uint16_t range_max

Value of range max field of light lightness range state

struct esp_ble_mesh_server_recv_light_ctl_set_t

Context of the received Light CTL Set message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t lightness

Target value of light ctl lightness state

uint16_t temperature

Target value of light ctl temperature state

int16_t delta_uv

Target value of light ctl delta UV state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_light_ctl_temperature_set_t

Context of the received Light CTL Temperature Set message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t temperature

Target value of light ctl temperature state

int16_t delta_uv

Target value of light ctl delta UV state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_light_ctl_temperature_range_set_t

Context of the received Light CTL Temperature Range Set message

Public Members

uint16_t range_min

Value of temperature range min field of light ctl temperature range state

uint16_t range_max

Value of temperature range max field of light ctl temperature range state

struct esp_ble_mesh_server_recv_light_ctl_default_set_t

Context of the received Light CTL Default Set message

Public Members

uint16_t lightness

Value of light lightness default state

uint16_t temperature

Value of light temperature default state

int16_t delta_uv

Value of light delta UV default state

struct esp_ble_mesh_server_recv_light_hsl_set_t

Context of the received Light HSL Set message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t lightness

Target value of light hsl lightness state

uint16_t hue

Target value of light hsl hue state

uint16_t saturation

Target value of light hsl saturation state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_light_hsl_hue_set_t

Context of the received Light HSL Hue Set message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t hue

Target value of light hsl hue state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_light_hsl_saturation_set_t

Context of the received Light HSL Saturation Set message

Public Members

bool op_en

Indicate if optional parameters are included

uint16_t saturation

Target value of light hsl hue state

uint8_t tid

Transaction ID

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_light_hsl_default_set_t

Context of the received Light HSL Default Set message

Public Members

uint16_t lightness

Value of light lightness default state

uint16_t hue

Value of light hue default state

uint16_t saturation

Value of light saturation default state

struct esp_ble_mesh_server_recv_light_hsl_range_set_t

Context of the received Light HSL Range Set message

Public Members

uint16_t hue_range_min

Value of hue range min field of light hsl hue range state

uint16_t hue_range_max

Value of hue range max field of light hsl hue range state

uint16_t saturation_range_min

Value of saturation range min field of light hsl saturation range state

uint16_t saturation_range_max

Value of saturation range max field of light hsl saturation range state

struct esp_ble_mesh_server_recv_light_xyl_set_t

Context of the received Light xyL Set message

Public Members

bool op_en

Indicate whether optional parameters included

uint16_t lightness

The target value of the Light xyL Lightness state

uint16_t x

The target value of the Light xyL x state

uint16_t y

The target value of the Light xyL y state

uint8_t tid

Transaction Identifier

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_light_xyl_default_set_t

Context of the received Light xyL Default Set message

Public Members

uint16_t lightness

The value of the Light Lightness Default state

uint16_t x

The value of the Light xyL x Default state

uint16_t y

The value of the Light xyL y Default state

struct esp_ble_mesh_server_recv_light_xyl_range_set_t

Context of the received Light xyl Range Set message

Public Members

uint16_t x_range_min

The value of the xyL x Range Min field of the Light xyL x Range state

uint16_t x_range_max

The value of the xyL x Range Max field of the Light xyL x Range state

uint16_t y_range_min

The value of the xyL y Range Min field of the Light xyL y Range state

uint16_t y_range_max

The value of the xyL y Range Max field of the Light xyL y Range state

struct esp_ble_mesh_server_recv_light_lc_mode_set_t

Context of the received Light LC Mode Set message

Public Members

uint8_t mode

The target value of the Light LC Mode state

struct esp_ble_mesh_server_recv_light_lc_om_set_t

Context of the received Light OM Set message

Public Members

uint8_t mode

The target value of the Light LC Occupancy Mode state

struct esp_ble_mesh_server_recv_light_lc_light_onoff_set_t

Context of the received Light LC Light OnOff Set message

Public Members

bool op_en

Indicate whether optional parameters included

uint8_t light_onoff

The target value of the Light LC Light OnOff state

uint8_t tid

Transaction Identifier

uint8_t trans_time

Time to complete state transition (optional)

uint8_t delay

Indicate message execution delay (C.1)

struct esp_ble_mesh_server_recv_light_lc_property_set_t

Context of the received Light LC Property Set message

Public Members

uint16_t property_id

Property ID identifying a Light LC Property

struct net_buf_simple *property_value

Raw value for the Light LC Property

struct esp_ble_mesh_server_recv_sensor_status_t

Context of the received Sensor Status message

Public Members

struct net_buf_simple *data

Value of sensor data state (optional)

struct esp_ble_mesh_lighting_server_cb_param_t

Lighting Server Model callback parameters

Public Members

esp_ble_mesh_model_t *model

Pointer to Lighting Server Models

esp_ble_mesh_msg_ctx_t ctx

Context of the received messages

esp_ble_mesh_lighting_server_cb_value_t value

Value of the received Lighting Messages

Macros

ESP_BLE_MESH_MODEL_LIGHT_LIGHTNESS_CLI(cli_pub, cli_data)

Define a new Light Lightness Client Model.

Note

This API needs to be called for each element on which the application needs to have a Light Lightness Client Model.

Return

New Light Lightness Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_CTL_CLI(cli_pub, cli_data)

Define a new Light CTL Client Model.

Note

This API needs to be called for each element on which the application needs to have a Light CTL Client Model.

Return

New Light CTL Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_HSL_CLI(cli_pub, cli_data)

Define a new Light HSL Client Model.

Note

This API needs to be called for each element on which the application needs to have a Light HSL Client Model.

Return

New Light HSL Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_XYL_CLI(cli_pub, cli_data)

Define a new Light xyL Client Model.

Note

This API needs to be called for each element on which the application needs to have a Light xyL Client Model.

Return

New Light xyL Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_LC_CLI(cli_pub, cli_data)

Define a new Light LC Client Model.

Note

This API needs to be called for each element on which the application needs to have a Light LC Client Model.

Return

New Light LC Client Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_LIGHTNESS_SRV(srv_pub, srv_data)

Lighting Server Models related context.

Define a new Light Lightness Server Model.

Note

1. The Light Lightness Server model extends the Generic Power OnOff Server model and the Generic Level Server model. When this model is present on an Element, the corresponding Light Lightness Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

Return

New Light Lightness Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_LIGHTNESS_SETUP_SRV(srv_pub, srv_data)

Define a new Light Lightness Setup Server Model.

Note

1. The Light Lightness Setup Server model extends the Light Lightness Server model and the Generic Power OnOff Setup Server model.

  1. This model shall support model subscription.

Return

New Light Lightness Setup Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_CTL_SRV(srv_pub, srv_data)

Define a new Light CTL Server Model.

Note

1. The Light CTL Server model extends the Light Lightness Server model. When this model is present on an Element, the corresponding Light CTL Temperature Server model and the corresponding Light CTL Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

  2. The model requires two elements: the main element and the Temperature element. The Temperature element contains the corresponding Light CTL Temperature Server model and an instance of a Generic Level state bound to the Light CTL Temperature state on the Temperature element. The Light CTL Temperature state on the Temperature element is bound to the Light CTL state on the main element.

Return

New Light CTL Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_CTL_SETUP_SRV(srv_pub, srv_data)

Define a new Light CTL Setup Server Model.

Note

1. The Light CTL Setup Server model extends the Light CTL Server and the Light Lightness Setup Server.

  1. This model shall support model subscription.

Return

New Light CTL Setup Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_CTL_TEMP_SRV(srv_pub, srv_data)

Define a new Light CTL Temperature Server Model.

Note

1. The Light CTL Temperature Server model extends the Generic Level Server model.

  1. This model shall support model publication and model subscription.

Return

New Light CTL Temperature Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_HSL_SRV(srv_pub, srv_data)

Define a new Light HSL Server Model.

Note

1. The Light HSL Server model extends the Light Lightness Server model. When this model is present on an Element, the corresponding Light HSL Hue Server model and the corresponding Light HSL Saturation Server model and the corresponding Light HSL Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

  2. The model requires three elements: the main element and the Hue element and the Saturation element. The Hue element contains the corresponding Light HSL Hue Server model and an instance of a Generic Level state bound to the Light HSL Hue state on the Hue element. The Saturation element contains the corresponding Light HSL Saturation Server model and an instance of a Generic Level state bound to the Light HSL Saturation state on the Saturation element. The Light HSL Hue state on the Hue element is bound to the Light HSL state on the main element and the Light HSL Saturation state on the Saturation element is bound to the Light HSL state on the main element.

Return

New Light HSL Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_HSL_SETUP_SRV(srv_pub, srv_data)

Define a new Light HSL Setup Server Model.

Note

1. The Light HSL Setup Server model extends the Light HSL Server and the Light Lightness Setup Server.

  1. This model shall support model subscription.

Return

New Light HSL Setup Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_HSL_HUE_SRV(srv_pub, srv_data)

Define a new Light HSL Hue Server Model.

Note

1. The Light HSL Hue Server model extends the Generic Level Server model. This model is associated with the Light HSL Server model.

  1. This model shall support model publication and model subscription.

Return

New Light HSL Hue Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_HSL_SAT_SRV(srv_pub, srv_data)

Define a new Light HSL Saturation Server Model.

Note

1. The Light HSL Saturation Server model extends the Generic Level Server model. This model is associated with the Light HSL Server model.

  1. This model shall support model publication and model subscription.

Return

New Light HSL Saturation Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_XYL_SRV(srv_pub, srv_data)

Define a new Light xyL Server Model.

Note

1. The Light xyL Server model extends the Light Lightness Server model. When this model is present on an Element, the corresponding Light xyL Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

Return

New Light xyL Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_XYL_SETUP_SRV(srv_pub, srv_data)

Define a new Light xyL Setup Server Model.

Note

1. The Light xyL Setup Server model extends the Light xyL Server and the Light Lightness Setup Server.

  1. This model shall support model subscription.

Return

New Light xyL Setup Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_LC_SRV(srv_pub, srv_data)

Define a new Light LC Server Model.

Note

1. The Light LC (Lightness Control) Server model extends the Light Lightness Server model and the Generic OnOff Server model. When this model is present on an Element, the corresponding Light LC Setup Server model shall also be present.

  1. This model shall support model publication and model subscription.

  2. This model may be used to represent an element that is a client to a Sensor Server model and controls the Light Lightness Actual state via defined state bindings.

Return

New Light LC Server Model instance.

Parameters

ESP_BLE_MESH_MODEL_LIGHT_LC_SETUP_SRV(srv_pub, srv_data)

Define a new Light LC Setup Server Model.

Note

1. The Light LC (Lightness Control) Setup model extends the Light LC Server model.

  1. This model shall support model publication and model subscription.

  2. This model may be used to configure setup parameters for the Light LC Server model.

Return

New Light LC Setup Server Model instance.

Parameters

Type Definitions

typedef void (*esp_ble_mesh_light_client_cb_t)(esp_ble_mesh_light_client_cb_event_t event, esp_ble_mesh_light_client_cb_param_t *param)

Bluetooth Mesh Light Client Model function.

Lighting Client Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

typedef void (*esp_ble_mesh_lighting_server_cb_t)(esp_ble_mesh_lighting_server_cb_event_t event, esp_ble_mesh_lighting_server_cb_param_t *param)

Bluetooth Mesh Lighting Server Model function.

Lighting Server Model callback function type

Parameters
  • event: Event type

  • param: Pointer to callback parameter

Enumerations

enum esp_ble_mesh_light_client_cb_event_t

This enum value is the event of Lighting Client Model

Values:

ESP_BLE_MESH_LIGHT_CLIENT_GET_STATE_EVT
ESP_BLE_MESH_LIGHT_CLIENT_SET_STATE_EVT
ESP_BLE_MESH_LIGHT_CLIENT_PUBLISH_EVT
ESP_BLE_MESH_LIGHT_CLIENT_TIMEOUT_EVT
ESP_BLE_MESH_LIGHT_CLIENT_EVT_MAX
enum esp_ble_mesh_lc_state_t

This enum value is the Light LC State Machine states

Values:

ESP_BLE_MESH_LC_OFF
ESP_BLE_MESH_LC_STANDBY
ESP_BLE_MESH_LC_FADE_ON
ESP_BLE_MESH_LC_RUN
ESP_BLE_MESH_LC_FADE
ESP_BLE_MESH_LC_PROLONG
ESP_BLE_MESH_LC_FADE_STANDBY_AUTO
ESP_BLE_MESH_LC_FADE_STANDBY_MANUAL
enum esp_ble_mesh_lighting_server_cb_event_t

This enum value is the event of Lighting Server Model

Values:

ESP_BLE_MESH_LIGHTING_SERVER_STATE_CHANGE_EVT

  1. When get_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, no event will be callback to the application layer when Lighting Get messages are received.

  2. When set_auto_rsp is set to ESP_BLE_MESH_SERVER_AUTO_RSP, this event will be callback to the application layer when Lighting Set/Set Unack messages are received.

ESP_BLE_MESH_LIGHTING_SERVER_RECV_GET_MSG_EVT

When get_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when Lighting Get messages are received.

ESP_BLE_MESH_LIGHTING_SERVER_RECV_SET_MSG_EVT

When set_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when Lighting Set/Set Unack messages are received.

ESP_BLE_MESH_LIGHTING_SERVER_RECV_STATUS_MSG_EVT

When status_auto_rsp is set to ESP_BLE_MESH_SERVER_RSP_BY_APP, this event will be callback to the application layer when Sensor Status message is received.

ESP_BLE_MESH_LIGHTING_SERVER_EVT_MAX