Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3466c35 authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Matthew Xie
Browse files

LE: Disable L2CAP connection parameter update during pairing

Some peripherals change the connection parameters during the pairing
procedure. Ideally when service discovery is started, connection
parameters are reset to default values. In instances where the
connection update fails, service discovery takes a very long time and
may result in a GATT application not receiving a connection status
update.
Disabling connection paramter update during service discovery ensures
a quick service discovery and improves interoperability.

Bug: 8714594
Change-Id: I2177e57bf250b99e314a1b020cd0fadbd480214e
parent bac74d76
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -149,6 +149,14 @@ void smp_send_pair_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
    tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (p_cb->pairing_bda);
    SMP_TRACE_DEBUG0 ("smp_send_pair_req  ");

#if BLE_INCLUDED == TRUE
    /* Disable L2CAP connection parameter updates while bonding since
       some peripherals are not able to revert to fast connection parameters
       during the start of service discovery. Connection paramter updates
       get enabled again once service discovery completes. */
    L2CA_EnableUpdateBleConnParams(p_cb->pairing_bda, FALSE);
#endif

    /* erase all keys when master sends pairing req*/
    if (p_dev_rec)
        btm_sec_clear_ble_keys(p_dev_rec);