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
| Parameter | Description |
|---|---|
| [in] connHandle | Connection handle associated with this connection. |
| [in] repairing | For the Central role, set to true to force re-pairing; otherwise, set to false. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Security process initiated successfully. |
| MBA_RES_OOM | Failed due to internal memory allocation failure. |
| MBA_RES_INVALID_PARA | The connection handle is invalid. |
