From 242a9011df19adc7efc07756363bd1342bff4030 Mon Sep 17 00:00:00 2001 From: Astha Verma Date: Fri, 30 Jan 2026 17:52:38 +0530 Subject: [PATCH 01/10] fix(nimble): Fix early cleanup when periodic sync reattempts exhausted --- components/bt/host/nimble/nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 039d2d62ed..58e43f9e60 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 039d2d62ed97fed632827fd51294f04068b2ca60 +Subproject commit 58e43f9e60d9ce2dd6aaeb2c4162688dd2814374 From 5a43c6475551af3e99defb82e1aef41155dacb28 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Wed, 20 Aug 2025 13:44:09 +0530 Subject: [PATCH 02/10] fix(nimble): Fix coverity reported issue Handled unchecked return value in ble_hs_pvcy.c --- components/bt/host/nimble/nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 58e43f9e60..918ae0721b 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 58e43f9e60d9ce2dd6aaeb2c4162688dd2814374 +Subproject commit 918ae0721b7f25af86fb0a2e026a386aa9f119b1 From 28131271e69513b18da8593caccc030f3c5ce4fb Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Mon, 19 Jan 2026 12:30:13 +0530 Subject: [PATCH 03/10] fix(nimble): Add extra logs to track critical failures --- components/bt/host/nimble/nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 918ae0721b..62b826c2f8 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 918ae0721b7f25af86fb0a2e026a386aa9f119b1 +Subproject commit 62b826c2f86182807065842ca561ac1598240cc8 From d2bd4767222bbb4406863b7be2b21759320253dd Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Tue, 20 Jan 2026 12:16:31 +0530 Subject: [PATCH 04/10] fix(nimble): Address security vulnerabilties and NVS corruption issues --- components/bt/host/nimble/nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 62b826c2f8..eed4636870 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 62b826c2f86182807065842ca561ac1598240cc8 +Subproject commit eed4636870750b79f058c30dc63a57f069017066 From 4dbc5cef393aba804536a952d24f2b58c56014e8 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Mon, 19 Jan 2026 21:47:47 +0530 Subject: [PATCH 05/10] fix(nimble): Rework L2CAP Rx for L2CAP SDU reassembly --- components/bt/host/nimble/nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index eed4636870..f6bb6468e2 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit eed4636870750b79f058c30dc63a57f069017066 +Subproject commit f6bb6468e26a629526d35ca2e8fb382425d4e83e From 59cadb9ba202f6cbdb39feba0aeaf06c8eabb520 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Tue, 27 Jan 2026 11:08:24 +0530 Subject: [PATCH 06/10] fix(nimble): Fixed duplication of HCI record entry HCI logging --- components/bt/host/nimble/nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index f6bb6468e2..89fd215ed5 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit f6bb6468e26a629526d35ca2e8fb382425d4e83e +Subproject commit 89fd215ed5b000300ff2f70274cb31a982c9c0f0 From a9658ec52041ddfb9c821d4927887bfb72a334a2 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Wed, 28 Jan 2026 12:39:50 +0530 Subject: [PATCH 07/10] fix(nimble) Add EXT_ADV dependancy flag for EXT_SCAN in menuconfig --- components/bt/host/nimble/Kconfig.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/Kconfig.in b/components/bt/host/nimble/Kconfig.in index 6c0ef3238c..1bd18bfa02 100644 --- a/components/bt/host/nimble/Kconfig.in +++ b/components/bt/host/nimble/Kconfig.in @@ -682,7 +682,7 @@ menu "BLE 5.x Features" config BT_NIMBLE_EXT_SCAN bool "Enable extended scanning" depends on BT_NIMBLE_50_FEATURE_SUPPORT - default y + default y if BT_NIMBLE_EXT_ADV help Enable this option to do extended scanning. From 1285be25f62319963559516bfda1556668971509 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Thu, 29 Jan 2026 12:52:08 +0530 Subject: [PATCH 08/10] fix(nimble): Added change to copy adv params to be reused during reattempt adv --- components/bt/host/nimble/nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 89fd215ed5..068f3b56b5 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 89fd215ed5b000300ff2f70274cb31a982c9c0f0 +Subproject commit 068f3b56b511e582c8429fb23df4fdab695057ab From 6e2ce6eb5e1c5c261052931cdc1b5784918006e8 Mon Sep 17 00:00:00 2001 From: Shreeyash Date: Thu, 29 Jan 2026 18:31:47 +0530 Subject: [PATCH 09/10] fix(nimble): Fix host init assert when periodic sync is disabled --- components/bt/host/nimble/nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 068f3b56b5..8b13cff2e2 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 068f3b56b511e582c8429fb23df4fdab695057ab +Subproject commit 8b13cff2e250c2e6869f5c59e7d02f65c7a06289 From 189c78c3fdf9ed5c7ff5d9ac2405978027d2d721 Mon Sep 17 00:00:00 2001 From: Astha Verma Date: Mon, 2 Feb 2026 17:43:08 +0530 Subject: [PATCH 10/10] fix(nimble): Added device name log for ext adv in blecent_throughput --- .../blecent_throughput/main/main.c | 81 +++++++++++-------- .../bleprph_throughput/main/main.c | 2 +- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/main.c b/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/main.c index 1177a9fb0e..96a700fd14 100644 --- a/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/main.c +++ b/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/main.c @@ -507,55 +507,70 @@ blecent_scan(void) * advertisement. The function returns a positive result if the device * advertises connectability and support for the LE PHY service. */ - static int - ext_blecent_should_connect(const struct ble_gap_ext_disc_desc *disc) - { - int offset = 0; - int ad_struct_len = 0; - uint8_t test_addr[6]; - uint32_t peer_addr[6]; - - if (disc->legacy_event_type != BLE_HCI_ADV_RPT_EVTYPE_ADV_IND && - disc->legacy_event_type != BLE_HCI_ADV_RPT_EVTYPE_DIR_IND) { - return 0; - } - if (strlen(CONFIG_EXAMPLE_PEER_ADDR) && (strncmp(CONFIG_EXAMPLE_PEER_ADDR, "ADDR_ANY", strlen("ADDR_ANY")) != 0)) { - // ESP_LOGI(tag, "Peer address from menuconfig: %s", CONFIG_EXAMPLE_PEER_ADDR); - /* Convert string to address */ - sscanf(CONFIG_EXAMPLE_PEER_ADDR, "%lx:%lx:%lx:%lx:%lx:%lx", - &peer_addr[5], &peer_addr[4], &peer_addr[3], - &peer_addr[2], &peer_addr[1], &peer_addr[0]); +static int +ext_blecent_should_connect(const struct ble_gap_ext_disc_desc *disc) +{ + int offset = 0; + int ad_struct_len = 0; + uint8_t test_addr[6]; + uint32_t peer_addr[6]; + uint8_t phy_uuid_found = 0; + if (disc->legacy_event_type != BLE_HCI_ADV_RPT_EVTYPE_ADV_IND && + disc->legacy_event_type != BLE_HCI_ADV_RPT_EVTYPE_DIR_IND) { + return 0; + } + if (strlen(CONFIG_EXAMPLE_PEER_ADDR) && (strncmp(CONFIG_EXAMPLE_PEER_ADDR, "ADDR_ANY", strlen("ADDR_ANY")) != 0)) { + // ESP_LOGI(tag, "Peer address from menuconfig: %s", CONFIG_EXAMPLE_PEER_ADDR); + /* Convert string to address */ + sscanf(CONFIG_EXAMPLE_PEER_ADDR, "%lx:%lx:%lx:%lx:%lx:%lx", + &peer_addr[5], &peer_addr[4], &peer_addr[3], + &peer_addr[2], &peer_addr[1], &peer_addr[0]); /* Conversion */ for (int i=0; i<6; i++) { test_addr[i] = (uint8_t )peer_addr[i]; } - if (memcmp(test_addr, disc->addr.val, sizeof(disc->addr.val)) != 0) { - return 0; - } - } + if (memcmp(test_addr, disc->addr.val, sizeof(disc->addr.val)) != 0) { + return 0; + } + } - /* The device has to advertise support LE PHY UUID (0xABF2). - */ - do { - ad_struct_len = disc->data[offset]; + /* The device has to advertise support LE PHY UUID (0xABF2). + */ + do { + ad_struct_len = disc->data[offset]; - if (!ad_struct_len) { - break; + if (!ad_struct_len) { + break; + } + /* Search for Complete Local Name (AD type 0x09) */ + if (disc->data[offset + 1] == 0x09 && phy_uuid_found) { + int name_len = disc->data[offset] - 1; /* Length minus type byte */ + char serv_name[] = "nimble_prph"; + if (name_len > 0) { + ESP_LOGI(tag, "Device Name = %.*s",name_len, (char *)&disc->data[offset + 2]); + if (name_len == strlen(serv_name) && + memcmp(&disc->data[offset + 2], serv_name, name_len) == 0) { + ESP_LOGI(tag, "central connect to `nimble_prph` success"); + return 1; + } + return 0; + } } /* Search if LE PHY UUID is advertised */ if (disc->data[offset] == 0x03 && disc->data[offset + 1] == 0x03) { if ( disc->data[offset + 2] == 0xAB && disc->data[offset + 3] == 0xF2 ) { - return 1; + phy_uuid_found = 1; } } - offset += ad_struct_len + 1; + offset += ad_struct_len + 1; - } while ( offset < disc->length_data ); - return 0; - } + } while ( offset < disc->length_data ); + + return phy_uuid_found; +} #else /** * Indicates whether we should try to connect to the sender of the specified diff --git a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c index db9c525978..0ce9e3811e 100644 --- a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c +++ b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c @@ -22,7 +22,7 @@ static uint8_t ext_adv_pattern[] = { 0x02, BLE_HS_ADV_TYPE_FLAGS, 0x06, 0x03, BLE_HS_ADV_TYPE_COMP_UUIDS16, 0xab, 0xcd, 0x03, BLE_HS_ADV_TYPE_COMP_UUIDS16, 0xAB, 0xF2, - 0x0e, BLE_HS_ADV_TYPE_COMP_NAME, 'n', 'i', 'm', 'b', 'l', 'e', '-', 'b', 'l', 'e', 'p', 'r', 'p', 'h' + 0x0c, BLE_HS_ADV_TYPE_COMP_NAME, 'n', 'i', 'm', 'b', 'l', 'e', '_', 'p', 'r', 'p', 'h' }; static uint8_t s_current_phy;