Skip to content

Commit d8798c4

Browse files
committed
fix(ble/bluedroid): Fixed BLE cannot create connection
1 parent e0991fa commit d8798c4

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
@@ -4003,6 +4003,9 @@ static void btm_ble_stop_discover(void)
40034003
if(btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE)) {
40044004
osi_sem_take(&scan_enable_sem, OSI_SEM_MAX_TIMEOUT);
40054005
}
4006+
/* reset status */
4007+
btm_ble_clear_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
4008+
btm_ble_clear_topology_mask(BTM_BLE_STATE_PASSIVE_SCAN_BIT);
40064009
}
40074010

40084011
if (p_scan_cb) {

0 commit comments

Comments
 (0)