mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/ble_mesh_v1.1_misc_fixes' into 'master'
Bugfix/ble mesh v1.1 misc fixes Closes BLERP-25 See merge request espressif/esp-idf!25903
This commit is contained in:
commit
6b5d7d103e
@ -7,15 +7,15 @@ This component is a part of Espressif IoT Development Framework (ESP-IDF). For t
|
||||
The ESP-BLE-MESH networking enables many-to-many (m:m) device communications and is optimized for creating large-scale device networks.
|
||||
|
||||
|
||||
### [ESP-BLE-MESH Documentation](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp_ble_mesh/index.html)
|
||||
### [ESP-BLE-MESH Documentation](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp-ble-mesh/ble-mesh-index.html)
|
||||
|
||||
- [Getting Started](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp-ble-mesh/ble-mesh-index.html#getting-started-with-esp-ble-mesh)
|
||||
- [Architecture](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp-ble-mesh/ble-mesh-architecture.html)
|
||||
- [Feature List](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp-ble-mesh/ble-mesh-feature-list.html)
|
||||
- [FAQ](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp-ble-mesh/ble-mesh-faq.html)
|
||||
- [API Reference](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/bluetooth/esp-ble-mesh.html)
|
||||
|
||||
- [Getting Started](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp_ble_mesh/index.html##getting-started-with-ble-mesh)
|
||||
- [Architecture](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp_ble_mesh/arhitecture.html)
|
||||
- [Feature List](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp_ble_mesh/ble_mesh-feature-list.html)
|
||||
- [FAQ](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp_ble_mesh/ble_mesh_faq.html)
|
||||
- [API Reference](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/bluetooth/ble_mesh.html)
|
||||
|
||||
|
||||
### [ESP-BLE-MESH Examples](https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/esp_ble_mesh)
|
||||
|
||||
- Refer to **ESP-BLE-MESH Examples** of [Getting Started](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp_ble_mesh/index.html##getting-started-with-ble-mesh) for the tutorials of ESP BLE Mesh examples.
|
||||
- Refer to **ESP-BLE-MESH Examples** of [Getting Started](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp-ble-mesh/ble-mesh-index.html#getting-started-with-esp-ble-mesh) for the tutorials of ESP BLE Mesh examples.
|
||||
|
@ -952,7 +952,7 @@ int bt_mesh_model_publish(struct bt_mesh_model *model)
|
||||
return -EADDRNOTAVAIL;
|
||||
}
|
||||
|
||||
tx.sub = bt_mesh_subnet_get(ctx.net_idx);
|
||||
tx.sub = bt_mesh_subnet_get(key->net_idx);
|
||||
if (!tx.sub) {
|
||||
BT_ERR("Publish, NetKey 0x%04x not found", ctx.net_idx);
|
||||
return -EADDRNOTAVAIL;
|
||||
|
@ -1132,7 +1132,10 @@ int bt_mesh_net_send(struct bt_mesh_net_tx *tx, struct net_buf *buf,
|
||||
bt_mesh_net_local();
|
||||
|
||||
err = 0;
|
||||
goto done;
|
||||
/* If it is a group address, it still needs to be relayed */
|
||||
if (BLE_MESH_ADDR_IS_UNICAST(tx->ctx->addr)) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if ((bearer & BLE_MESH_ADV_BEARER) &&
|
||||
|
@ -404,7 +404,8 @@ static void prov_retransmit(struct k_work *work)
|
||||
struct bt_mesh_prov_link *link = work->user_data;
|
||||
int64_t timeout = TRANSACTION_TIMEOUT;
|
||||
|
||||
if (!bt_mesh_atomic_test_bit(link->flags, LINK_ACTIVE)) {
|
||||
if (!bt_mesh_atomic_test_bit(link->flags, LINK_ACTIVE) &&
|
||||
!bt_mesh_atomic_test_bit(link->flags, LINK_CLOSING)) {
|
||||
BT_WARN("Link not active");
|
||||
return;
|
||||
}
|
||||
|
@ -368,7 +368,9 @@ static int provisioner_start_prov_pb_adv(const uint8_t uuid[16], const bt_mesh_a
|
||||
}
|
||||
|
||||
for (i = 0; i < CONFIG_BLE_MESH_PBA_SAME_TIME; i++) {
|
||||
if (!bt_mesh_atomic_test_bit(prov_links[i].flags, LINK_ACTIVE)) {
|
||||
if (!bt_mesh_atomic_test_bit(prov_links[i].flags, LINK_ACTIVE) &&
|
||||
!bt_mesh_atomic_test_bit(prov_links[i].flags, LINK_CLOSING)
|
||||
) {
|
||||
memcpy(prov_links[i].uuid, uuid, 16);
|
||||
prov_links[i].oob_info = oob_info;
|
||||
if (addr) {
|
||||
@ -1177,9 +1179,9 @@ static void prov_capabilities(struct bt_mesh_prov_link *link,
|
||||
|
||||
algorithms = net_buf_simple_pull_be16(buf);
|
||||
BT_INFO("Algorithms: 0x%04x", algorithms);
|
||||
if (algorithms != BIT(PROV_ALG_P256_CMAC_AES128)
|
||||
if (!(algorithms & BIT(PROV_ALG_P256_CMAC_AES128))
|
||||
#if CONFIG_BLE_MESH_PROV_EPA
|
||||
&& algorithms != BIT(PROV_ALG_P256_HMAC_SHA256)
|
||||
&& !(algorithms & BIT(PROV_ALG_P256_HMAC_SHA256))
|
||||
#endif
|
||||
) {
|
||||
BT_ERR("Invalid algorithms 0x%04x", algorithms);
|
||||
|
@ -624,7 +624,7 @@ typedef enum {
|
||||
|
||||
/** Parameters of directed forwarding table entry change */
|
||||
typedef struct {
|
||||
esp_ble_mesh_df_table_action_t action; /*!< Action of directed forarding table */
|
||||
esp_ble_mesh_df_table_action_t action; /*!< Action of directed forwarding table */
|
||||
/** Union of directed forwarding table information */
|
||||
union {
|
||||
/** Structure of directed forwarding table add and remove */
|
||||
@ -633,7 +633,7 @@ typedef struct {
|
||||
esp_ble_mesh_uar_t path_target; /*!< Primary element address of the Path Target */
|
||||
|
||||
esp_ble_mesh_uar_t *dep_origin_data; /*!< List of the primary element addresses of the dependent nodes of the Path Origin */
|
||||
uint32_t dep_origin_num; /*!< Number of entries in the Dependent_Origin_Listfield of the message */
|
||||
uint32_t dep_origin_num; /*!< Number of entries in the Dependent_Origin_List field of the message */
|
||||
|
||||
esp_ble_mesh_uar_t *dep_target_data; /*!< List of the primary element addresses of the dependent nodes of the Path Target */
|
||||
uint32_t dep_target_num; /*!< Number of entries in the Dependent_Target_List field of the message */
|
||||
|
@ -20,7 +20,7 @@ extern int bt_mesh_get_transfer_progress(void *model, uint16_t unicast_addr,
|
||||
uint8_t *block_percent, uint8_t *chunk_percent);
|
||||
extern int bt_mesh_get_blob_reception_progress(void *model, uint8_t *reception_progress);
|
||||
|
||||
esp_err_t esp_ble_mesh_register_blob_transfer_client_callback(esp_ble_mesh_mbt_client_cb_t callback)
|
||||
esp_err_t esp_ble_mesh_register_mbt_client_callback(esp_ble_mesh_mbt_client_cb_t callback)
|
||||
{
|
||||
ESP_BLE_HOST_STATUS_CHECK(ESP_BLE_HOST_STATUS_ENABLED);
|
||||
|
||||
|
@ -102,7 +102,7 @@ typedef struct {
|
||||
uint16_t app_idx; /*!< AppKey Index state */
|
||||
uint8_t transfer_ttl; /*!< Transfer TTL state */
|
||||
uint8_t unicast_addr_count; /*!< The count of unicast address */
|
||||
uint16_t *unicast_addr; /*!< Unlicast address list */
|
||||
uint16_t *unicast_addr; /*!< Unicast address list */
|
||||
} esp_ble_mesh_retrieve_capabilities_t; /*!< Parameters of BLOB retrieve capabilities */
|
||||
|
||||
/** Parameters of BLOB transfer */
|
||||
@ -111,7 +111,7 @@ typedef struct {
|
||||
uint8_t msg_role; /*!< Role of the device - Node/Provisioner */
|
||||
|
||||
uint8_t unicast_addr_count; /*!< The count of unicast address */
|
||||
uint16_t *unicast_addr; /*!< Unlicast address list */
|
||||
uint16_t *unicast_addr; /*!< Unicast address list */
|
||||
uint16_t multicast_addr; /*!< Multicast Address state */
|
||||
uint16_t app_idx; /*!< AppKey Index state */
|
||||
uint8_t transfer_ttl; /*!< Transfer TTL state */
|
||||
@ -164,7 +164,7 @@ typedef struct {
|
||||
uint16_t app_idx; /*!< AppKey Index state */
|
||||
uint8_t transfer_ttl; /*!< Transfer TTL state */
|
||||
uint8_t unicast_addr_count; /*!< The count of unicast address */
|
||||
uint16_t *unicast_addr; /*!< Unlicast address list */
|
||||
uint16_t *unicast_addr; /*!< Unicast address list */
|
||||
} esp_ble_mesh_determine_transfer_status_t; /*!< Parameters of determine Block Status message */
|
||||
|
||||
/** Parameters of cancel transfer message */
|
||||
@ -176,7 +176,7 @@ typedef struct {
|
||||
uint16_t app_idx; /*!< AppKey Index state */
|
||||
uint8_t transfer_ttl; /*!< Transfer TTL state */
|
||||
uint8_t unicast_addr_count; /*!< The count of unicast address */
|
||||
uint16_t *unicast_addr; /*!< Unlicast address list */
|
||||
uint16_t *unicast_addr; /*!< Unicast address list */
|
||||
|
||||
uint8_t blob_id[ESP_BLE_MESH_BLOB_ID_SIZE]; /*!< BLOB identifier list */
|
||||
} esp_ble_mesh_cancel_transfer_t; /*!< Parameters of cancel transfer message */
|
||||
|
@ -4143,8 +4143,9 @@ static const bt_mesh_ext_config_t bt_mesh_ext_cfg = {
|
||||
.struct_model_op_size = sizeof(struct bt_mesh_model_op),
|
||||
.struct_model_op_off_min_len = offsetof(struct bt_mesh_model_op, min_len),
|
||||
.struct_model_op_off_func = offsetof(struct bt_mesh_model_op, func),
|
||||
#if 0
|
||||
|
||||
.struct_model_cb_size = sizeof(struct bt_mesh_model_cb),
|
||||
#if CONFIG_BLE_MESH_DEINIT
|
||||
.struct_model_cb_off_deinit = offsetof(struct bt_mesh_model_cb, deinit),
|
||||
#endif
|
||||
.struct_send_cb_size = sizeof(struct bt_mesh_send_cb),
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -338,8 +338,8 @@ Generally, a Provisioner is used to provision unprovisioned devices and form a m
|
||||
|
||||
- Provisioner bind AppKey to its own client model by calling the API :cpp:func:`esp_ble_mesh_provisioner_bind_app_key_to_local_model`.
|
||||
|
||||
1.24 How Does Provisoner Control the Server Model of Nodes?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1.24 How Does Provisioner Control the Server Model of Nodes?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
ESP-BLE-MESH supports all SIG-defined client models. Provisioner can use these client models to control the server models of nodes. And the client models are divided into 6 categories with each category has the corresponding functions.
|
||||
|
||||
@ -406,7 +406,7 @@ Generally, a Provisioner is used to provision unprovisioned devices and form a m
|
||||
2.4 How to Achieve the Transmission of Messages Without Packet Loss?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Acknowledegd message is needed if users want to transmit messages without packet loss. The default time to wait for corresponding response is set in :ref:`CONFIG_BLE_MESH_CLIENT_MSG_TIMEOUT`. If the sender waits for the response until the timer expires, the corresponding timeout event would be triggered.
|
||||
Acknowledged message is needed if users want to transmit messages without packet loss. The default time to wait for corresponding response is set in :ref:`CONFIG_BLE_MESH_CLIENT_MSG_TIMEOUT`. If the sender waits for the response until the timer expires, the corresponding timeout event would be triggered.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -606,7 +606,7 @@ You can find meaning of errors or warnings when they appear at the bottom of ESP
|
||||
|
||||
When the node receives a segment ack and it does not find any self-send segmented message related with this ack, then this warning will appear.
|
||||
|
||||
5.5 What Is the Meaning of Warning ``No free dlots for new incoming segmented messages``?
|
||||
5.5 What Is the Meaning of Warning ``No free slots for new incoming segmented messages``?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
When the node has no space for receiving new segmented message, this warning will appear. Users can make the space larger through the configuration :ref:`CONFIG_BLE_MESH_RX_SEG_MSG_COUNT`.
|
||||
|
@ -51,8 +51,8 @@ Mesh Models
|
||||
* Bridge Configuration Client model
|
||||
* Mesh Private Beacon Server model
|
||||
* Mesh Private Beacon Client model
|
||||
* On-Demend Private Proxy Server model
|
||||
* On-Demend Private Proxy Client model
|
||||
* On-Demand Private Proxy Server model
|
||||
* On-Demand Private Proxy Client model
|
||||
* SAR Configuration Server model
|
||||
* SAR Configuration Client model
|
||||
* Solicitation PDU RPL Configuration Server model
|
||||
|
@ -213,19 +213,19 @@ The following screenshot shows different board with different color on.
|
||||
ESP-BLE-MESH Examples
|
||||
=====================
|
||||
|
||||
* :example_file:`ESP-BLE-MESH Node OnOff Server <bluetooth/esp_ble_mesh/onoff_models/onoff_server/tutorial/BLE_Mesh_Node_OnOff_Server_Example_Walkthrough.md>` - shows the use of ESP-BLE-MESH as a node having a Configuration Server model and a Generic OnOff Server model. A ESP-BLE-MESH Provisioner can then provision the unprovisioned device and control a RGB LED representing on/off state, see :example:`example code <bluetooth/esp_ble_mesh/onoff_models/onoff_server>`.
|
||||
* :example_file:`OnOff Server <bluetooth/esp_ble_mesh/onoff_models/onoff_server/tutorial/BLE_Mesh_Node_OnOff_Server_Example_Walkthrough.md>` - shows the use of ESP-BLE-MESH as a node having a Configuration Server model and a Generic OnOff Server model. A ESP-BLE-MESH Provisioner can then provision the unprovisioned device and control a RGB LED representing on/off state, see :example:`example code <bluetooth/esp_ble_mesh/onoff_models/onoff_server>`.
|
||||
|
||||
* :example_file:`ESP-BLE-MESH Node OnOff Client <bluetooth/esp_ble_mesh/onoff_models/onoff_client/tutorial/BLE_Mesh_Node_OnOff_Client_Example_Walkthrough.md>` - shows how a Generic OnOff Client model works within a node. The node has a Configuration Server model and a Generic OnOff Client model, see :example:`example code <bluetooth/esp_ble_mesh/onoff_models/onoff_client>`.
|
||||
* :example_file:`OnOff Client <bluetooth/esp_ble_mesh/onoff_models/onoff_client/tutorial/BLE_Mesh_Node_OnOff_Client_Example_Walkthrough.md>` - shows how a Generic OnOff Client model works within a node. The node has a Configuration Server model and a Generic OnOff Client model, see :example:`example code <bluetooth/esp_ble_mesh/onoff_models/onoff_client>`.
|
||||
|
||||
* :example_file:`ESP-BLE-MESH Provisioner <bluetooth/esp_ble_mesh/provisioner/tutorial/BLE_Mesh_Provisioner_Example_Walkthrough.md>` - shows how a device can act as an ESP-BLE-MESH Provisioner to provision devices. The Provisioner has a Configuration Server model, a Configuration Client model and a Generic OnOff Client model, see :example:`example code <bluetooth/esp_ble_mesh/provisioner>`.
|
||||
* :example_file:`Provisioner <bluetooth/esp_ble_mesh/provisioner/tutorial/BLE_Mesh_Provisioner_Example_Walkthrough.md>` - shows how a device can act as an ESP-BLE-MESH Provisioner to provision devices. The Provisioner has a Configuration Server model, a Configuration Client model and a Generic OnOff Client model, see :example:`example code <bluetooth/esp_ble_mesh/provisioner>`.
|
||||
|
||||
* ESP-BLE-MESH Fast Provisioning - :example_file:`Client <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/tutorial/BLE_Mesh_Fast_Prov_Client_Example_Walkthrough.md>` and :example_file:`Server <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/tutorial/BLE_Mesh_Fast_Prov_Server_Example_Walkthrough.md>` - this example is used for showing how fast provisioning can be used in order to create a mesh network. It takes no more than 60 seconds to provision 100 devices, see :example:`example client code <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client>` and :example:`example server code <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server>`.
|
||||
* Fast Provisioning - :example_file:`Client <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/tutorial/BLE_Mesh_Fast_Prov_Client_Example_Walkthrough.md>` and :example_file:`Server <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/tutorial/BLE_Mesh_Fast_Prov_Server_Example_Walkthrough.md>` - this example is used for showing how fast provisioning can be used in order to create a mesh network. It takes no more than 60 seconds to provision 100 devices, see :example:`example client code <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client>` and :example:`example server code <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server>`.
|
||||
|
||||
* :example_file:`ESP-BLE-MESH and Wi-Fi Coexistence <bluetooth/esp_ble_mesh/wifi_coexist/tutorial/BLE_Mesh_WiFi_Coexist_Example_Walkthrough.md>` - an example that demonstrates the Wi-Fi and Bluetooth (BLE/BR/EDR) coexistence feature of {IDF_TARGET_NAME}. Simply put, users can use the Wi-Fi while operating Bluetooth, see :example:`example code <bluetooth/esp_ble_mesh/wifi_coexist>`.
|
||||
* :example_file:`BLE-Mesh and Wi-Fi Coexistence <bluetooth/esp_ble_mesh/wifi_coexist/tutorial/BLE_Mesh_WiFi_Coexist_Example_Walkthrough.md>` - an example that demonstrates the Wi-Fi and Bluetooth (BLE/BR/EDR) coexistence feature of {IDF_TARGET_NAME}. Simply put, users can use the Wi-Fi while operating Bluetooth, see :example:`example code <bluetooth/esp_ble_mesh/wifi_coexist>`.
|
||||
|
||||
* ESP-BLE-MESH Remote Provisioning (v1.1) - :example_file:`Client, Server and device <bluetooth/esp_ble_mesh/remote_provisioning/tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md>` - this example is used to demonstrate the new remote provisioning feature introduced in the Mesh Protocol v1.1, see :example:`example client code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_client>`, :example:`example server code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_server>` and :example:`example device code <bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev>`.
|
||||
* Remote Provisioning (v1.1) - :example_file:`Client, Server and device <bluetooth/esp_ble_mesh/remote_provisioning/tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md>` - this example is used to demonstrate the new remote provisioning feature introduced in the Mesh Protocol v1.1, see :example:`example client code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_client>`, :example:`example server code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_server>` and :example:`example device code <bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev>`.
|
||||
|
||||
* ESP-BLE-MESH Directed Forwarding (v1.1) - :example_file:`Client and Server <bluetooth/esp_ble_mesh/directed_forwarding/tutorial/BLE_Mesh_Directed_Forwarding_Example_Walkthrough.md>` - this example is used to demonstrate the new directed forwarding feature introduced in the Mesh Protocol v1.1. Only nodes along the path will forward the directed messages, while other nodes will not actively participate in forwarding, see :example:`example client code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_client>` and :example:`example server code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_server>`.
|
||||
* Directed Forwarding (v1.1) - :example_file:`Client and Server <bluetooth/esp_ble_mesh/directed_forwarding/tutorial/BLE_Mesh_Directed_Forwarding_Example_Walkthrough.md>` - this example is used to demonstrate the new directed forwarding feature introduced in the Mesh Protocol v1.1. Only nodes along the path will forward the directed messages, while other nodes will not actively participate in forwarding, see :example:`example client code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_client>` and :example:`example server code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_server>`.
|
||||
|
||||
|
||||
.. _esp-ble-mesh-demo-videos:
|
||||
|
@ -229,10 +229,10 @@ ESP-BLE-MESH Terminology
|
||||
* - Mesh Private Beacon Client model
|
||||
- The model is used to support the functionality of a node that can configure the Mesh Private beacons functionality of another node.
|
||||
- The Mesh Private Beacon Client model is a root model and a main model that does not extend any other models. The Mesh Private Beacon Client model may operate on states defined by the Mesh Private Beacon Server model using Mesh Private Beacon messages.
|
||||
* - On-Demend Private Proxy Server model
|
||||
* - On-Demand Private Proxy Server model
|
||||
- The model is used to support the configuration of the advertising with Private Network Identity type functionality of a node.
|
||||
- The On-Demand Private Proxy Server model is a main model that extends the Mesh Private Beacon Server model and corresponds with the Solicitation PDU RPL Configuration Server model.
|
||||
* - On-Demend Private Proxy Client model
|
||||
* - On-Demand Private Proxy Client model
|
||||
- The model is used to support the functionality of a node that can configure the advertising with Private Network Identity type functionality of another node.
|
||||
- The On-Demand Private Proxy Client model is a root model and a main model that does not extend any other models. The On-Demand Private Proxy Client model may operate on states defined by the On-Demand Private Proxy Server model using On-Demand Private Proxy messages.
|
||||
* - SAR Configuration Server model
|
||||
@ -273,7 +273,7 @@ ESP-BLE-MESH Terminology
|
||||
* - Key Refresh procedure
|
||||
- This procedure is used when the security of one or more network keys and/or one or more of the application keys has been compromised or could be compromised.
|
||||
- Key Refresh Procedure is used to update network key and application key of ESP-BLE-MESH network. Key Refresh Procedure is used when the security of one or more network keys and/or one or more application keys is threatened or potentially threatened. Keys are usually updated after some nodes in the network are removed.
|
||||
* - IV (Initialisation Vector) Update Procedure
|
||||
* - IV (Initialization Vector) Update Procedure
|
||||
- A node can also use an IV Update procedure to signal to peer nodes that it is updating the IV Index.
|
||||
- The IV Update procedure is used to update the value of ESP-BLE-MESH network's IV Index. This value is related to the random number required for message encryption. To ensure that the value of the random number is not repeated, this value is periodically incremented. IV Index is a 32-bit value and a shared network resource. For example, all nodes in a mesh network share the same IV Index value. Starting from 0x00000000, the IV Index increments during the IV Update procedure and maintained by a specific process, ensuring the IV Index shared in the mesh network is the same. This can be done when the node believes that it has the risk of exhausting its sequence number, or when it determines that another node is nearly exhausting its sequence number. Note: The update time must not be less than 96 hours. It can be triggered when a secure network beacon is received, or when the node determines that its sequence number is greater than a certain value.
|
||||
|
||||
|
@ -28,6 +28,7 @@ ESP-BLE-MESH APIs are divided into the following parts:
|
||||
* `ESP-BLE-MESH Definitions`_
|
||||
* `ESP-BLE-MESH Core API Reference`_
|
||||
* `ESP-BLE-MESH Models API Reference`_
|
||||
* `ESP-BLE-MESH (v1.1) Core API Reference`_
|
||||
|
||||
|
||||
ESP-BLE-MESH Definitions
|
||||
@ -150,3 +151,78 @@ Lighting Client/Server Models
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_lighting_model_api.inc
|
||||
|
||||
|
||||
ESP-BLE-MESH (v1.1) Core API Reference
|
||||
--------------------------------------
|
||||
|
||||
.. note::
|
||||
|
||||
This section is a preview version, so the related structures, macros, and APIs may be changed.
|
||||
|
||||
This section contains ESP-BLE-MESH v1.1 Core related APIs, event types, event parameters, etc.
|
||||
|
||||
This API reference covers 10 components:
|
||||
|
||||
* `Remote Provisioning`_
|
||||
* `Directed Forwarding`_
|
||||
* `Subnet Bridge Configuration`_
|
||||
* `Mesh Private Beacon`_
|
||||
* `On-Demand Private Proxy`_
|
||||
* `SAR Configuration`_
|
||||
* `Solicitation PDU RPL Configuration`_
|
||||
* `Opcodes Aggregator`_
|
||||
* `Large Composition Data`_
|
||||
* `Composition and Metadata`_
|
||||
|
||||
|
||||
Remote Provisioning
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_rpr_model_api.inc
|
||||
|
||||
|
||||
Directed Forwarding
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_df_model_api.inc
|
||||
|
||||
Subnet Bridge Configuration
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_brc_model_api.inc
|
||||
|
||||
Mesh Private Beacon
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_prb_model_api.inc
|
||||
|
||||
On-Demand Private Proxy
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_odp_model_api.inc
|
||||
|
||||
SAR Configuration
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_sar_model_api.inc
|
||||
|
||||
Solicitation PDU RPL Configuration
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_srpl_model_api.inc
|
||||
|
||||
Opcodes Aggregator
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_agg_model_api.inc
|
||||
|
||||
Large Composition Data
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_lcd_model_api.inc
|
||||
|
||||
Composition and Metadata
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/esp_ble_mesh_cm_data_api.inc
|
||||
|
||||
|
@ -9,6 +9,10 @@
|
||||
idf-component-manager.rst: WARNING: Badly formated string substitution: {IDF_TARGET}
|
||||
esp_ble_mesh_defs.inc:line: WARNING: Duplicate C++ declaration, also defined at api-reference/bluetooth/esp-ble-mesh:line.
|
||||
Declaration is '.. cpp:member:: uint16_t model_id'.
|
||||
esp_ble_mesh_cm_data_api.inc:line: WARNING: Duplicate C++ declaration, also defined at api-reference/bluetooth/esp-ble-mesh:line.
|
||||
Declaration is '.. cpp:member:: int8_t element_offset'.
|
||||
esp_ble_mesh_cm_data_api.inc:line: WARNING: Duplicate C++ declaration, also defined at api-reference/bluetooth/esp-ble-mesh:line.
|
||||
Declaration is '.. cpp:member:: int8_t model_item_idx'.
|
||||
mqtt_client.inc:line: WARNING: Duplicate C++ declaration, also defined at api-reference/protocols/mqtt:line.
|
||||
Declaration is '.. cpp:type:: struct esp_mqtt_event_t esp_mqtt_event_t'.
|
||||
mqtt_client.inc:line: WARNING: Duplicate C++ declaration, also defined at api-reference/protocols/mqtt:line.
|
||||
|
@ -338,7 +338,7 @@ ESP-BLE-MESH 常见问题手册
|
||||
|
||||
- Provisioner 调用 API :cpp:func:`esp_ble_mesh_provisioner_bind_app_key_to_local_model` 以绑定应用密钥至自己的客户端模型。
|
||||
|
||||
1.24 Provisoner 如何控制节点的服务器模型?
|
||||
1.24 Provisioner 如何控制节点的服务器模型?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
ESP-BLE-MESH 支持所有 SIG 定义的客户端模型。Provisioner 可以使用这些客户端模型控制节点的服务器模型。客户端模型分为 6 类,每类有相应的功能。
|
||||
|
@ -213,19 +213,19 @@ Step 5. 运行网络
|
||||
ESP-BLE-MESH 示例
|
||||
===================
|
||||
|
||||
* :example_file:`ESP-BLE-MESH 节点 <bluetooth/esp_ble_mesh/onoff_models/onoff_server/tutorial/BLE_Mesh_Node_OnOff_Server_Example_Walkthrough.md>` - 展示了将 ESP-BLE-MESH 作为拥有 Configuration Server model 和 Generic OnOff Server model 的节点设备的用法。然后,ESP-BLE-MESH Provisioner 可以配网设备,控制表示开/关状态的 RGB 灯,示例请见 :example:`example code <bluetooth/esp_ble_mesh/onoff_models/onoff_server>`。
|
||||
* :example_file:`开关节点 <bluetooth/esp_ble_mesh/onoff_models/onoff_server/tutorial/BLE_Mesh_Node_OnOff_Server_Example_Walkthrough.md>` - 展示了将 ESP-BLE-MESH 作为拥有 Configuration Server model 和 Generic OnOff Server model 的节点设备的用法。然后,ESP-BLE-MESH Provisioner 可以配网设备,控制表示开/关状态的 RGB 灯,示例请见 :example:`example code <bluetooth/esp_ble_mesh/onoff_models/onoff_server>`。
|
||||
|
||||
* :example_file:`ESP-BLE-MESH 客户端模型 <bluetooth/esp_ble_mesh/onoff_models/onoff_client/tutorial/BLE_Mesh_Node_OnOff_Client_Example_Walkthrough.md>` - 展示了 Generic OnOff Client model 如何在节点内工作。节点拥有 Configuration Server model、Generic OnOff Server model 和 Generic OnOff Client model,示例请见::example:`example code <bluetooth/esp_ble_mesh/onoff_models/onoff_client>`。
|
||||
* :example_file:`客户端模型 <bluetooth/esp_ble_mesh/onoff_models/onoff_client/tutorial/BLE_Mesh_Node_OnOff_Client_Example_Walkthrough.md>` - 展示了 Generic OnOff Client model 如何在节点内工作。节点拥有 Configuration Server model、Generic OnOff Server model 和 Generic OnOff Client model,示例请见::example:`example code <bluetooth/esp_ble_mesh/onoff_models/onoff_client>`。
|
||||
|
||||
* :example_file:`ESP-BLE-MESH Provisioner <bluetooth/esp_ble_mesh/provisioner/tutorial/BLE_Mesh_Provisioner_Example_Walkthrough.md>` - 展示了设备如何充当 ESP-BLE-MESH Provisioner 以配网设备。Provisioner 拥有 Configuration Server model、Configuration Client model 和 Generic OnOff Client model,示例请见 :example:`example code <bluetooth/esp_ble_mesh/provisioner>`。
|
||||
* :example_file:`配网器 <bluetooth/esp_ble_mesh/provisioner/tutorial/BLE_Mesh_Provisioner_Example_Walkthrough.md>` - 展示了设备如何充当 ESP-BLE-MESH Provisioner 以配网设备。Provisioner 拥有 Configuration Server model、Configuration Client model 和 Generic OnOff Client model,示例请见 :example:`example code <bluetooth/esp_ble_mesh/provisioner>`。
|
||||
|
||||
* ESP-BLE-MESH 快速配网 - :example_file:`Client <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/tutorial/BLE_Mesh_Fast_Prov_Client_Example_Walkthrough.md>` 和 :example_file:`Server <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/tutorial/BLE_Mesh_Fast_Prov_Server_Example_Walkthrough.md>` - 该示例用于演示快速配网。配网 100 个设备费时不超过 60 秒,示例请见::example:`example client code <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client>` 和 :example:`example server code <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server>`。
|
||||
* 快速配网 - :example_file:`Client <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/tutorial/BLE_Mesh_Fast_Prov_Client_Example_Walkthrough.md>` 和 :example_file:`Server <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/tutorial/BLE_Mesh_Fast_Prov_Server_Example_Walkthrough.md>` - 该示例用于演示快速配网。配网 100 个设备费时不超过 60 秒,示例请见::example:`example client code <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client>` 和 :example:`example server code <bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server>`。
|
||||
|
||||
* :example_file:`Wi-Fi 和 ESP-BLE-MESH 共存 <bluetooth/esp_ble_mesh/wifi_coexist/tutorial/BLE_Mesh_WiFi_Coexist_Example_Walkthrough.md>` - 该示例用于演示 Wi-Fi 和 ESP-BLE-MESH 共存的功能。简而言之,用户可在运行 ESP-BLE-MESH 时使用 Wi-Fi,示例请见 :example:`example code <bluetooth/esp_ble_mesh/wifi_coexist>`。
|
||||
* :example_file:`Wi-Fi 和 BLE-Mesh 共存 <bluetooth/esp_ble_mesh/wifi_coexist/tutorial/BLE_Mesh_WiFi_Coexist_Example_Walkthrough.md>` - 该示例用于演示 Wi-Fi 和 ESP-BLE-MESH 共存的功能。简而言之,用户可在运行 ESP-BLE-MESH 时使用 Wi-Fi,示例请见 :example:`example code <bluetooth/esp_ble_mesh/wifi_coexist>`。
|
||||
|
||||
* ESP-BLE-MESH 远程配网(v1.1 新增)- :example_file:`Client, Server and device <bluetooth/esp_ble_mesh/remote_provisioning/tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md>` - 该示例用于演示 mesh 协议 v1.1 中新增的远程配网功能, 示例请见::example:`example client code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_client>`, :example:`example server code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_server>` and :example:`example device code <bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev>`.
|
||||
* 远程配网(v1.1 新增) - :example_file:`Client, Server and device <bluetooth/esp_ble_mesh/remote_provisioning/tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md>` - 该示例用于演示 mesh 协议 v1.1 中新增的远程配网功能, 示例请见: :example:`example client code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_client>`, :example:`example server code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_server>` and :example:`example device code <bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev>`.
|
||||
|
||||
* ESP-BLE-MESH 定向转发(v1.1 新增)- :example_file:`Client and Server <bluetooth/esp_ble_mesh/directed_forwarding/tutorial/BLE_Mesh_Directed_Forwarding_Example_Walkthrough.md>` - 该示例用于演示 mesh 协议 v1.1 中新增的定向转发功能。只有路径上的节点才会对定向消息进行转发,而其他节点不参与转发, 示例请见 :example:`example client code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_client>` and :example:`example server code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_server>`.
|
||||
* 定向转发(v1.1 新增) - :example_file:`Client and Server <bluetooth/esp_ble_mesh/directed_forwarding/tutorial/BLE_Mesh_Directed_Forwarding_Example_Walkthrough.md>` - 该示例用于演示 mesh 协议 v1.1 中新增的定向转发功能。只有路径上的节点才会对定向消息进行转发,而其他节点不参与转发, 示例请见 :example:`example client code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_client>` and :example:`example server code <bluetooth/esp_ble_mesh/remote_provisioning/rpr_server>`.
|
||||
|
||||
|
||||
.. _esp-ble-mesh-demo-videos:
|
||||
|
@ -227,10 +227,10 @@ ESP-BLE-MESH Terminology
|
||||
* - Mesh Private Beacon Client model
|
||||
- "The model is used to support the functionality of a node that can configure the Mesh Private beacons functionality of another node."
|
||||
- 该模型用于支持一个节点配置另一个节点的 Mesh 私有信标功能的功能。
|
||||
* - On-Demend Private Proxy Server model
|
||||
* - On-Demand Private Proxy Server model
|
||||
- "The model is used to support the configuration of the advertising with Private Network Identity type functionality of a node."
|
||||
- 该模型用于支持节点的私有网络身份类型广告配置功能。
|
||||
* - On-Demend Private Proxy Client model
|
||||
* - On-Demand Private Proxy Client model
|
||||
- "The model is used to support the functionality of a node that can configure the advertising with Private Network Identity type functionality of another node."
|
||||
- 该模型用于支持一个节点配置另一个节点的私有网络身份类型广告功能的功能。
|
||||
* - SAR Configuration Server model
|
||||
|
@ -64,11 +64,11 @@ examples/bluetooth/blufi:
|
||||
|
||||
examples/bluetooth/esp_ble_mesh:
|
||||
enable:
|
||||
- if: IDF_TARGET in ["esp32", "esp32c3", "esp32s3", "esp32c6"]
|
||||
- if: IDF_TARGET in ["esp32", "esp32c3", "esp32s3", "esp32c6", "esp32h2"]
|
||||
temporary: true
|
||||
reason: the other targets are not tested yet
|
||||
disable_test:
|
||||
- if: IDF_TARGET in ["esp32c2", "esp32c3", "esp32s3", "esp32c6"]
|
||||
- if: IDF_TARGET in ["esp32c2", "esp32c3", "esp32s3", "esp32c6", "esp32h2"]
|
||||
temporary: true
|
||||
reason: The runner doesn't support yet
|
||||
|
||||
@ -92,6 +92,16 @@ examples/bluetooth/esp_ble_mesh/coex_test:
|
||||
temporary: true
|
||||
reason: The runner doesn't support yet
|
||||
|
||||
examples/bluetooth/esp_ble_mesh/wifi_coexist:
|
||||
enable:
|
||||
- if: IDF_TARGET in ["esp32", "esp32c3", "esp32s3", "esp32c6"]
|
||||
temporary: true
|
||||
reason: the other targets are not tested yet
|
||||
disable_test:
|
||||
- if: IDF_TARGET in ["esp32c2", "esp32c3", "esp32s3", "esp32c6"]
|
||||
temporary: true
|
||||
reason: The runner doesn't support yet
|
||||
|
||||
examples/bluetooth/esp_hid_device:
|
||||
enable:
|
||||
- if: IDF_TARGET == "esp32"
|
||||
|
@ -8,7 +8,7 @@ Note: To use examples in this directory, you need to have Bluetooth enabled in c
|
||||
|
||||
# Example Layout
|
||||
|
||||
This directory includes examples to demonstrate ESP-BLE-MESH functionality based on [Zephyr Bluetooth Mesh stack](https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/mesh).
|
||||
This directory includes some examples to demonstrate ESP-BLE-MESH functionality based on [Zephyr Bluetooth Mesh stack](https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/mesh).
|
||||
|
||||
## fast_provisioning
|
||||
|
||||
@ -72,6 +72,44 @@ This example shows how ESP32 acts as a BLE Mesh Fast Provisioning Server and coe
|
||||
|
||||
See [wifi_coexist](wifi_coexist) folder for more details.
|
||||
|
||||
## directed_forwarding (v1.1)
|
||||
|
||||
This example shows how the ESP32 acts as a Directed Forwarding node to establish paths and directed forwarding messages.
|
||||
|
||||
### df_client
|
||||
|
||||
This example shows how ESP32 acts as a BLE Mesh Provisioner with a Directed Forwarding Client model in the Primary Element.
|
||||
|
||||
See [df_client](directed_forwarding/df_client) folder for more details.
|
||||
|
||||
### df_server
|
||||
|
||||
This example shows how ESP32 acts as a BLE Mesh Node with a Directed Forwarding Server model in the Primary Element.
|
||||
|
||||
See [df_server](directed_forwarding/df_server) folder for more details.
|
||||
|
||||
## remote_provisioning (v1.1)
|
||||
|
||||
This example shows how the ESP32 acts as an Remote Provisioning Server assistant provisioner to provisioning devices out of single-hop.
|
||||
|
||||
### rpr_client
|
||||
|
||||
This example shows how ESP32 acts as a BLE Mesh Provisioner with a Remote Provisioning Client model in the Primary Element.
|
||||
|
||||
See [rpr_client](remote_provisioning/rpr_client) folder for more details.
|
||||
|
||||
### rpr_server
|
||||
|
||||
This example shows how ESP32 acts as a BLE Mesh Node with a Remote Provisioning Server model in the Primary Element.
|
||||
|
||||
See [rpr_server](remote_provisioning/rpr_server) folder for more details.
|
||||
|
||||
### unprov_dev
|
||||
|
||||
This example shows how ESP32 acts as an unprovisioning device.
|
||||
|
||||
See [unprov_dev](remote_provisioning/unprov_dev) folder for more details.
|
||||
|
||||
# More
|
||||
|
||||
See the [README.md](../../README.md) file in the upper level [examples](../../) directory for more information about examples.
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
# Directed Forwarding
|
||||
|
||||
@ -9,7 +9,7 @@ This example is primarily intended to demonstrate the newly added directed forwa
|
||||
|
||||
## How to use example
|
||||
|
||||
Please refer to this [tutorial](examples/bluetooth/esp_ble_mesh/directed_forwarding/tutorial/BLE_Mesh_Directed_Forwarding_Example_Walkthrough.md) for detailed instructions on how to run it.
|
||||
Please refer to this [tutorial](tutorial/BLE_Mesh_Directed_Forwarding_Example_Walkthrough.md) for detailed instructions on how to run it.
|
||||
|
||||
|
||||
### Hardware Required
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
@ -903,7 +903,7 @@ void app_main(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Device uuis will be filled with bd address at dev_uuid + 2 */
|
||||
/* Device uuid will be filled with bd address at dev_uuid + 2 */
|
||||
ble_mesh_get_dev_uuid(dev_uuid);
|
||||
|
||||
ESP_LOG_BUFFER_HEX(TAG":Provisioner bd address: ", dev_uuid + 2, BD_ADDR_LEN);
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
ESP BLE Mesh Fast Provisioning Client example
|
||||
========================
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
ESP BLE Mesh Fast Provisioning Server example
|
||||
========================
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
ESP BLE Mesh Client Model Demo
|
||||
========================
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
ESP BLE Mesh Node demo
|
||||
==========================
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
ESP BLE Mesh Provisioner demo
|
||||
================================
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
# Remote Provisioning
|
||||
|
||||
(See the README.md file in the upper level 'examples' directory for more information about examples.)
|
||||
@ -7,7 +7,7 @@
|
||||
The example is primarily used to demonstrate the new Remote Provisioning feature added in Mesh Protocol v1.1.
|
||||
## How to use example
|
||||
|
||||
Please refer to this [tutorial](examples/bluetooth/esp_ble_mesh/remote_provisioning/tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md) for detailed instructions on how to run it.
|
||||
Please refer to this [tutorial](tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md) for detailed instructions on how to run it.
|
||||
|
||||
### Hardware Required
|
||||
You need prepare at least three ESP series development boards. We recommend using the [ESP32-C3-DevKitM-1](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html) or [ESP32-C6-DevKitC-1](https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/user_guide.html#). Alternatively, you can use other development boards, but ensure that each board has at least one LED and one button for operation.
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
@ -238,7 +238,7 @@ static esp_err_t prov_complete(int node_idx, const esp_ble_mesh_octet16_t uuid,
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "Provisioning node by common methold");
|
||||
ESP_LOGI(TAG, "Provisioning node by common method");
|
||||
ESP_LOGI(TAG, "That node will be act as remote provisioning server to help Provisioner to provisioning another node");
|
||||
|
||||
example_ble_mesh_set_msg_common(&common, unicast, config_client.model, ESP_BLE_MESH_MODEL_OP_COMPOSITION_DATA_GET);
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
@ -295,10 +295,10 @@ When receiving a response `ESP_BLE_MESH_MODEL_OP_RPR_SCAN_STATUS` for `ESP_BLE_M
|
||||
`ESP_BLE_MESH_MODEL_OP_RPR_SCAN_START` requires three parameters:
|
||||
1. `scan_items_limit`: The number of Unprovisioned Devices that can be scanned. This value cannot exceed the maximum scan limit of the Remote Provisioning Server. When set to 0, the Remote Provisioning Client does not limit this value, and the Remote Provisioning Server will set it to its own maximum scan limit.
|
||||
2. `timeout`: The maximum scan time for the Remote Provisioning Server in seconds. This value cannot be set to 0.
|
||||
3. `uuid_en`: Specifies whether the Unprovisioned Device's UUID is specified. 0 means no, 1 means yes. If specified, the UUID information of the Unprovisioned Device needs to be filled. An example is shown below. In this example, the UUID is not specified.
|
||||
3. `uuid_en`: Specifies whether the unprovisioned device's UUID is specified. 0 means no, 1 means yes. If specified, the UUID information of the unprovisioned device needs to be filled. An example is shown below. In this example, the UUID is not specified.
|
||||
```c
|
||||
msg.scan_start.uuid_en = 1;
|
||||
memcpy(msg.scan_start.uuid, unprovisioning_device_uuid, 16);
|
||||
memcpy(msg.scan_start.uuid, unprovisioned_device_uuid, 16);
|
||||
```
|
||||
When `ESP_BLE_MESH_MODEL_OP_RPR_SCAN_START` is sent, the Remote Provisioning Server will immediately respond with `ESP_BLE_MESH_MODEL_OP_RPR_SCAN_STATUS`. If `scan_status.status` is `ESP_BLE_MESH_RPR_STATUS_SUCCESS`, it indicates that the Remote Provisioning Server's Scan has been successfully started. When it scans an unprovisioned device, it will respond with `ESP_BLE_MESH_MODEL_OP_RPR_SCAN_REPORT`. The handling of `ESP_BLE_MESH_MODEL_OP_RPR_SCAN_REPORT` in this example is as follows:
|
||||
```c
|
||||
@ -391,9 +391,9 @@ static void example_ble_mesh_remote_prov_client_callback(esp_ble_mesh_rpr_client
|
||||
// ...
|
||||
}
|
||||
```
|
||||
If the status of the Provisioning Link of the Remote Provisioning Server is `ESP_BLE_MESH_RPR_LINK_IDLE`, the Remote Provisioning Client sends `ESP_BLE_MESH_MODEL_OP_RPR_LINK_OPEN` to open the Provisioning Link of the Remote Provisioning Server. Once the Remote Provisioning Server receives `ESP_BLE_MESH_MODEL_OP_RPR_LINK_OPEN`, it immediately replies with `ESP_BLE_MESH_MODEL_OP_RPR_LINK_STATUS` to indicate whether it has received the command from the Remote Provisioning Client. The Remote Provisioning Server then reports to the Remote Provisioning Client whether it has successfully established a Provisioning Link with the Unprovisioning Device by replying with `ESP_BLE_MESH_MODEL_OP_RPR_LINK_REPORT`.
|
||||
If the status of the Provisioning Link of the Remote Provisioning Server is `ESP_BLE_MESH_RPR_LINK_IDLE`, the Remote Provisioning Client sends `ESP_BLE_MESH_MODEL_OP_RPR_LINK_OPEN` to open the Provisioning Link of the Remote Provisioning Server. Once the Remote Provisioning Server receives `ESP_BLE_MESH_MODEL_OP_RPR_LINK_OPEN`, it immediately replies with `ESP_BLE_MESH_MODEL_OP_RPR_LINK_STATUS` to indicate whether it has received the command from the Remote Provisioning Client. The Remote Provisioning Server then reports to the Remote Provisioning Client whether it has successfully established a Provisioning Link with the unprovisioned device by replying with `ESP_BLE_MESH_MODEL_OP_RPR_LINK_REPORT`.
|
||||
|
||||
Only when the `status` in `ESP_BLE_MESH_MODEL_OP_RPR_LINK_REPORT` is `ESP_BLE_MESH_RPR_STATUS_SUCCESS` and `rpr_state` is `ESP_BLE_MESH_RPR_LINK_ACTIVE`, it means that the Remote Provisioning Server has successfully established a Provisioning Link with the Unprovisioning Device and the Link Open is successful. At this point, the Unprovisioning Device triggers the `ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT` event.
|
||||
Only when the `status` in `ESP_BLE_MESH_MODEL_OP_RPR_LINK_REPORT` is `ESP_BLE_MESH_RPR_STATUS_SUCCESS` and `rpr_state` is `ESP_BLE_MESH_RPR_LINK_ACTIVE`, it means that the Remote Provisioning Server has successfully established a Provisioning Link with the unprovisioned device and the Link Open is successful. At this point, the unprovisioned device triggers the `ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT` event.
|
||||
|
||||
In this example, the processing of receiving `ESP_BLE_MESH_MODEL_OP_RPR_LINK_REPORT` is as follows:
|
||||
```c
|
||||
@ -427,7 +427,7 @@ In this example, the processing of receiving `ESP_BLE_MESH_MODEL_OP_RPR_LINK_REP
|
||||
}
|
||||
break;
|
||||
```
|
||||
Once the Remote Provisioning Server successfully establishes a Provisioning Link with the Unprovisioning Device, the network provisioning process can be initiated by setting the API `esp_ble_mesh_rpr_client_action` to `ESP_BLE_MESH_RPR_CLIENT_ACT_START_RPR` and passing the address of the Remote Provisioning Server.
|
||||
Once the Remote Provisioning Server successfully establishes a Provisioning Link with the unprovisioned device, the network provisioning process can be initiated by setting the API `esp_ble_mesh_rpr_client_action` to `ESP_BLE_MESH_RPR_CLIENT_ACT_START_RPR` and passing the address of the Remote Provisioning Server.
|
||||
|
||||
After the network provisioning is completed, the Remote Provisioning Client triggers the event `ESP_BLE_MESH_RPR_CLIENT_PROV_COMP_EVT`, which returns data about the network information of the nodes entering the network through Remote Provisioning. This includes node UUID, node address, and number of elements in the node.
|
||||
|
||||
@ -501,4 +501,4 @@ static void example_remote_prov_server_callback(esp_ble_mesh_rpr_server_cb_event
|
||||
```
|
||||
#### Unprovisioned Device
|
||||
----
|
||||
The Remote Provisioning functionality is transparent to Unprovisioning Device. Therefore, regardless of whether Provisioning is done through Remote Provisioning or directly by the Provisioner, it will trigger the same events on the Unprovisioning Device side. Hence, in this example, it is not explained in detail.
|
||||
The Remote Provisioning functionality is transparent to unprovisioned device. Therefore, regardless of whether Provisioning is done through Remote Provisioning or directly by the Provisioner, it will trigger the same events on the unprovisioned device side. Hence, in this example, it is not explained in detail.
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
ESP BLE Mesh Sensor Client Example
|
||||
==================================
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
ESP BLE Mesh Sensor Server Example
|
||||
==================================
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
ESP BLE Mesh Vendor Client Example
|
||||
==================================
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
||||
ESP BLE Mesh Vendor Server Example
|
||||
==================================
|
||||
|
@ -6,6 +6,7 @@ menu "Example Configuration"
|
||||
default BLE_MESH_ESP32C3_DEV if IDF_TARGET_ESP32C3
|
||||
default BLE_MESH_ESP32S3_DEV if IDF_TARGET_ESP32S3
|
||||
default BLE_MESH_ESP32C6_DEV if IDF_TARGET_ESP32C6
|
||||
default BLE_MESH_ESP32H2_DEV if IDF_TARGET_ESP32H2
|
||||
help
|
||||
Select this option to choose the board for BLE Mesh. The default is ESP32-WROOM-32
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user