OSDN Git Service

GAP: Use proper page scan rep mode for connection
authorVenkata Jagadeesh Garaga <quic_vgaraga@quicinc.com>
Fri, 17 Apr 2020 10:36:17 +0000 (16:06 +0530)
committerHarshad Ulhas Dhabu <hdhabu@google.com>
Thu, 11 Jun 2020 23:27:39 +0000 (23:27 +0000)
commit78d863bd3002bba947f1a957211e3748e740f24b
tree44dbdb03e25053fdf126db41ff7c762f469f1748
parentb5deb4ac2eaabce20a835b8b35b3a2f24a392c57
GAP: Use proper page scan rep mode for connection

Issue: Page time out seen when user initiated pairing from LE scan response

Steps to reproduce
==================
Steps:
1. Turn on BT
2. inquiry any dual mode device
3. Initiate pairing (only LE scan response received but br/edr
   inquiry response not received)

Actual Result:
Remote name request or create connection got page timeout some times

Expected result:
Remote name request and create connection should be successful

Root Cause:
If user finds only LE scan response for dual mode  devices, then stack
treats it as dual mode based on br/edr not supported bit. If pairing
initiated from LE scan response, then stack initiates RNR and ACL connection
on br/edr transport with wrong page scan response from LE inquiry database,
it leads to page time out.

Fix:
Use page scan response from inquiry data base if br/edr inquiry response
received, else use default page scan response R1 in RNR and create connection.

Test: Follow steps above
Bug: 154286616
Change-Id: I281ebc6d0e67d88c30328cb67df7f28793f354c1
stack/btm/btm_ble_gap.cc
stack/btm/btm_inq.cc
stack/l2cap/l2c_utils.cc