1.1.2.1.4.4.16 BLE_SMP_ScOobDataReply
C
uint16_t BLE_SMP_ScOobDataReply(uint16_t connHandle, uint8_t *p_confirm, uint8_t *p_rand);
Description
Send the OOB data for pairing process. The API should be called in response to OOB data request. Hence, it should be called in SMP callback function when BLE_SMP_EVT_INPUT_SC_OOB_DATA_REQUEST event is generated. These events are received only when OOB method is selected for LE Secure Connections pairing.
Note
If event BLE_SMP_EVT_INPUT_SC_OOB_DATA_REQUEST is received then the OOB data may be generated by application.
Events generated
This API is called during pairing procedure, please see the events generated of BLE_SMP_InitiatePairing.
Parameters
Parameter | Description |
---|---|
[in] connHandle | Connection handle associated with this connection. |
[in] p_confirm | Pointer to the Confirm Value. Set NULL if local device cannot provide the information. The length of Confirm Value should be 16 bytes value. |
[in] p_rand | Pointer to the Random Number. Set NULL if local device cannot provide the information. The length of Random Number should be 16 bytes value. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully replied with the OOB data for pairing process. |
MBA_RES_FAIL | The specified connection handle is invalid. |
MBA_RES_BAD_STATE | The OOB data for Legacy pairing if requested. It should call BLE_SMP_OobDataReply to reply OOB data. |