feat(ble_mesh): Support BLE 5.0 for BLE Mesh

This commit is contained in:
luoxu
2024-05-30 16:44:12 +08:00
parent 7aaab5a3ff
commit a86bb375f7
29 changed files with 1961 additions and 187 deletions
@@ -1,6 +1,6 @@
/*
* SPDX-FileCopyrightText: 2017 Intel Corporation
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -155,6 +155,22 @@ esp_err_t bluetooth_init(void)
/* XXX Need to have template for store */
ble_store_config_init();
#if CONFIG_BLE_MESH_USE_BLE_50
/**
* On the NimBLE host, once any of the discovery,
* advertising, or connection is enabled, it is
* no longer possible to register GATT services.
*
* Once the NimBLE host is started, it will call
* the registered sync callback. Since it is
* uncertain what the user will do in the sync
* callback, GATT services should be registered
* before starting the NimBLE.
*/
extern void bt_mesh_gatts_svcs_add(void);
bt_mesh_gatts_svcs_add();
#endif /* CONFIG_BLE_MESH_USE_BLE_50 */
nimble_port_freertos_init(mesh_host_task);
xSemaphoreTake(mesh_sem, portMAX_DELAY);