diff --git a/components/bt/esp_ble_mesh/README.md b/components/bt/esp_ble_mesh/README.md index e25e0b3a36..58255a800c 100644 --- a/components/bt/esp_ble_mesh/README.md +++ b/components/bt/esp_ble_mesh/README.md @@ -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. diff --git a/components/bt/esp_ble_mesh/core/access.c b/components/bt/esp_ble_mesh/core/access.c index 51bf870bda..531ccd689a 100644 --- a/components/bt/esp_ble_mesh/core/access.c +++ b/components/bt/esp_ble_mesh/core/access.c @@ -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; diff --git a/components/bt/esp_ble_mesh/core/net.c b/components/bt/esp_ble_mesh/core/net.c index fef500e663..072768fca5 100644 --- a/components/bt/esp_ble_mesh/core/net.c +++ b/components/bt/esp_ble_mesh/core/net.c @@ -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) && diff --git a/components/bt/esp_ble_mesh/core/prov_common.c b/components/bt/esp_ble_mesh/core/prov_common.c index db6109c41b..db3ee869a4 100644 --- a/components/bt/esp_ble_mesh/core/prov_common.c +++ b/components/bt/esp_ble_mesh/core/prov_common.c @@ -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; } diff --git a/components/bt/esp_ble_mesh/core/prov_pvnr.c b/components/bt/esp_ble_mesh/core/prov_pvnr.c index ef547613d3..8c200be778 100644 --- a/components/bt/esp_ble_mesh/core/prov_pvnr.c +++ b/components/bt/esp_ble_mesh/core/prov_pvnr.c @@ -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); diff --git a/components/bt/esp_ble_mesh/v1.1/api/core/include/esp_ble_mesh_df_model_api.h b/components/bt/esp_ble_mesh/v1.1/api/core/include/esp_ble_mesh_df_model_api.h index f03b0a00ce..dd3b392d40 100644 --- a/components/bt/esp_ble_mesh/v1.1/api/core/include/esp_ble_mesh_df_model_api.h +++ b/components/bt/esp_ble_mesh/v1.1/api/core/include/esp_ble_mesh_df_model_api.h @@ -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 */ diff --git a/components/bt/esp_ble_mesh/v1.1/api/models/esp_ble_mesh_mbt_model_api.c b/components/bt/esp_ble_mesh/v1.1/api/models/esp_ble_mesh_mbt_model_api.c index 5760a4ce93..e5aed197ae 100644 --- a/components/bt/esp_ble_mesh/v1.1/api/models/esp_ble_mesh_mbt_model_api.c +++ b/components/bt/esp_ble_mesh/v1.1/api/models/esp_ble_mesh_mbt_model_api.c @@ -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); diff --git a/components/bt/esp_ble_mesh/v1.1/api/models/include/esp_ble_mesh_mbt_model_api.h b/components/bt/esp_ble_mesh/v1.1/api/models/include/esp_ble_mesh_mbt_model_api.h index 87e51948ae..90e948b7d9 100644 --- a/components/bt/esp_ble_mesh/v1.1/api/models/include/esp_ble_mesh_mbt_model_api.h +++ b/components/bt/esp_ble_mesh/v1.1/api/models/include/esp_ble_mesh_mbt_model_api.h @@ -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 */ diff --git a/components/bt/esp_ble_mesh/v1.1/ext.c b/components/bt/esp_ble_mesh/v1.1/ext.c index b6d30d7a0e..048bcc1c59 100644 --- a/components/bt/esp_ble_mesh/v1.1/ext.c +++ b/components/bt/esp_ble_mesh/v1.1/ext.c @@ -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), diff --git a/docs/en/api-guides/esp-ble-mesh/ble-mesh-faq.rst b/docs/en/api-guides/esp-ble-mesh/ble-mesh-faq.rst index bd5d22cf6a..e6ed548923 100644 --- a/docs/en/api-guides/esp-ble-mesh/ble-mesh-faq.rst +++ b/docs/en/api-guides/esp-ble-mesh/ble-mesh-faq.rst @@ -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`. diff --git a/docs/en/api-guides/esp-ble-mesh/ble-mesh-feature-list.rst b/docs/en/api-guides/esp-ble-mesh/ble-mesh-feature-list.rst index 5b93431421..28eb45c104 100644 --- a/docs/en/api-guides/esp-ble-mesh/ble-mesh-feature-list.rst +++ b/docs/en/api-guides/esp-ble-mesh/ble-mesh-feature-list.rst @@ -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 diff --git a/docs/en/api-guides/esp-ble-mesh/ble-mesh-index.rst b/docs/en/api-guides/esp-ble-mesh/ble-mesh-index.rst index 6fb43c2aab..2325071eda 100644 --- a/docs/en/api-guides/esp-ble-mesh/ble-mesh-index.rst +++ b/docs/en/api-guides/esp-ble-mesh/ble-mesh-index.rst @@ -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 ` - 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 `. +* :example_file:`OnOff Server ` - 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 `. -* :example_file:`ESP-BLE-MESH Node OnOff Client ` - 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 `. +* :example_file:`OnOff Client ` - 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 `. -* :example_file:`ESP-BLE-MESH Provisioner ` - 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 `. +* :example_file:`Provisioner ` - 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 `. -* ESP-BLE-MESH Fast Provisioning - :example_file:`Client ` and :example_file:`Server ` - 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 ` and :example:`example server code `. +* Fast Provisioning - :example_file:`Client ` and :example_file:`Server ` - 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 ` and :example:`example server code `. -* :example_file:`ESP-BLE-MESH and Wi-Fi Coexistence ` - 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 `. +* :example_file:`BLE-Mesh and Wi-Fi Coexistence ` - 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 `. -* ESP-BLE-MESH Remote Provisioning (v1.1) - :example_file:`Client, Server and device ` - this example is used to demonstrate the new remote provisioning feature introduced in the Mesh Protocol v1.1, see :example:`example client code `, :example:`example server code ` and :example:`example device code `. +* Remote Provisioning (v1.1) - :example_file:`Client, Server and device ` - this example is used to demonstrate the new remote provisioning feature introduced in the Mesh Protocol v1.1, see :example:`example client code `, :example:`example server code ` and :example:`example device code `. -* ESP-BLE-MESH Directed Forwarding (v1.1) - :example_file:`Client and Server ` - 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 ` and :example:`example server code `. +* Directed Forwarding (v1.1) - :example_file:`Client and Server ` - 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 ` and :example:`example server code `. .. _esp-ble-mesh-demo-videos: diff --git a/docs/en/api-guides/esp-ble-mesh/ble-mesh-terminology.rst b/docs/en/api-guides/esp-ble-mesh/ble-mesh-terminology.rst index 1c8dcaccce..88f478433a 100644 --- a/docs/en/api-guides/esp-ble-mesh/ble-mesh-terminology.rst +++ b/docs/en/api-guides/esp-ble-mesh/ble-mesh-terminology.rst @@ -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. diff --git a/docs/en/api-reference/bluetooth/esp-ble-mesh.rst b/docs/en/api-reference/bluetooth/esp-ble-mesh.rst index 9968a382bd..7b149efacd 100644 --- a/docs/en/api-reference/bluetooth/esp-ble-mesh.rst +++ b/docs/en/api-reference/bluetooth/esp-ble-mesh.rst @@ -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 + diff --git a/docs/sphinx-known-warnings.txt b/docs/sphinx-known-warnings.txt index 91f0f19cef..86402d9554 100644 --- a/docs/sphinx-known-warnings.txt +++ b/docs/sphinx-known-warnings.txt @@ -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. diff --git a/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-faq.rst b/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-faq.rst index 5d17296b0b..034c84a902 100644 --- a/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-faq.rst +++ b/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-faq.rst @@ -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 类,每类有相应的功能。 diff --git a/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-index.rst b/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-index.rst index 79b231b482..8d6073dbb4 100644 --- a/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-index.rst +++ b/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-index.rst @@ -213,19 +213,19 @@ Step 5. 运行网络 ESP-BLE-MESH 示例 =================== -* :example_file:`ESP-BLE-MESH 节点 ` - 展示了将 ESP-BLE-MESH 作为拥有 Configuration Server model 和 Generic OnOff Server model 的节点设备的用法。然后,ESP-BLE-MESH Provisioner 可以配网设备,控制表示开/关状态的 RGB 灯,示例请见 :example:`example code `。 +* :example_file:`开关节点 ` - 展示了将 ESP-BLE-MESH 作为拥有 Configuration Server model 和 Generic OnOff Server model 的节点设备的用法。然后,ESP-BLE-MESH Provisioner 可以配网设备,控制表示开/关状态的 RGB 灯,示例请见 :example:`example code `。 -* :example_file:`ESP-BLE-MESH 客户端模型 ` - 展示了 Generic OnOff Client model 如何在节点内工作。节点拥有 Configuration Server model、Generic OnOff Server model 和 Generic OnOff Client model,示例请见::example:`example code `。 +* :example_file:`客户端模型 ` - 展示了 Generic OnOff Client model 如何在节点内工作。节点拥有 Configuration Server model、Generic OnOff Server model 和 Generic OnOff Client model,示例请见::example:`example code `。 -* :example_file:`ESP-BLE-MESH Provisioner ` - 展示了设备如何充当 ESP-BLE-MESH Provisioner 以配网设备。Provisioner 拥有 Configuration Server model、Configuration Client model 和 Generic OnOff Client model,示例请见 :example:`example code `。 +* :example_file:`配网器 ` - 展示了设备如何充当 ESP-BLE-MESH Provisioner 以配网设备。Provisioner 拥有 Configuration Server model、Configuration Client model 和 Generic OnOff Client model,示例请见 :example:`example code `。 -* ESP-BLE-MESH 快速配网 - :example_file:`Client ` 和 :example_file:`Server ` - 该示例用于演示快速配网。配网 100 个设备费时不超过 60 秒,示例请见::example:`example client code ` 和 :example:`example server code `。 +* 快速配网 - :example_file:`Client ` 和 :example_file:`Server ` - 该示例用于演示快速配网。配网 100 个设备费时不超过 60 秒,示例请见::example:`example client code ` 和 :example:`example server code `。 -* :example_file:`Wi-Fi 和 ESP-BLE-MESH 共存 ` - 该示例用于演示 Wi-Fi 和 ESP-BLE-MESH 共存的功能。简而言之,用户可在运行 ESP-BLE-MESH 时使用 Wi-Fi,示例请见 :example:`example code `。 +* :example_file:`Wi-Fi 和 BLE-Mesh 共存 ` - 该示例用于演示 Wi-Fi 和 ESP-BLE-MESH 共存的功能。简而言之,用户可在运行 ESP-BLE-MESH 时使用 Wi-Fi,示例请见 :example:`example code `。 -* ESP-BLE-MESH 远程配网(v1.1 新增)- :example_file:`Client, Server and device ` - 该示例用于演示 mesh 协议 v1.1 中新增的远程配网功能, 示例请见::example:`example client code `, :example:`example server code ` and :example:`example device code `. +* 远程配网(v1.1 新增) - :example_file:`Client, Server and device ` - 该示例用于演示 mesh 协议 v1.1 中新增的远程配网功能, 示例请见: :example:`example client code `, :example:`example server code ` and :example:`example device code `. -* ESP-BLE-MESH 定向转发(v1.1 新增)- :example_file:`Client and Server ` - 该示例用于演示 mesh 协议 v1.1 中新增的定向转发功能。只有路径上的节点才会对定向消息进行转发,而其他节点不参与转发, 示例请见 :example:`example client code ` and :example:`example server code `. +* 定向转发(v1.1 新增) - :example_file:`Client and Server ` - 该示例用于演示 mesh 协议 v1.1 中新增的定向转发功能。只有路径上的节点才会对定向消息进行转发,而其他节点不参与转发, 示例请见 :example:`example client code ` and :example:`example server code `. .. _esp-ble-mesh-demo-videos: diff --git a/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-terminology.rst b/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-terminology.rst index 2bba149143..c92d05ef26 100644 --- a/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-terminology.rst +++ b/docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-terminology.rst @@ -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 diff --git a/examples/bluetooth/.build-test-rules.yml b/examples/bluetooth/.build-test-rules.yml index b9fca8745b..925d52d3ed 100644 --- a/examples/bluetooth/.build-test-rules.yml +++ b/examples/bluetooth/.build-test-rules.yml @@ -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" diff --git a/examples/bluetooth/esp_ble_mesh/README.md b/examples/bluetooth/esp_ble_mesh/README.md index 9ba7f45c86..b1a8254d3f 100644 --- a/examples/bluetooth/esp_ble_mesh/README.md +++ b/examples/bluetooth/esp_ble_mesh/README.md @@ -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. diff --git a/examples/bluetooth/esp_ble_mesh/directed_forwarding/README.md b/examples/bluetooth/esp_ble_mesh/directed_forwarding/README.md index be11715aa9..7cdc334e5f 100644 --- a/examples/bluetooth/esp_ble_mesh/directed_forwarding/README.md +++ b/examples/bluetooth/esp_ble_mesh/directed_forwarding/README.md @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/main/Kconfig.projbuild @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/main/main.c b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/main/main.c index ba81abd71a..364ce4ca61 100644 --- a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/main/main.c +++ b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/main/main.c @@ -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); diff --git a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_server/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_server/main/Kconfig.projbuild @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/README.md b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/README.md index 577eb36355..58ca4371fd 100644 --- a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/README.md +++ b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/README.md @@ -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 ======================== diff --git a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/README.md b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/README.md index 25db8e17a6..bd9ed0a7bc 100644 --- a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/README.md +++ b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/README.md @@ -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 ======================== diff --git a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/main/Kconfig.projbuild @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/README.md b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/README.md index 6fd6933c05..267c62c596 100644 --- a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/README.md +++ b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/README.md @@ -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 ======================== diff --git a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/main/Kconfig.projbuild @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/README.md b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/README.md index 0a17f7f535..3a0fdc8612 100644 --- a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/README.md +++ b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/README.md @@ -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 ========================== diff --git a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/main/Kconfig.projbuild @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/provisioner/README.md b/examples/bluetooth/esp_ble_mesh/provisioner/README.md index 36e6ee3b02..c5fa5c6572 100644 --- a/examples/bluetooth/esp_ble_mesh/provisioner/README.md +++ b/examples/bluetooth/esp_ble_mesh/provisioner/README.md @@ -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 ================================ diff --git a/examples/bluetooth/esp_ble_mesh/remote_provisioning/README.md b/examples/bluetooth/esp_ble_mesh/remote_provisioning/README.md index 07ceb2afab..53842d0f25 100644 --- a/examples/bluetooth/esp_ble_mesh/remote_provisioning/README.md +++ b/examples/bluetooth/esp_ble_mesh/remote_provisioning/README.md @@ -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. diff --git a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/main/Kconfig.projbuild @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/main/main.c b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/main/main.c index 978f403a2d..c94538dfdc 100644 --- a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/main/main.c +++ b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/main/main.c @@ -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); diff --git a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_server/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_server/main/Kconfig.projbuild @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/remote_provisioning/tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md b/examples/bluetooth/esp_ble_mesh/remote_provisioning/tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md index 385ec47a88..f31eaf4550 100644 --- a/examples/bluetooth/esp_ble_mesh/remote_provisioning/tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md +++ b/examples/bluetooth/esp_ble_mesh/remote_provisioning/tutorial/BLE_Mesh_Remote_Provisioning_Example_Walkthrough.md @@ -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. \ No newline at end of file +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. diff --git a/examples/bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev/main/Kconfig.projbuild @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_client/README.md b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_client/README.md index 33f262faeb..d711ea9f7e 100644 --- a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_client/README.md +++ b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_client/README.md @@ -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 ================================== diff --git a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/README.md b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/README.md index 046693f9b0..ef25333faf 100644 --- a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/README.md +++ b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/README.md @@ -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 ================================== diff --git a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/main/Kconfig.projbuild @@ -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 diff --git a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_client/README.md b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_client/README.md index 60732c5610..085aef23cd 100644 --- a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_client/README.md +++ b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_client/README.md @@ -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 ================================== diff --git a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/README.md b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/README.md index ccb1271afc..b9db144804 100644 --- a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/README.md +++ b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/README.md @@ -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 ================================== diff --git a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/main/Kconfig.projbuild index cbab996ec2..15957eda3a 100644 --- a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/main/Kconfig.projbuild +++ b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/main/Kconfig.projbuild @@ -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