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 696420ea8..d15e4603a 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 @@ -563,7 +563,7 @@ Generally, a Provisioner is used to provision unprovisioned devices and form a m The **count** value is provided to the Proxy node which is provisioned by the App so as to determine when to start Proxy advertising in advance. -4.5 When will Configuration Client Model of the node running :example:`ble_mesh_fast_prov_server ` example start to work? +4.5 When will Configuration Client Model of the node running :example:`fast_prov_server ` example start to work? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Configuration Client Model will start to work after the Temporary Provisioner functionality is enabled. 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 12a35edff..c12beb2d3 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 @@ -120,8 +120,8 @@ Mesh Applications * :example:`Tutorial ` * :example:`Example ` * ESP-BLE-MESH Fast Provisioning - * :example:`Fast Provisioning Client Model Tutorial ` - * :example:`Fast Provisioning Server Model Tutorial ` + * :example:`Fast Provisioning Client Model Tutorial ` + * :example:`Fast Provisioning Server Model Tutorial ` * :example:`Example ` * `Demo Video `__ * ESP-BLE-MESH and Wi-Fi Coexistence 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 dbda97e83..b74cb24d5 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 @@ -215,7 +215,7 @@ ESP-BLE-MESH Examples * :example:`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 `. -* ESP-BLE-MESH Fast Provisioning - :example:`Client ` and :example:`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 `. +* ESP-BLE-MESH Fast Provisioning - :example:`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:`ESP-BLE-MESH and Wi-Fi Coexistence ` - an example that demonstrates the Wi-Fi and Bluetooth (BLE/BR/EDR) coexistence feature of ESP32. Simply put, users can use the Wi-Fi while operating Bluetooth, see :example:`example code `. 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 7344a3c2f..34b601a86 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 @@ -565,7 +565,7 @@ ESP-BLE-MESH 常见问题手册 此 **count** 值提供给 App 配置的代理节点,以决定何时提前开始 Proxy 广播信息。 -4.5 运行以下示例 :example:`ble_mesh_fast_prov_server ` 的节点的 Configuration Client Model 何时开始工作? +4.5 运行以下示例 :example:`fast_prov_server ` 的节点的 Configuration Client Model 何时开始工作? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 使能了 Temporary Provisioner 功能后,Configuration Client Model 会开始工作。 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 d017bd8e2..d41ad1883 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 @@ -218,7 +218,7 @@ ESP-BLE-MESH 示例 * :example:`ESP-BLE-MESH Provisioner ` - 展示了设备如何充当 ESP-BLE-MESH Provisioner 以配网设备。Provisioner 拥有 Configuration Server model、Configuration Client model 和 Generic OnOff Client model,示例请见 :example:`example code `。 -* ESP-BLE-MESH 快速配网 - :example:`Client ` 和 :example:`Server ` - 该示例用于演示快速配网。配网 100 个设备费时不超过 60 秒,示例请见::example:`example client code ` 和 :example:`example server code `。 +* ESP-BLE-MESH 快速配网 - :example:`Client ` 和 :example_file`Server ` - 该示例用于演示快速配网。配网 100 个设备费时不超过 60 秒,示例请见::example:`example client code ` 和 :example:`example server code `。 * :example:`Wi-Fi 和 ESP-BLE-MESH 共存 ` - 该示例用于演示 Wi-Fi 和 ESP-BLE-MESH 共存的功能。简而言之,用户可在运行 ESP-BLE-MESH 时使用 Wi-Fi,示例请见 :example:`example code `。 diff --git a/examples/bluetooth/esp_ble_mesh/README.md b/examples/bluetooth/esp_ble_mesh/README.md index cd3b14281..50659c91e 100644 --- a/examples/bluetooth/esp_ble_mesh/README.md +++ b/examples/bluetooth/esp_ble_mesh/README.md @@ -30,19 +30,19 @@ See [ble_mesh_provisioner](ble_mesh_console/ble_mesh_provisioner) folder for mor This example illustrates the solution of ESP-BLE-MESH Fast Provisioning. -#### ble_mesh_fast_prov_client +#### fast_prov_client This example shows how ESP32, acting as a BLE Mesh Fast Provisioning Client, provisions other unprovisioned devices and then controls the nodes. -See [ble_mesh_fast_prov_client](ble_mesh_fast_provision/ble_mesh_fast_prov_client) folder for more details. +See [fast_prov_client](ble_mesh_fast_provision/fast_prov_client) folder for more details. -#### ble_mesh_fast_prov_server +#### fast_prov_server This example illustrates the process that: 1. ESP32 as a BLE Mesh Fast Provisioning Server is provisioned into a node; 2. ESP32 as a Temporary Provisioner provisions other unprovisioned devices. -See [ble_mesh_fast_prov_server](ble_mesh_fast_provision/ble_mesh_fast_prov_server) folder for more details. +See [fast_prov_server](ble_mesh_fast_provision/fast_prov_server) folder for more details. ## ble_mesh_node diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/CMakeLists.txt deleted file mode 100644 index 6644ba29c..000000000 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c") - -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/ble_mesh_demo_init.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/ble_mesh_demo_init.c deleted file mode 100644 index 371b3d0bd..000000000 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/ble_mesh_demo_init.c +++ /dev/null @@ -1,143 +0,0 @@ - -/* - * Copyright (c) 2017 Intel Corporation - * Additional Copyright (c) 2018 Espressif Systems (Shanghai) PTE LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -/* BLE */ -#ifdef CONFIG_BT_BLUEDROID_ENABLED -#include "esp_bt.h" -#include "esp_bt_main.h" -#include "esp_bt_device.h" -#endif - -#ifdef CONFIG_BT_NIMBLE_ENABLED -#include "esp_nimble_hci.h" -#include "nimble/nimble_port.h" -#include "nimble/nimble_port_freertos.h" -#include "host/ble_hs.h" -#include "host/util/util.h" -#include "console/console.h" -#endif - -#include "esp_ble_mesh_defs.h" -#include "ble_mesh_demo_init.h" -#include "esp_ble_mesh_common_api.h" - -#ifdef CONFIG_BT_BLUEDROID_ENABLED - -void ble_mesh_get_dev_uuid(uint8_t *dev_uuid) -{ - memcpy(dev_uuid, esp_bt_dev_get_address(), BD_ADDR_LEN); -} - -esp_err_t bluetooth_init(void) -{ - esp_err_t ret; - - - ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT)); - - esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); - ret = esp_bt_controller_init(&bt_cfg); - if (ret) { - ESP_LOGE(TAG, "%s initialize controller failed", __func__); - return ret; - } - - ret = esp_bt_controller_enable(ESP_BT_MODE_BLE); - if (ret) { - ESP_LOGE(TAG, "%s enable controller failed", __func__); - return ret; - } - ret = esp_bluedroid_init(); - if (ret) { - ESP_LOGE(TAG, "%s init bluetooth failed", __func__); - return ret; - } - ret = esp_bluedroid_enable(); - if (ret) { - ESP_LOGE(TAG, "%s enable bluetooth failed", __func__); - return ret; - } - - return ret; -} - -#endif - -#ifdef CONFIG_BT_NIMBLE_ENABLED -static SemaphoreHandle_t mesh_sem; -static uint8_t own_addr_type; -void ble_store_config_init(void); -static uint8_t addr_val[6] = {0}; - -void ble_mesh_get_dev_uuid(uint8_t *dev_uuid) -{ - memcpy(dev_uuid + 2, addr_val, BD_ADDR_LEN); -} - -static void mesh_on_reset(int reason) -{ - ESP_LOGI(TAG, "Resetting state; reason=%d", reason); -} - -static void mesh_on_sync(void) -{ - int rc; - - rc = ble_hs_util_ensure_addr(0); - assert(rc == 0); - - /* Figure out address to use while advertising (no privacy for now) */ - rc = ble_hs_id_infer_auto(0, &own_addr_type); - if (rc != 0) { - ESP_LOGI(TAG, "error determining address type; rc=%d", rc); - return; - } - - rc = ble_hs_id_copy_addr(own_addr_type, addr_val, NULL); - - xSemaphoreGive(mesh_sem); -} - -void mesh_host_task(void *param) -{ - ESP_LOGI(TAG, "BLE Host Task Started"); - /* This function will return only when nimble_port_stop() is executed */ - nimble_port_run(); - - nimble_port_freertos_deinit(); -} - -esp_err_t bluetooth_init(void) -{ - mesh_sem = xSemaphoreCreateBinary(); - if (mesh_sem == NULL) { - ESP_LOGE(TAG, "Failed to create mesh semaphore"); - return ESP_FAIL; - } - - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); - - nimble_port_init(); - /* Initialize the NimBLE host configuration. */ - ble_hs_cfg.reset_cb = mesh_on_reset; - ble_hs_cfg.sync_cb = mesh_on_sync; - ble_hs_cfg.store_status_cb = ble_store_util_status_rr; - - /* XXX Need to have template for store */ - ble_store_config_init(); - - nimble_port_freertos_init(mesh_host_task); - - xSemaphoreTake(mesh_sem, portMAX_DELAY); - - return ESP_OK; -} -#endif diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/ble_mesh_demo_init.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/ble_mesh_demo_init.h deleted file mode 100644 index d1af15428..000000000 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/ble_mesh_demo_init.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - This example code is in the Public Domain (or CC0 licensed, at your option.) - - Unless required by applicable law or agreed to in writing, this - software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. -*/ - -#ifndef _BLE_MESH_DEMO_INIT_H_ -#define _BLE_MESH_DEMO_INIT_H_ - -#define TAG "FAST_PROV_CLIENT_DEMO" - -void ble_mesh_get_dev_uuid(uint8_t *dev_uuid); - -esp_err_t bluetooth_init(void); - -#endif diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/ble_mesh_demo_init.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/ble_mesh_demo_init.c deleted file mode 100644 index ea6aa7f0c..000000000 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/ble_mesh_demo_init.c +++ /dev/null @@ -1,143 +0,0 @@ - -/* - * Copyright (c) 2017 Intel Corporation - * Additional Copyright (c) 2018 Espressif Systems (Shanghai) PTE LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -/* BLE */ -#ifdef CONFIG_BT_BLUEDROID_ENABLED -#include "esp_bt.h" -#include "esp_bt_main.h" -#include "esp_bt_device.h" -#endif - -#ifdef CONFIG_BT_NIMBLE_ENABLED -#include "esp_nimble_hci.h" -#include "nimble/nimble_port.h" -#include "nimble/nimble_port_freertos.h" -#include "host/ble_hs.h" -#include "host/util/util.h" -#include "console/console.h" -#endif - -#include "esp_ble_mesh_defs.h" -#include "ble_mesh_demo_init.h" -#include "esp_ble_mesh_common_api.h" - -#ifdef CONFIG_BT_BLUEDROID_ENABLED - -void ble_mesh_get_dev_uuid(uint8_t *dev_uuid) -{ - memcpy(dev_uuid + 2, esp_bt_dev_get_address(), BD_ADDR_LEN); -} - -esp_err_t bluetooth_init(void) -{ - esp_err_t ret; - - - ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT)); - - esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); - ret = esp_bt_controller_init(&bt_cfg); - if (ret) { - ESP_LOGE(TAG, "%s initialize controller failed", __func__); - return ret; - } - - ret = esp_bt_controller_enable(ESP_BT_MODE_BLE); - if (ret) { - ESP_LOGE(TAG, "%s enable controller failed", __func__); - return ret; - } - ret = esp_bluedroid_init(); - if (ret) { - ESP_LOGE(TAG, "%s init bluetooth failed", __func__); - return ret; - } - ret = esp_bluedroid_enable(); - if (ret) { - ESP_LOGE(TAG, "%s enable bluetooth failed", __func__); - return ret; - } - - return ret; -} - -#endif - -#ifdef CONFIG_BT_NIMBLE_ENABLED -static SemaphoreHandle_t mesh_sem; -static uint8_t own_addr_type; -void ble_store_config_init(void); -static uint8_t addr_val[6] = {0}; - -void ble_mesh_get_dev_uuid(uint8_t *dev_uuid) -{ - memcpy(dev_uuid + 2, addr_val, BD_ADDR_LEN); -} - -static void mesh_on_reset(int reason) -{ - ESP_LOGI(TAG, "Resetting state; reason=%d", reason); -} - -static void mesh_on_sync(void) -{ - int rc; - - rc = ble_hs_util_ensure_addr(0); - assert(rc == 0); - - /* Figure out address to use while advertising (no privacy for now) */ - rc = ble_hs_id_infer_auto(0, &own_addr_type); - if (rc != 0) { - ESP_LOGI(TAG, "error determining address type; rc=%d", rc); - return; - } - - rc = ble_hs_id_copy_addr(own_addr_type, addr_val, NULL); - - xSemaphoreGive(mesh_sem); -} - -void mesh_host_task(void *param) -{ - ESP_LOGI(TAG, "BLE Host Task Started"); - /* This function will return only when nimble_port_stop() is executed */ - nimble_port_run(); - - nimble_port_freertos_deinit(); -} - -esp_err_t bluetooth_init(void) -{ - mesh_sem = xSemaphoreCreateBinary(); - if (mesh_sem == NULL) { - ESP_LOGE(TAG, "Failed to create mesh semaphore"); - return ESP_FAIL; - } - - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); - - nimble_port_init(); - /* Initialize the NimBLE host configuration. */ - ble_hs_cfg.reset_cb = mesh_on_reset; - ble_hs_cfg.sync_cb = mesh_on_sync; - ble_hs_cfg.store_status_cb = ble_store_util_status_rr; - - /* XXX Need to have template for store */ - ble_store_config_init(); - - nimble_port_freertos_init(mesh_host_task); - - xSemaphoreTake(mesh_sem, portMAX_DELAY); - - return ESP_OK; -} -#endif diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/ble_mesh_demo_init.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/ble_mesh_demo_init.h deleted file mode 100644 index 9e5272de2..000000000 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/ble_mesh_demo_init.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - This example code is in the Public Domain (or CC0 licensed, at your option.) - - Unless required by applicable law or agreed to in writing, this - software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. -*/ - -#ifndef _BLE_MESH_DEMO_INIT_H_ -#define _BLE_MESH_DEMO_INIT_H_ - -#define TAG "FAST_PROV_SERVER_DEMO" - -void ble_mesh_get_dev_uuid(uint8_t *dev_uuid); - -esp_err_t bluetooth_init(void); - -#endif diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/CMakeLists.txt similarity index 63% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/CMakeLists.txt rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/CMakeLists.txt index a6d283cdf..e85e57ec4 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/CMakeLists.txt @@ -2,8 +2,9 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_components/example_init + $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(SUPPORTED_TARGETS esp32) -project(ble_mesh_fast_prov_client) +project(fast_prov_client) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/Makefile b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/Makefile similarity index 55% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/Makefile rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/Makefile index 07484a570..2f6e19a27 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/Makefile +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/Makefile @@ -3,10 +3,9 @@ # project subdirectory. # -PROJECT_NAME := ble_mesh_fast_prov_server +PROJECT_NAME := fast_prov_client -COMPONENT_ADD_INCLUDEDIRS := components/include - -EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components +EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_components/example_init \ + $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning include $(IDF_PATH)/make/project.mk diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/README.md b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/README.md similarity index 54% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/README.md rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/README.md index d49238e97..875696d19 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/README.md +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/README.md @@ -3,4 +3,4 @@ ESP BLE Mesh Fast Provisioning Client example This example shows how a BLE Mesh device functions as a Fast Provisioning Client. -Please check the [tutorial](tutorial/ble_mesh_fast_provision_client.md) for more information about this example. \ No newline at end of file +Please check the [tutorial](tutorial/BLE_Mesh_Fast_Prov_Client_Example_Walkthrough.md) for more information about this example. \ No newline at end of file diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/main/CMakeLists.txt new file mode 100644 index 000000000..ab5bee28b --- /dev/null +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/main/CMakeLists.txt @@ -0,0 +1,5 @@ +set(COMPONENT_SRCS "main.c") + +set(COMPONENT_ADD_INCLUDEDIRS ".") + +register_component() \ No newline at end of file diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/component.mk b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/main/component.mk similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/component.mk rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/main/component.mk diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/ble_mesh_demo_main.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/main/main.c similarity index 99% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/ble_mesh_demo_main.c rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/main/main.c index 926f96d98..1770ffbcb 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/ble_mesh_demo_main.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/main/main.c @@ -26,10 +26,10 @@ #include "esp_ble_mesh_config_model_api.h" #include "esp_ble_mesh_generic_model_api.h" -#include "esp_fast_prov_common.h" -#include "esp_fast_prov_operation.h" -#include "esp_fast_prov_client_model.h" -#include "ble_mesh_demo_init.h" +#include "ble_mesh_fast_prov_common.h" +#include "ble_mesh_fast_prov_operation.h" +#include "ble_mesh_fast_prov_client_model.h" +#include "ble_mesh_example_init.h" #define PROV_OWN_ADDR 0x0001 #define APP_KEY_OCTET 0x12 diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/sdkconfig.ci.bluedroid b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/sdkconfig.ci.bluedroid similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/sdkconfig.ci.bluedroid rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/sdkconfig.ci.bluedroid diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/sdkconfig.ci.nimble b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/sdkconfig.ci.nimble similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/sdkconfig.ci.nimble rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/sdkconfig.ci.nimble diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/sdkconfig.defaults b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/sdkconfig.defaults similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/sdkconfig.defaults rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/sdkconfig.defaults diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/tutorial/BLE_Mesh_Fast_Prov_Client_Example_Walkthrough.md b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/tutorial/BLE_Mesh_Fast_Prov_Client_Example_Walkthrough.md similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/tutorial/BLE_Mesh_Fast_Prov_Client_Example_Walkthrough.md rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_client/tutorial/BLE_Mesh_Fast_Prov_Client_Example_Walkthrough.md diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/CMakeLists.txt similarity index 63% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/CMakeLists.txt rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/CMakeLists.txt index 06fb4f746..0f77e0d28 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/CMakeLists.txt @@ -2,8 +2,9 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_components/example_init + $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(SUPPORTED_TARGETS esp32) -project(ble_mesh_fast_prov_server) +project(fast_prov_server) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/Makefile b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/Makefile similarity index 55% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/Makefile rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/Makefile index d6537805f..d34eb4ba0 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/Makefile +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/Makefile @@ -3,10 +3,9 @@ # project subdirectory. # -PROJECT_NAME := ble_mesh_fast_prov_client +PROJECT_NAME := fast_prov_server -COMPONENT_ADD_INCLUDEDIRS := components/include - -EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components +EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_components/example_init \ + $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning include $(IDF_PATH)/make/project.mk diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/README.md b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/README.md similarity index 54% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/README.md rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/README.md index e12c5d3fb..581fea1cf 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/README.md +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/README.md @@ -3,4 +3,4 @@ ESP BLE Mesh Fast Provisioning Server example This example shows how a BLE Mesh device functions as a Fast Provisioning Server. -Please check the [tutorial](tutorial/ble_mesh_fast_provision_server.md) for more information about this example. \ No newline at end of file +Please check the [tutorial](tutorial/BLE_Mesh_Fast_Prov_Server_Example_Walkthrough.md) for more information about this example. \ No newline at end of file diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/CMakeLists.txt similarity index 51% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/CMakeLists.txt rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/CMakeLists.txt index dc91641af..a4884b044 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/CMakeLists.txt @@ -1,5 +1,4 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c" +set(COMPONENT_SRCS "main.c" "board.c") set(COMPONENT_ADD_INCLUDEDIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/Kconfig.projbuild b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/Kconfig.projbuild similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/Kconfig.projbuild rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/Kconfig.projbuild diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/board.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/board.c similarity index 98% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/board.c rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/board.c index 192d73067..d821fc83d 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/board.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/board.c @@ -16,7 +16,7 @@ #include "driver/gpio.h" #include "board.h" -#include "esp_fast_prov_common.h" +#include "ble_mesh_fast_prov_common.h" #define TAG "BOARD" diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/board.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/board.h similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/board.h rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/board.h diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/component.mk b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/component.mk similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/component.mk rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/component.mk diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/ble_mesh_demo_main.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/main.c similarity index 99% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/ble_mesh_demo_main.c rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/main.c index 2bf300309..b5fe155ac 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/ble_mesh_demo_main.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/main.c @@ -27,10 +27,10 @@ #include "esp_ble_mesh_local_data_operation_api.h" #include "board.h" -#include "esp_fast_prov_operation.h" -#include "esp_fast_prov_client_model.h" -#include "esp_fast_prov_server_model.h" -#include "ble_mesh_demo_init.h" +#include "ble_mesh_fast_prov_operation.h" +#include "ble_mesh_fast_prov_client_model.h" +#include "ble_mesh_fast_prov_server_model.h" +#include "ble_mesh_example_init.h" extern struct _led_state led_state[3]; extern struct k_delayed_work send_self_prov_node_addr_timer; diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/sdkconfig.ci.bluedroid b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/sdkconfig.ci.bluedroid similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/sdkconfig.ci.bluedroid rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/sdkconfig.ci.bluedroid diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/sdkconfig.ci.nimble b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/sdkconfig.ci.nimble similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/sdkconfig.ci.nimble rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/sdkconfig.ci.nimble diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/sdkconfig.defaults b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/sdkconfig.defaults similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/sdkconfig.defaults rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/sdkconfig.defaults diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/BLE_Mesh_Fast_Prov_Server_Example_Walkthrough.md b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/BLE_Mesh_Fast_Prov_Server_Example_Walkthrough.md similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/BLE_Mesh_Fast_Prov_Server_Example_Walkthrough.md rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/BLE_Mesh_Fast_Prov_Server_Example_Walkthrough.md diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/EspBleMesh.md b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/EspBleMesh.md similarity index 93% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/EspBleMesh.md rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/EspBleMesh.md index 8039d6672..dd75437c9 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/EspBleMesh.md +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/EspBleMesh.md @@ -13,7 +13,7 @@ A video of this demo can be seen > Note: > -> 1. Please flash the [`ble_mesh_fast_prov_server`](https://glab.espressif.cn/ble_mesh/esp-ble-mesh-v0.6/tree/ble_mesh_release/esp-ble-mesh-v0.6/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server) to your boards first; +> 1. Please flash the [`fast_prov_server`](https://glab.espressif.cn/ble_mesh/esp-ble-mesh-v0.6/tree/ble_mesh_release/esp-ble-mesh-v0.6/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server) to your boards first; > 2. To have a better understanding of the performance of the BLE Mesh network, we recommend that at least 3 devices should be added in your network. > 3. We recommend that you solder LED indicators if your development board does not come with lights. > 4. Please check the type of board and LED pin definition enabled in `Example BLE Mesh Config` by running `idf.py menuconfig` @@ -24,7 +24,7 @@ A video of this demo can be seen # Flash and Monitor 1. Enter the directory: -examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server +examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server 2. Make sure that the `IDF_PATH` environment variable was set in accordance with your current IDF path 3. Check the version of your toolchain. Version 4.1 or newer should be used. diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/app_ble.png b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/app_ble.png similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/app_ble.png rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/app_ble.png diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/device.png b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/device.png similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/device.png rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/device.png diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/picture1.png b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/picture1.png similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/picture1.png rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/picture1.png diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/picture2.png b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/picture2.png similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/picture2.png rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/picture2.png diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/time.png b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/time.png similarity index 100% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/tutorial/images/time.png rename to examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/tutorial/images/time.png diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/CMakeLists.txt index d42dfe18f..9716d38a8 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/CMakeLists.txt @@ -2,6 +2,9 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_components/button + $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_components/example_init) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(SUPPORTED_TARGETS esp32) project(onoff_client) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/Makefile b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/Makefile index a47e6fd08..9160b323e 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/Makefile +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/Makefile @@ -5,6 +5,7 @@ PROJECT_NAME := onoff_client -COMPONENT_ADD_INCLUDEDIRS := components/include +EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_components/button \ + $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_components/example_init include $(IDF_PATH)/make/project.mk diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/include/iot_button.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/include/iot_button.h deleted file mode 100644 index 6a2fa23c0..000000000 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/include/iot_button.h +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#ifndef _IOT_BUTTON_H_ -#define _IOT_BUTTON_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "driver/gpio.h" -#include "freertos/portmacro.h" -typedef void (* button_cb)(void*); -typedef void* button_handle_t; - -typedef enum { - BUTTON_ACTIVE_HIGH = 1, /*!