1.2.2.1.1.4.11 BLE_GAP_EnableEncryption

C

uint16_t BLE_GAP_EnableEncryption(uint16_t connHandle, uint8_t *p_random, uint8_t *p_ediv, uint8_t *p_ltk);

Description

Authenticate the given encryption key associated with the remote device specified by the connection, and once authenticated will encrypt the connection.

Note

This command shall only be used when the local devices role is Central.

Parameters

ParameterDescription
[in] connHandleConnection handle associated with this connection.
[in] p_randomPointer to 64 bit random number.
[in] p_edivPointer to 16 bit encrypted diversifier.
[in] p_ltkPointer to 128 bit long term key (ltk).

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully started.
MBA_RES_OOMInternal memory allocation failure.
MBA_RES_INVALID_PARAInvalid parameters.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed.