BLE_DM_ProceedSecurity

C

uint16_t BLE_DM_ProceedSecurity(uint16_t connHandle, bool repairing);

Description

Initiates the security process based on the current role and pairing status.

Note

For the Central role, if paired information exists in PDS for the connected peer device, BLE_GAP_EnableEncryption will be called to initiate the encryption procedure. Otherwise, BLE_SMP_InitiatePairing will be called to start the pairing procedure.

For the Peripheral role, BLE_DM will call BLE_SMP_InitiatePairing to trigger an SMP security request. The remote Central device will then decide to initiate either pairing or encryption.

Parameters

ParameterDescription
[in] connHandleConnection handle associated with this connection.
[in] repairingFor the Central role, set to true to force re-pairing; otherwise, set to false.

Return values

Return valueDescription
MBA_RES_SUCCESSSecurity process initiated successfully.
MBA_RES_OOMFailed due to internal memory allocation failure.
MBA_RES_INVALID_PARAThe connection handle is invalid.