From 938ce4f4d12d9eabe8f865367d5cdc12fb7b9f48 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Fri, 21 Aug 2026 12:21:04 +0530 Subject: [PATCH] fix(nimble): bound PAwR synced connect retries in the example --- components/bt/host/nimble/nimble | 2 +- .../nimble/ble_pawr_adv_conn/ble_pawr_adv_conn/main/main.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 6ad55ca0aa7..96ab0e4d864 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 6ad55ca0aa7f0db03b6301e2f4a8d03309427f7b +Subproject commit 96ab0e4d864090777512cddbb4aa8609d598c000 diff --git a/examples/bluetooth/nimble/ble_pawr_adv_conn/ble_pawr_adv_conn/main/main.c b/examples/bluetooth/nimble/ble_pawr_adv_conn/ble_pawr_adv_conn/main/main.c index f5145169cc4..533f168d3c8 100644 --- a/examples/bluetooth/nimble/ble_pawr_adv_conn/ble_pawr_adv_conn/main/main.c +++ b/examples/bluetooth/nimble/ble_pawr_adv_conn/ble_pawr_adv_conn/main/main.c @@ -18,6 +18,10 @@ #define BLE_PAWR_RSP_SLOT_SPACING (10) /*!< Time between response slots (N * 0.125 ms) */ #define BLE_PAWR_NUM_RSP_SLOTS (25) /*!< Number of subevent response slots */ #define BLE_PAWR_SUB_DATA_LEN (20) +/* Give the controller a few periodic intervals to report the outcome of a + * synchronized connection attempt before retrying from another subevent. + */ +#define BLE_PAWR_CONN_TIMEOUT_MS (3 * BLE_PAWR_EVENT_PERIODIC_INTERVAL_MS) #define TAG "NimBLE_BLE_PAwR_CONN" @@ -162,7 +166,7 @@ gap_event_cb(struct ble_gap_event *event, void *arg) phy_mask = 0x01; if (conn == 0) { - rc = ble_gap_connect_with_synced(own_addr_type,adv_handle,subevent,&peer_addr,30000,phy_mask,NULL,NULL,NULL,gap_event_cb,NULL); + rc = ble_gap_connect_with_synced(own_addr_type,adv_handle,subevent,&peer_addr,BLE_PAWR_CONN_TIMEOUT_MS,phy_mask,NULL,NULL,NULL,gap_event_cb,NULL); if (rc != 0 ) { ESP_LOGI(TAG,"Error: Failed to connect to device , rc = %d\n",rc); } else {