diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2012-09-03 04:51:00 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-09-04 15:38:15 -0700 |
commit | 1eeb8796d520905967f61bb47e4feb06091e3279 (patch) | |
tree | b5b159cfe7ae5412292131fa579340ff13da29a5 /btif | |
parent | 5a23a0d4a99b55d2e2641102fc9cec10489e0c21 (diff) | |
download | external_bluetooth_bluedroid-1eeb8796d520905967f61bb47e4feb06091e3279.zip external_bluetooth_bluedroid-1eeb8796d520905967f61bb47e4feb06091e3279.tar.gz external_bluetooth_bluedroid-1eeb8796d520905967f61bb47e4feb06091e3279.tar.bz2 |
Handle all auth failure codes to retry pairing
By default stack will attempt to auto-pair with devices that match
a certain COD. If pairing fails, pairing will be retried with manual
user pin entry. The retry was limited to HCI error code 0x05 (auth
failure). Expanded this list to handle more error conditions
bug 7092121
Change-Id: I7c11d03b87350af597062cf77a296e340a929ef9
Diffstat (limited to 'btif')
-rwxr-xr-x | btif/src/btif_dm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index 5eb46a0..062ac59 100755 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -765,7 +765,13 @@ static void btif_dm_auth_cmpl_evt (tBTA_DM_AUTH_CMPL *p_auth_cmpl) status = BT_STATUS_RMT_DEV_DOWN; break; + /* map the auth failure codes, so we can retry pairing if necessary */ case HCI_ERR_AUTH_FAILURE: + case HCI_ERR_HOST_REJECT_SECURITY: + case HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE: + case HCI_ERR_UNIT_KEY_USED: + case HCI_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED: + case HCI_ERR_INSUFFCIENT_SECURITY: BTIF_TRACE_DEBUG1(" %s() Authentication fail ", __FUNCTION__); if (pairing_cb.autopair_attempts == 1) { |