components/bt/host/bluedroid/stack/btm/btm_sec.c
/*******************************************************************************
**
** Function         BTM_RemoteOobDataReply
**
** Description      This function is called to provide the remote OOB data for
**                  Simple Pairing in response to BTM_SP_RMT_OOB_EVT
**
** Parameters:      bd_addr     - Address of the peer device
**                  c           - simple pairing Hash C.
**                  r           - simple pairing Randomizer  C.
**
*******************************************************************************/
Function         BTM_RemoteOobDataReply
Description      This function is called to provide the remote OOB data for
Simple Pairing in response to BTM_SP_RMT_OOB_EVT

bd_addr     - Address of the peer device
c           - simple pairing Hash C.
r           - simple pairing Randomizer  C.
Function BTM_RemoteOobDataReply Description This function is called to provide the remote OOB data for Simple Pairing in response to BTM_SP_RMT_OOB_EVT bd_addr - Address of the peer device c - simple pairing Hash C . r - simple pairing Randomizer C .
void BTM_RemoteOobDataReply(tBTM_STATUS res, BD_ADDR bd_addr, BT_OCTET16 c, BT_OCTET16 r)
{
#if (BT_USE_TRACES == TRUE && SMP_INCLUDED == TRUE)
    BTM_TRACE_EVENT ("%s() - State: %s res: %d\n", __func__,
                     btm_pair_state_descr(btm_cb.pairing_state), res);
#endif  
    if (btm_cb.pairing_state != BTM_PAIR_STATE_WAIT_LOCAL_OOB_RSP) {
        return;
    }
    btm_sec_change_pairing_state (BTM_PAIR_STATE_WAIT_AUTH_COMPLETE);
    if (res != BTM_SUCCESS) {
        btm_cb.acl_disc_reason = HCI_ERR_HOST_REJECT_SECURITY;
        btsnd_hcic_rem_oob_neg_reply (bd_addr);
    } else {
        btm_cb.acl_disc_reason = HCI_SUCCESS;
        btsnd_hcic_rem_oob_reply (bd_addr, c, r);
    }
}
void BTM_RemoteOobDataReply ( tBTM_STATUS res , BD_ADDR bd_addr , BT_OCTET16 c , BT_OCTET16 r ) { #if ( BT_USE_TRACES == TRUE && SMP_INCLUDED == TRUE ) BTM_TRACE_EVENT ( " \n " , __func__ , btm_pair_state_descr ( btm_cb . pairing_state ) , res ) ; #endif if ( btm_cb . pairing_state != BTM_PAIR_STATE_WAIT_LOCAL_OOB_RSP ) { return ; } btm_sec_change_pairing_state ( BTM_PAIR_STATE_WAIT_AUTH_COMPLETE ) ; if ( res != BTM_SUCCESS ) { btm_cb . acl_disc_reason = HCI_ERR_HOST_REJECT_SECURITY ; btsnd_hcic_rem_oob_neg_reply ( bd_addr ) ; } else { btm_cb . acl_disc_reason = HCI_SUCCESS ; btsnd_hcic_rem_oob_reply ( bd_addr , c , r ) ; } }
Function         BTM_RemoteOobDataReply
Description      This function is called to provide the remote OOB data for
Simple Pairing in response to BTM_SP_RMT_OOB_EVT
Function BTM_RemoteOobDataReply Description This function is called to provide the remote OOB data for Simple Pairing in response to BTM_SP_RMT_OOB_EVT
///BT_USE_TRACES == TRUE && SMP_INCLUDED == TRUE /* If timeout already expired or has been canceled, ignore the reply */ /* use BTM_PAIR_STATE_WAIT_AUTH_COMPLETE to report authentication failed event */