bta_dm_cb.is_bta_dm_active = false;
} else if (status == BTA_SYS_HW_ON_EVT) {
/* FIXME: We should not unregister as the SYS shall invoke this callback on
- * a H/W error.
- * We need to revisit when this platform has more than one BLuetooth H/W chip
- */
+ * a H/W error.
+ * We need to revisit when this platform has more than one BLuetooth H/W
+ * chip
+ */
// bta_sys_hw_unregister( BTA_SYS_HW_BLUETOOTH);
/* save security callback */
if (bta_dm_cb.p_sec_cback)
bta_dm_cb.p_sec_cback(BTA_DM_AUTH_CMPL_EVT, &sec_event);
- bta_dm_remove_sec_dev_entry(bd_addr);
+ if (result != HCI_ERR_LMP_RESPONSE_TIMEOUT &&
+ result != HCI_ERR_PAGE_TIMEOUT &&
+ result != HCI_ERR_CONN_FAILED_ESTABLISHMENT) {
+ bta_dm_remove_sec_dev_entry(bd_addr);
+ }
}
return BTM_SUCCESS;
sec_event.cfm_req.loc_io_caps = p_data->cfm_req.loc_io_caps;
sec_event.cfm_req.rmt_io_caps = p_data->cfm_req.rmt_io_caps;
-/* continue to next case */
+ /* continue to next case */
/* Passkey entry mode, mobile device with output capability is very
unlikely to receive key request, so skip this event */
/*case BTM_SP_KEY_REQ_EVT: */
tBTA_DM_SEARCH result;
/*
- * This logic will not work for gatt case. We are checking against the
+ * This logic will not work for gatt case. We are checking against the
* bluetooth profiles here
- * just copy the GATTID in raw data field and send it across.
- */
+ * just copy the GATTID in raw data field and send it across.
+ */
if (bta_dm_search_cb.ble_raw_used + sizeof(tBTA_GATT_ID) <
bta_dm_search_cb.ble_raw_size) {
// Map the HCI fail reason to bt status
switch (p_auth_cmpl->fail_reason) {
case HCI_ERR_PAGE_TIMEOUT:
+ case HCI_ERR_LMP_RESPONSE_TIMEOUT:
if (interop_match_addr(INTEROP_AUTO_RETRY_PAIRING, &bd_addr) &&
pairing_cb.timeout_retries) {
BTIF_TRACE_WARNING("%s() - Pairing timeout; retrying (%d) ...",
status = BT_STATUS_AUTH_REJECTED;
break;
- case HCI_ERR_LMP_RESPONSE_TIMEOUT:
- status = BT_STATUS_AUTH_FAILURE;
- break;
-
/* map the auth failure codes, so we can retry pairing if necessary */
case HCI_ERR_AUTH_FAILURE:
case HCI_ERR_KEY_MISSING: