Skip to content

Commit b81f351

Browse files
committed
Merge branch 'bugfix/fix_ble_cannot_create_conn_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed BLE cannot create connection(v5.3) See merge request espressif/esp-idf!32306
2 parents 2ea1eff + d8798c4 commit b81f351

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

components/bt/host/bluedroid/bta/dm/bta_dm_act.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5419,6 +5419,10 @@ void bta_dm_ble_scan (tBTA_DM_MSG *p_data)
54195419
status = (status == BTM_CMD_STARTED ? BTA_SUCCESS : BTA_FAILURE);
54205420
p_data->ble_scan.p_stop_scan_cback(status);
54215421
}
5422+
5423+
// reset BLE scan link state when stop scan
5424+
btm_ble_clear_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
5425+
btm_ble_clear_topology_mask(BTM_BLE_STATE_PASSIVE_SCAN_BIT);
54225426
}
54235427
}
54245428

components/bt/host/bluedroid/stack/btm/btm_ble_gap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4009,6 +4009,9 @@ static void btm_ble_stop_discover(void)
40094009
if(btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE)) {
40104010
osi_sem_take(&scan_enable_sem, OSI_SEM_MAX_TIMEOUT);
40114011
}
4012+
/* reset status */
4013+
btm_ble_clear_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
4014+
btm_ble_clear_topology_mask(BTM_BLE_STATE_PASSIVE_SCAN_BIT);
40124015
}
40134016

40144017
if (p_scan_cb) {

0 commit comments

Comments
 (0)