ble_gap_encryption_initiate() function
Initiates the GAP encryption procedure as a master. This is for testing only and should not be used by application. Use ble_gap_security_initiate() instead.
Arguments
conn_handle
The handle corresponding to the connection to start encryption.
key_size
Encryption key size
ltk
Long Term Key to be used for encryption.
rand_val
Random Value for EDIV and LTK
auth
If LTK provided is authenticated.
Return value
0 on success; BLE_HS_ENOTCONN if the there is no connection with the specified handle; BLE_HS_EALREADY if an encryption procedure for this connection is already in progress; Other nonzero on error.
ble_gap_encryption_initiate() calls 3 functions:
![]()
ble_gap_encryption_initiate()
ble_gap_encryption_initiate():
![]()
ble_gap_encryption_initiate()