From 61456cddc29dbe0225997dcca0d9c1662c2b182b Mon Sep 17 00:00:00 2001 From: Astha Verma Date: Mon, 20 Apr 2026 14:35:02 +0530 Subject: [PATCH 1/5] fix(nimble): Preserve device name across ble_svc_gap_init re-call --- 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 2e9782126bf..6f528ad2df6 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 2e9782126bf348ca3be06f04d1eb7792dc546dbe +Subproject commit 6f528ad2df6726f0a622571cc952364d04280e6e From 94f7ea75db78a474597943c01aba86817b9f5b77 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Wed, 15 Apr 2026 21:05:28 +0530 Subject: [PATCH 2/5] fix(nimble): Move ble_log_init/deinit to esp_nimble_init/deinit --- components/bt/host/nimble/port/include/esp_nimble_cfg.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/bt/host/nimble/port/include/esp_nimble_cfg.h b/components/bt/host/nimble/port/include/esp_nimble_cfg.h index af22b75fb0d..d50070e5711 100644 --- a/components/bt/host/nimble/port/include/esp_nimble_cfg.h +++ b/components/bt/host/nimble/port/include/esp_nimble_cfg.h @@ -15,8 +15,12 @@ * attempt to use these macros without including this header will result in a * compiler error. */ +#ifndef MYNEWT_VAL #define MYNEWT_VAL(_name) MYNEWT_VAL_ ## _name +#endif +#ifndef MYNEWT_VAL_CHOICE #define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val +#endif #ifndef IRAM_ATTR_64MCPU #define IRAM_ATTR_64MCPU IRAM_ATTR From 6fe167a8b4ada89d8b0503cd35b291ef13fbf61f Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Fri, 17 Apr 2026 13:17:32 +0530 Subject: [PATCH 3/5] fix(nimble): Fixes for various CVEs *CVE-2025-62235 *CVE-2025-53477 *CVE-2025-53470 --- 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 6f528ad2df6..f240e884b44 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 6f528ad2df6726f0a622571cc952364d04280e6e +Subproject commit f240e884b44d632f61a6f1c3074150699cd542b5 From 1edb9c312c71edeaa9cc1fae2adf4de14e9026a4 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Wed, 8 Apr 2026 14:14:44 +0530 Subject: [PATCH 4/5] fix(nimble): Fix prox service to handle negative values --- components/bt/host/nimble/nimble | 2 +- .../proximity_sensor_cent/main/main.c | 19 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index f240e884b44..50075787b20 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit f240e884b44d632f61a6f1c3074150699cd542b5 +Subproject commit 50075787b20e1cf83fd27b0d8b2d2aa62f55b0f1 diff --git a/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_cent/main/main.c b/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_cent/main/main.c index e7029e278d4..1223715a026 100644 --- a/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_cent/main/main.c +++ b/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_cent/main/main.c @@ -24,14 +24,6 @@ static int8_t tx_pwr_lvl; static struct ble_prox_cent_conn_peer conn_peer[MYNEWT_VAL(BLE_MAX_CONNECTIONS) + 1]; static struct ble_prox_cent_link_lost_peer disconn_peer[MYNEWT_VAL(BLE_MAX_CONNECTIONS) + 1]; -/* Note: Path loss is calculated using formula : threshold - RSSI value - * by default threshold is kept -128 as per the spec - * high_threshold and low_threshold are hardcoded after testing and noting - * RSSI values when distance between devices are less and more. - */ -static int8_t high_threshold = -70; -static int8_t low_threshold = -100; - void ble_store_config_init(void); static void ble_prox_cent_scan(void); static int ble_prox_cent_gap_event(struct ble_gap_event *event, void *arg); @@ -661,16 +653,11 @@ ble_prox_cent_path_loss_task(void *pvParameters) MODLOG_DFLT(INFO, "path loss = %d pwr lvl = %d rssi = %d", path_loss, tx_pwr_lvl, rssi); - if ((conn_peer[i].val_handle != 0) && - (path_loss > high_threshold || path_loss < low_threshold)) { - - if (path_loss < low_threshold) { - path_loss = 0; - } - + if (conn_peer[i].val_handle != 0) { + int8_t path_loss_val = (int8_t)path_loss; #if MYNEWT_VAL(BLE_GATTC) rc = ble_gattc_write_no_rsp_flat(i, conn_peer[i].val_handle, - &path_loss, sizeof(path_loss)); + &path_loss_val, sizeof(path_loss_val)); if (rc != 0) { MODLOG_DFLT(ERROR, "Error: Failed to write characteristic; rc=%d\n", rc); From a70ad130c2834c4c1ab4c65fd7e3ffa0eb716645 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Tue, 31 Mar 2026 17:15:07 +0530 Subject: [PATCH 5/5] fix(nimble): Resolve host lock assert in DEBUG mode --- 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 50075787b20..1022de21ca9 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 50075787b20e1cf83fd27b0d8b2d2aa62f55b0f1 +Subproject commit 1022de21ca9eb62af86b2b59024b29bff17f29c8