Standard event handlers implementing some best practices for BLE security. More...
Functions | |
void | pm_handler_on_pm_evt (pm_evt_t const *p_pm_evt) |
Standard function for making Peer Manager calls based on Peer Manager events. More... | |
void | pm_handler_pm_evt_log (pm_evt_t const *p_pm_evt) |
Auxiliary standard function for logging Peer Manager events. More... | |
void | pm_handler_flash_clean (pm_evt_t const *p_pm_evt) |
Auxiliary standard function for maintaining room in flash based on Peer Manager events. More... | |
void | pm_handler_flash_clean_on_return (void) |
Function to call when a Peer Manager function returns NRF_ERROR_STORAGE_FULL. More... | |
void | pm_handler_disconnect_on_sec_failure (pm_evt_t const *p_pm_evt) |
Auxiliary standard function for disconnecting when the connection could not be secured. More... | |
void | pm_handler_disconnect_on_insufficient_sec (pm_evt_t const *p_pm_evt, pm_conn_sec_status_t *p_min_conn_sec) |
Auxiliary standard function for disconnecting on insufficient connection security. More... | |
void | pm_handler_secure_on_connection (ble_evt_t const *p_ble_evt) |
Function for securing a connection when it is established. More... | |
void | pm_handler_secure_on_error (ble_evt_t const *p_ble_evt) |
Function for securing a connection if a GATT read or write operation lacks security. More... | |
Standard event handlers implementing some best practices for BLE security.
void pm_handler_disconnect_on_insufficient_sec | ( | pm_evt_t const * | p_pm_evt, |
pm_conn_sec_status_t * | p_min_conn_sec | ||
) |
Auxiliary standard function for disconnecting on insufficient connection security.
This function disconnects whenever the connection security succeeds, that is whenever it receives a PM_EVT_CONN_SEC_SUCCEEDED, but the established security does not fulfill the provided criteria.
[in] | p_pm_evt | Peer Manager event to handle. |
[in] | p_min_conn_sec | Minumum security status below which to disconnect the link. |
void pm_handler_disconnect_on_sec_failure | ( | pm_evt_t const * | p_pm_evt | ) |
Auxiliary standard function for disconnecting when the connection could not be secured.
This function disconnects whenever connection security fails, i.e. whenever it receives a PM_EVT_CONN_SEC_FAILED.
[in] | p_pm_evt | Peer Manager event to handle. |
void pm_handler_flash_clean | ( | pm_evt_t const * | p_pm_evt | ) |
Auxiliary standard function for maintaining room in flash based on Peer Manager events.
This function does the following:
[in] | p_pm_evt | Peer Manager event to handle. |
void pm_handler_flash_clean_on_return | ( | void | ) |
Function to call when a Peer Manager function returns NRF_ERROR_STORAGE_FULL.
void pm_handler_on_pm_evt | ( | pm_evt_t const * | p_pm_evt | ) |
Standard function for making Peer Manager calls based on Peer Manager events.
This function does the following:
[in] | p_pm_evt | Peer Manager event to handle. |
void pm_handler_pm_evt_log | ( | pm_evt_t const * | p_pm_evt | ) |
Auxiliary standard function for logging Peer Manager events.
This function logs all PM events using Logger module, at different severity levels. The PM_LOG_ENABLED and other PM_LOG_*
configs control these log messages.
[in] | p_pm_evt | Peer Manager event to log. |
void pm_handler_secure_on_connection | ( | ble_evt_t const * | p_ble_evt | ) |
Function for securing a connection when it is established.
This function starts security when receiving a BLE_GAP_EVT_CONNECTED event. This is affected by PM_HANDLER_SEC_DELAY_MS.
[in] | p_ble_evt | BLE event to handle. |
void pm_handler_secure_on_error | ( | ble_evt_t const * | p_ble_evt | ) |
Function for securing a connection if a GATT read or write operation lacks security.
This function starts pairing if a GATTC procedure fails with insufficient encryption or insufficient authentication. This is meant to delay performing pairing/bonding until it is actually needed to access resources. This is affected by PM_HANDLER_SEC_DELAY_MS.
[in] | p_ble_evt | BLE event to handle. |