Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_ble_cannot_create_conn_v5.3' into 'release/v…
Browse files Browse the repository at this point in the history
…5.3'

fix(ble/bluedroid): Fixed BLE cannot create connection(v5.3)

See merge request espressif/esp-idf!32306
  • Loading branch information
jack0c committed Jul 26, 2024
2 parents 2ea1eff + d8798c4 commit b81f351
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/bt/host/bluedroid/bta/dm/bta_dm_act.c
Original file line number Diff line number Diff line change
Expand Up @@ -5419,6 +5419,10 @@ void bta_dm_ble_scan (tBTA_DM_MSG *p_data)
status = (status == BTM_CMD_STARTED ? BTA_SUCCESS : BTA_FAILURE);
p_data->ble_scan.p_stop_scan_cback(status);
}

// reset BLE scan link state when stop scan
btm_ble_clear_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
btm_ble_clear_topology_mask(BTM_BLE_STATE_PASSIVE_SCAN_BIT);
}
}

Expand Down
3 changes: 3 additions & 0 deletions components/bt/host/bluedroid/stack/btm/btm_ble_gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -4009,6 +4009,9 @@ static void btm_ble_stop_discover(void)
if(btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE)) {
osi_sem_take(&scan_enable_sem, OSI_SEM_MAX_TIMEOUT);
}
/* reset status */
btm_ble_clear_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
btm_ble_clear_topology_mask(BTM_BLE_STATE_PASSIVE_SCAN_BIT);
}

if (p_scan_cb) {
Expand Down

0 comments on commit b81f351

Please sign in to comment.