OSDN Git Service

Handling Authentication Failure From the lower layer
authorMatadeen Mishra <matade@codeaurora.org>
Wed, 23 Sep 2015 16:56:46 +0000 (22:26 +0530)
committerLinux Build Service Account <lnxbuild@localhost>
Wed, 24 Aug 2016 14:09:21 +0000 (08:09 -0600)
commite625c1370e46a722211642b91e9dbc2ade25d6d3
tree4c2ec5a300e11e18a6c575032a7c64c574aef180
parent81aa4ba89fb43580caa0eab72352f22e4fbb0881
Handling Authentication Failure From the lower layer

Use case: DUT unable to do connect with all devices in
Multipairing case.

Steps:
1. pair with HS
2. disconnect HS.
3. reconnect HS from DUT.

Failure: Authentication failure occurred due to LMP
transaction collision DUT not deleting link key which
lead to unable to connect to device.

Root Cause: Not posting the Authentication failure
event to application layer, while removing the link-key.

Fix: Post the Authentication failure event to application
and removing the link-key.

Change-Id: I079d8ce89c1fea66f0624127514cec8405bfdd3d

Add null check to avoid exception after L2CAP psm assigned

Use case: BT will get crash in SNS testing.

steps: SNS testing BT ON/OFF.

Failure: Crash is observed.

Root Cause: If the number of supported services increased,
larger service record array is required. Smaller array is
resulting in out of record error causing L2CAP deregister.

Fix: Check added to avoid null pointer exception if null
is returned while fetching sock from id. Also cleanup of
SDP and security records done during BT turning Off.

Change-Id: I2e77127262119cabf2c372f894427dcdf3350e80

Prevent crash due to second attempt to clean up eager_reader

Null out the eager readers once they are cleaned up, so we
don't try to clean them up later if an error occurs opening
the HAL again later.

Change-Id: I07df1010a1a619cb67b306d64e274d450234a002

Remove bonded device information on pairing rejected

Use Case: Remove bonded device information from the BTIF layer storage
when authentication failed.

Failure: Remote device appeared in the paired list after authentication
failed.

Steps:
1. Create a connection from DUT to remote.
2. Remove linkkey in remote.
3. Create connection from DUT to remote, which is in paired list of
DUT, Remote rejected the connection and authentication failed.
But after BT OFF/ON, remote device appeared in the paired list

Root Cause: Not removing device if remoted rejected the pairing
request with reason pairing not allowed

Fix: Remove bonded device information from the BTIF layer storage
on rejected with pairing not allowed reason from remote

Change-Id: Ic9e5e1ed70d304edd3dbca82a73833753fa0093c

GAP: Save pin code length for incoming legacy SAP connection

Use case: Carkit cannot reconnect to DUT in Sim Access Profile mode

Steps:
1. Pair with a car-kit (Agree all SAP, MAP, PBAP requests)
2. Initiate disconnection on DUT
3. Initiate re-connection on the car-kit.

Failure: SAP profile reconnection failing as dut gives negetive
linkkey reply.

Root Cause: sec_flags not getting updated without pin len and stack
triggering negative link key reply even linkkey is proper for 16 digit
authentication of SAP.

Fix: Save pin length during BTM_PINCodeReply.

Change-Id: I8300dd3ff497058291143313b169190910e0a7c5

Ignore pairing not allowed error when pairing in progress

Use case: Pairing with both devices fails, when there is
clash of pairing from 2 devices

1. Create a link from Test tool to DUT. Remove bonding info in Test tool.
2. Create a link from DUT to magic mouse. Unpair the link from DUT.
3. Click on magic mouse, it creates a link, and we get a pairing
   pop-up in DUT.
4. Try to pair from Test tool to DUT.

Failure: Pairing with mouse should success and other pairing
should fail. But both pairing fails

Root cause: Stack sending pairing not allowed error to upper layers
for the second device when already pairing is in progress with
some other device, which is impacting the existing pairing.

Fix: Issue fixed by Ignore pairing not allowed error for the
second device when already pairing is in progress with some
other device.

Change-Id: I20dbd70e7429505a580c9a20d40a8d92318f6c3e

Handled delayed info response from remote during SDP

Use case: DUT is not connecting to windows-7 tablet

