nRF51 SDK - S110 SoftDevice
|
This section describes APIs to set up Security. These APIs require that the peer is connected before the procedures can be requested. More...
Functions | |
api_result_t | dm_security_setup_req (dm_handle_t *p_handle) |
Function for requesting setting up security on a link. More... | |
api_result_t | dm_security_status_req (dm_handle_t const *p_handle, dm_security_status_t *p_status) |
Function for reading the status of the security on a link. More... | |
api_result_t | dm_whitelist_create (dm_application_instance_t const *p_handle, ble_gap_whitelist_t *p_whitelist) |
Function for creating the whitelist. More... | |
This section describes APIs to set up Security. These APIs require that the peer is connected before the procedures can be requested.
This group allows application to request security procedures or get the status of the security on a link.
api_result_t dm_security_setup_req | ( | dm_handle_t * | p_handle | ) |
Function for requesting setting up security on a link.
This API initiates security procedures with a peer device.
If a pairing procedure is initiated successfully, application is notified of DM_EVT_SECURITY_SETUP_COMPLETE. A result indicating success or failure is notified along with the event. In case the link is re-encrypted using existing bond information, DM_EVT_LINK_SECURED is notified to the application.
[in] | p_handle | Identifies the link on which security is desired. |
NRF_SUCCESS | On success, else an error code indicating reason for failure. |
NRF_ERROR_INVALID_STATE | If the API is called without module initialization and/or application registration. |
NRF_ERROR_NULL | If p_handle is NULL. |
NRF_ERROR_INVALID_ADDR | If the peer is not identified by the handle provided by the application or if the peer is not connected when this procedure is requested. |
api_result_t dm_security_status_req | ( | dm_handle_t const * | p_handle, |
dm_security_status_t * | p_status | ||
) |
Function for reading the status of the security on a link.
This API allows application to query status of security on a link.
[in] | p_handle | Identifies the link on which security is desired. |
[out] | p_status | Pointer where security status is provided to the application. See dm_security_status_t for possible statuses that can be expected. |
NRF_SUCCESS | Or appropriate error code indicating reason for failure. |
NRF_ERROR_INVALID_STATE | If the API is called without module initialization and/or application registration. |
NRF_ERROR_NULL | If p_handle or p_status is NULL. |
NRF_ERROR_INVALID_ADDR | If peer is not identified by the handle provided by the application or if peer is not connected when this procedure is requested. |
api_result_t dm_whitelist_create | ( | dm_application_instance_t const * | p_handle, |
ble_gap_whitelist_t * | p_whitelist | ||
) |
Function for creating the whitelist.
This API allows application to create whitelist based on bonded peer devices in module data base.
[in] | p_handle | Identifies the application requesting whitelist creation. |
[in,out] | p_whitelist | Pointer where created whitelist is provided to the application. |
NRF_SUCCESS | On success, else an error code indicating reason for failure. |
NRF_ERROR_INVALID_STATE | If the API is called without module initialization and/or application registration. |
NRF_ERROR_NULL | If p_handle or p_whitelist is NULL. |