Merge branch 'bugfix/fix_nimble_issues_3092026_v6.0' into 'release/v6.0'

feat(nimble): Fix few nimble issues 03092026(v6.0)

See merge request espressif/esp-idf!52355
This commit is contained in:
Rahul Tank
2026-09-04 05:50:01 +05:30
28 changed files with 4058 additions and 14 deletions
@@ -17,6 +17,8 @@
#include "config/stack_config.h"
#include "hci_log/bt_hci_log.h"
#include "bt_common.h"
#include "bt_osal.h"
#include "bt_prf_task.h"
static esp_bluedroid_status_t s_bt_host_state = ESP_BLUEDROID_STATUS_UNINITIALIZED;
@@ -233,6 +235,17 @@ esp_err_t esp_bluedroid_init_with_cfg(esp_bluedroid_config_t *cfg)
}
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
/* Bring up the host-agnostic bt_osal function table */
bt_osal_freertos_funcs_init();
#if CONFIG_BT_PRF_TASK_ENABLED
/* Start the shared BLE profile task now that the bt_osal table is up, so
* profiles can post work without spawning their own tasks. */
if (bt_prf_task_init() != BT_OSAL_OK) {
LOG_WARN("bt_prf_task_init failed");
}
#endif
s_bt_host_state = ESP_BLUEDROID_STATUS_INITIALIZED;
return ESP_OK;
@@ -289,6 +302,15 @@ esp_err_t esp_bluedroid_deinit(void)
osi_mem_deinit();
#endif
#if CONFIG_BT_PRF_TASK_ENABLED
/* Stop the shared BLE profile task while the bt_osal table is still up,
* symmetrically with the init in esp_bluedroid_init_with_cfg(). */
bt_prf_task_deinit();
#endif
/* Release the bt_osal function table set up in esp_bluedroid_init_with_cfg(). */
bt_osal_freertos_funcs_deinit();
s_bt_host_state = ESP_BLUEDROID_STATUS_UNINITIALIZED;
return ESP_OK;
}
+12 -4
View File
@@ -426,28 +426,28 @@ menu "GATT / ATT"
config BT_NIMBLE_GATT_CACHING_MAX_SVCS
int "Maximum number of services per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
default 8
help
Set this option to set the upper limit on number of services per connection to be cached.
config BT_NIMBLE_GATT_CACHING_MAX_INCL_SVCS
int "Maximum number of included services per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
default 8
help
Set this option to set the upper limit on number of included services per connection to be cached.
config BT_NIMBLE_GATT_CACHING_MAX_CHRS
int "Maximum number of characteristics per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
default 58
help
Set this option to set the upper limit on number of characteristics per connection to be cached.
config BT_NIMBLE_GATT_CACHING_MAX_DSCS
int "Maximum number of descriptors per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
default 58
help
Set this option to set the upper limit on number of descriptors per connection to be cached.
@@ -1357,6 +1357,14 @@ menu "Extra Features"
instead of DRAM (.iram.text/.text in internal RAM). Suitable for low-speed
GAP/GATT operations to reduce RAM usage.
config BT_NIMBLE_GAP_ALLOW_ADV_RESTART
bool "Allow restarting ongoing advertising"
default n
help
If enabled, stop ongoing advertising before starting it again with
new parameters,if any. If disabled, starting advertising while it is already
active returns BLE_HS_EALREADY.
endmenu
menu "NimBLE Mesh"
@@ -2410,5 +2410,12 @@
#endif
#endif
#ifndef MYNEWT_VAL_BLE_GAP_ALLOW_ADV_RESTART
#ifdef CONFIG_BT_NIMBLE_GAP_ALLOW_ADV_RESTART
#define MYNEWT_VAL_BLE_GAP_ALLOW_ADV_RESTART CONFIG_BT_NIMBLE_GAP_ALLOW_ADV_RESTART
#else
#define MYNEWT_VAL_BLE_GAP_ALLOW_ADV_RESTART (0)
#endif
#endif
#endif