Failure: Connection is not successful with windows-7 tablet.

Steps:
1. Turn on BT on DUT
2. Pair and connect from remote device.

Root Cause: DUT initiates connection with out waiting for
information response from remote device during SDP.

Fix: DUT will not wait for information response from the
remote during SDP.

Change-Id: Iee0251f8f81923b1291983b66b31c78e14d21af0

GAP: Update Paging and inquiry busy level seperately

Use case:  Bluetooth Search Fail while ACL disconnection.

Steps:
1. Headset(HBS 760) connect
2. Put Headset off
3. BT Search Fail.

Failure: BT search fail after disconnected Headset.

Root cause: While updating the busy level of Paging or inquiry '10'
was used as BL for paging and inquiry,this leads to
1. Ignore the one of them when both of them are active.
2. During ACL disconnection, unexpected inquiry busy level update.

Fix: Sending unique busy level for paging related events and inquiry
related events, so that each event will be notified.

Change-Id: I7bddcb4901061c450555235717b7d49bab922ae8

GAP Write 248 char name length to the chip while BT ON/OFF

Use case: Remote device cannot see local name with 248 chars.

steps:
1. Turn on BT (Default name will come)
2. Change local name to 248 chars
   make sure DUT can be successfully searched from remote device.
3. Turn off BT (or phone reboot)
4. Turn on BT

After step.4, the 248 chars name comes to GUI on MTP. However
device search from remote device having DUT "Default name".

Failure: Remote device cannot see local name with 248 chars.

Root cause: DUT not supporting for the 248 char local name

Fix: Writing the exact 248 character local name to the chip

Change-Id: I702af8fa8d0affda509de7a9f17af8922e410286

Failed to re-register APK Configuration for HDP

Use case: register/unregister HDP from third party APK

Test Steps:

1.Install Any Test APK which internally registers/unregister the HDP.
2.Run Test APK.
3.Do initialization of Test APK which internally registers the HDP.
4.Force stop the Test APK.
5.And rerun the APK by going back test APK menu.
6.Now it never perform the re-register the HDP as part of initialization.

Root Cause: HDP registration related counter write operations are done
in JNI main thread, and it's been referenced in BTIF thread.Sometimes,
if the context switch to BTIF thread doesn't happen immediately after
counter increment/decrement, it may not un-register the app if the
counter becomes 0.

Fix: Fixed it by making all operations related to counter in BTIF
thread, so that de-registration happens for all HDP APPs.

Change-Id: I71ace68a5f3d39d81b646f5f40c02ce56b9e93f0

Added check for hci_layer status before processing function calls

Use case: BT will get crash in SNS testing.

Steps: SNS testing BT ON/OFF.

Failure: Crash is observed.

Root Cause: When hci_layer functions for transmit command and cleanup
are called during hci_layer shutdown, they might try to access
lists that are already cleared as part of shutdown process.

Fix: Added check within functions to check for hci_layer state
before processing.

Change-Id: I8dbca9893e03dfc500886c5033a79976dc5d23e1

Group BR-EDR related SDP variables under transport

Use Case: Random RNR initiated after HOGP Keyboard disconnection.

steps:
1. keep madcatz in advertisement mode and scan, pair from DUT.
2. keep dailog Keyboard in advertisement mode and scan, pair from DUT.
3. Take Keyboard out of range to initiate disconnection from remote
or initiate disconnection from remote.

Failure: DUT trying to do RNR to random device.

Root Cause: when the disconnection happened for LE device, it sets
the wait_disc to true, that is causing random RNR to go for BR-EDR
device.

Fix: Group all BR-EDR related SDP variables under transport check
so that if some other operation on LE will not corrupt these BR-EDR
variables to mislead.

Change-Id: Ic9003f2b85bbaaa30b201b8a639a9d9b52055ac5
bta/dm/bta_dm_act.c
btif/src/btif_dm.c
btif/src/btif_hl.c
btif/src/btif_sock_l2cap.c
hci/src/hci_hal_h4.c
hci/src/hci_hal_mct.c
hci/src/hci_layer.c
stack/btm/btm_acl.c
stack/btm/btm_sec.c
stack/include/btm_api.h
stack/l2cap/l2c_csm.c