OSDN Git Service

GAP Setting remove device pending status as FALSE
authorBalraj Selvaraj <bselva@codeaurora.org>
Thu, 11 Feb 2016 08:16:02 +0000 (13:46 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 4 Mar 2016 18:53:04 +0000 (10:53 -0800)
commit9412bbaea51f577d903e060b8c8214fbd28b0b4f
tree5b88442d76db7f28ef45f141428fae48002ada57
parent4e972d8c24ecfb808757ef5c81eb3877ebc93027
GAP Setting remove device pending status as FALSE

Use case: DUT deletes Link key and failed to initiate
  authentication request after remote headset turned Off and ON

steps:
- Pair the DUT and HS. (Link Keys get established.)
- Now Switch OFF BT on DUT. (DUT still has the Link key of HS)
- Reset the paired devices memory in HS and keep HS in
  pairing mode. (HS loses DUT's link key)
- Now switch ON BT on DUT. (DUT starts reconnection with HS,
  but as HS lost DUT's key, PIN or KEY missing event will
  come to host)
- DUT reconnects to HS (Using newly established link keys)
- Now power OFF and ON the HS.
- HS will try reconnection with DUT.
- While there is an incoming connection from HS to DUT,
  host is giving negative link key reply always for the
  multiple link key requests from HS.
- HS sends disconnection with "Authentication failure"

Failure: DUT should not delete Link key and DUT should
  initiate Authenticatin request.

Root cause: pending status was not FALSE from security device
  DB, which will causing Authentication Failure.

Fix: Setting the remove device pending status to FALSE from
  security device DB, when the link key notification event
  comes. Basically it will avoid deleting the device from
  security device DB, Which is solving the reconnection
  initated from remote when we remove the link key at
  remote side.

Change-Id: Ic164d8d5b5c2e0b9cc5f04f993047fb0a8e5d9a9
bta/dm/bta_dm_act.c