fix(nimble): Bugfixes for various issues

This commit is contained in:
Rahul Tank
2026-03-20 11:00:21 +05:30
parent 2c0e86512d
commit 3813ee6502
15 changed files with 35 additions and 26 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -340,7 +340,9 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
}
if (event->connect.status != 0) {
/* Connection failed; resume advertising. */
((void(*)(void))arg)();
if (arg != NULL) {
((void(*)(void))arg)();
}
}
return 0;
case BLE_GAP_EVENT_DISCONNECT:
@@ -375,7 +377,9 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
case BLE_GAP_EVENT_ADV_COMPLETE:
ESP_LOGI(TAG, "advertise complete; reason=%d",
event->adv_complete.reason);
((void(*)(void))arg)();
if (arg != NULL) {
((void(*)(void))arg)();
}
return 0;
case BLE_GAP_EVENT_SUBSCRIBE:
+6 -5
View File
@@ -160,10 +160,11 @@ menu "Security (SMP)"
default 0
help
LE Security Mode 1 Levels:
1. No Security
2. Unauthenticated pairing with encryption
3. Authenticated pairing with encryption
4. Authenticated LE Secure Connections pairing with encryption using a 128-bit strength encryption key.
1(0). No Security
2(1). Unauthenticated pairing with encryption
3(2). Authenticated pairing with encryption
4(3). Authenticated LE Secure Connections pairing with encryption using a
128-bit strength encryption key.
config BT_NIMBLE_SM_SC_ONLY
int "Enable Secure Connections Only Mode"
@@ -820,7 +821,7 @@ menu "BLE 6.x Features"
if BT_NIMBLE_60_FEATURE_SUPPORT
config BT_NIMBLE_CHANNEL_SOUNDING
bool "ble channel souding feature"
bool "ble channel sounding feature"
default n
help
Used to enable/disable the channel sounding feature
@@ -191,7 +191,7 @@ static void ble_hci_rx_acl(uint8_t *data, uint16_t len)
m = ble_transport_alloc_acl_from_ll();
if (!m) {
if (retry_count % 5) {
if (retry_count % 5 == 0) {
esp_rom_printf("ACL buf alloc failed %d times\n", retry_count);
esp_rom_printf("Free ACL mbufs: %d\n", os_msys_num_free());
}
@@ -39,12 +39,15 @@ static inline const char *ble_svc_gap_device_name(void)
static inline int ble_svc_gap_device_appearance_set(uint16_t appearance)
{
(void)appearance;
ESP_LOGE(BLE_SVC_GAP_TAG, "GAP service not enabled. Enable CONFIG_BT_NIMBLE_GAP_SERVICE to use this API.");
return -1;
}
static inline int ble_svc_gap_device_key_material_set(uint8_t *session_key, uint8_t *iv)
{
(void)session_key;
(void)iv;
ESP_LOGE(BLE_SVC_GAP_TAG, "GAP service not enabled. Enable CONFIG_BT_NIMBLE_GAP_SERVICE to use this API.");
return -1;
}