GATTS_EncDataKeyMatlRsp

PIC32CX-BZ6

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

ParameterDescription
[in] connHandleConnection handle for sending the response.
[in] p_keyPointer to the 16-byte shared session key.
[in] p_ivPointer to the 8-byte initialization vector.

Return values

Return valueDescription
MBA_RES_SUCCESSResponse successfully initiated.
MBA_RES_FAILOperation not permitted; no corresponding read request received.
MBA_RES_OOMMemory allocation failure occurred internally.
MBA_RES_INVALID_PARAInvalid parameters, such as an invalid connection handle.