Component/bt: fix connect fail when remote addr type is random

This commit is contained in:
zhiweijian
2018-03-23 11:08:03 +08:00
parent da27816314
commit e6262375a3
31 changed files with 67 additions and 45 deletions

View File

@@ -155,7 +155,7 @@ tSMP_STATUS SMP_Pair (BD_ADDR bd_addr)
memcpy (p_cb->pairing_bda, bd_addr, BD_ADDR_LEN);
if (!L2CA_ConnectFixedChnl (L2CAP_SMP_CID, bd_addr)) {
if (!L2CA_ConnectFixedChnl (L2CAP_SMP_CID, bd_addr, BLE_ADDR_UNKNOWN_TYPE)) {
SMP_TRACE_ERROR("%s: L2C connect fixed channel failed.\n", __FUNCTION__);
smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
return status;
@@ -198,7 +198,7 @@ tSMP_STATUS SMP_BR_PairWith (BD_ADDR bd_addr)
memcpy (p_cb->pairing_bda, bd_addr, BD_ADDR_LEN);
if (!L2CA_ConnectFixedChnl (L2CAP_SMP_BR_CID, bd_addr)) {
if (!L2CA_ConnectFixedChnl (L2CAP_SMP_BR_CID, bd_addr, BLE_ADDR_UNKNOWN_TYPE)) {
SMP_TRACE_ERROR("%s: L2C connect fixed channel failed.", __FUNCTION__);
smp_br_state_machine_event(p_cb, SMP_BR_AUTH_CMPL_EVT, &status);
return status;