mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-17 17:22:07 +00:00
fix(ble/bluedroid): Fixed extended adv restart failure during reconnection
(cherry picked from commit 6392180813
)
Co-authored-by: chenjianhua <chenjianhua@espressif.com>
This commit is contained in:
@@ -478,6 +478,8 @@ BOOLEAN l2c_link_hci_disc_comp (UINT16 handle, UINT8 reason)
|
||||
if (l2cu_create_conn(p_lcb, BT_TRANSPORT_LE)) {
|
||||
btm_acl_removed (p_lcb->remote_bd_addr, BT_TRANSPORT_LE);
|
||||
lcb_is_free = FALSE; /* still using this lcb */
|
||||
} else {
|
||||
L2CAP_TRACE_ERROR("master retry connect failed");
|
||||
}
|
||||
}
|
||||
#endif // (GATTC_CONNECT_RETRY_EN == TRUE)
|
||||
@@ -486,7 +488,10 @@ BOOLEAN l2c_link_hci_disc_comp (UINT16 handle, UINT8 reason)
|
||||
if(btm_ble_inter_get() && p_lcb->link_role == HCI_ROLE_SLAVE) {
|
||||
p_lcb->retry_create_con ++;
|
||||
L2CAP_TRACE_DEBUG("slave restart extend adv, retry count %d reason 0x%x\n", p_lcb->retry_create_con, reason);
|
||||
BTM_BleStartExtAdvRestart(handle);
|
||||
tBTM_STATUS start_adv_status = BTM_BleStartExtAdvRestart(handle);
|
||||
if (start_adv_status != BTM_SUCCESS) {
|
||||
L2CAP_TRACE_ERROR("slave restart extend adv failed (err 0x%x)", start_adv_status);
|
||||
}
|
||||
}
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
|
||||
@@ -494,7 +499,10 @@ BOOLEAN l2c_link_hci_disc_comp (UINT16 handle, UINT8 reason)
|
||||
if(!btm_ble_inter_get() && p_lcb->link_role == HCI_ROLE_SLAVE) {
|
||||
p_lcb->retry_create_con ++;
|
||||
L2CAP_TRACE_DEBUG("slave resatrt adv, retry count %d reason 0x%x\n", p_lcb->retry_create_con, reason);
|
||||
btm_ble_start_adv();
|
||||
tBTM_STATUS start_adv_status = btm_ble_start_adv();
|
||||
if (start_adv_status != BTM_SUCCESS) {
|
||||
L2CAP_TRACE_ERROR("slave resatrt adv failed (err 0x%x)", start_adv_status);
|
||||
}
|
||||
}
|
||||
#endif // #if (BLE_42_FEATURE_SUPPORT == TRUE)
|
||||
}
|
||||
|
Reference in New Issue
Block a user