GATTS_EncDataKeyMatlRsp
C
uint16_t GATTS_EncDataKeyMatlRsp(uint16_t connHandle, uint8_t *p_key, uint8_t *p_iv);Description
Responds to a GATT client's request for encrypted data key material.
Note
This function should be called upon receiving the GATTS_EVT_ENC_DATA_KEY_MATL_REQ event.If either p_key or p_iv is NULL, the read request will be rejected.
Parameters
| Parameter | Description |
|---|---|
| [in] connHandle | Connection handle for sending the response. |
| [in] p_key | Pointer to the 16-byte shared session key. |
| [in] p_iv | Pointer to the 8-byte initialization vector. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Response successfully initiated. |
| MBA_RES_FAIL | Operation not permitted; no corresponding read request received. |
| MBA_RES_OOM | Memory allocation failure occurred internally. |
| MBA_RES_INVALID_PARA | Invalid parameters, such as an invalid connection handle. |
