Skip to content

Commit

Permalink
fixed the issue iOS devices cannot initiate connection
Browse files Browse the repository at this point in the history
to ESP32 while there is a BLE connection to this ESP32

Closes #6557
  • Loading branch information
BetterJincheng committed Sep 28, 2022
1 parent 89ecfa9 commit f2000d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 0 additions & 4 deletions components/bt/host/bluedroid/stack/btm/btm_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,6 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
btm_establish_continue (p);
return;
}
} else {
/* If remote features indicated secure connection (SC) mode, check the remote feautres again*/
/* this is to prevent from BIAS attack where attacker can downgrade SC mode*/
btm_read_remote_features (p->hci_handle);
}
}

Expand Down
4 changes: 3 additions & 1 deletion components/bt/host/bluedroid/stack/btm/btm_sec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4027,7 +4027,9 @@ void btm_sec_auth_complete (UINT16 handle, UINT8 status)
return;
}

p_dev_rec->sec_flags |= BTM_SEC_AUTHENTICATED;
if (!(p_dev_rec->sm4 & BTM_SM4_UPGRADE)) {
p_dev_rec->sec_flags |= BTM_SEC_AUTHENTICATED;
}

if (p_dev_rec->pin_code_length >= 16 ||
p_dev_rec->link_key_type == BTM_LKEY_TYPE_AUTH_COMB ||
Expand Down
3 changes: 2 additions & 1 deletion components/bt/host/bluedroid/stack/l2cap/l2c_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ BOOLEAN l2c_link_hci_conn_req (BD_ADDR bd_addr)

if (p_lcb_cur->in_use) {
no_links = FALSE;
p_lcb->link_role = HCI_ROLE_MASTER;
// p_lcb->link_role = HCI_ROLE_MASTER;
p_lcb->link_role = HCI_ROLE_SLAVE;
break;
}
}
Expand Down

0 comments on commit f2000d8

Please sign in to comment.