High-level library for BLE Connection Handover pairing using NFC. More...
Modules | |
Library parameters configuration | |
Enumerations | |
enum | nfc_pairing_mode_t { NFC_PAIRING_MODE_JUST_WORKS, NFC_PAIRING_MODE_OOB, NFC_PAIRING_MODE_LESC_JUST_WORKS, NFC_PAIRING_MODE_LESC_OOB, NFC_PAIRING_MODE_GENERIC_OOB, NFC_PAIRING_MODE_CNT } |
NFC pairing types. More... | |
Functions | |
ret_code_t | nfc_ble_pair_init (ble_advertising_t *const p_advertising, nfc_pairing_mode_t mode) |
Funtion for initializing NFC tag data and turning on tag emulation. More... | |
ret_code_t | nfc_ble_pair_mode_set (nfc_pairing_mode_t mode) |
Function for setting pairing data and BLE security mode. More... | |
nfc_pairing_mode_t | nfc_ble_pair_mode_get (void) |
Function for obtaining the current pairing mode. More... | |
ret_code_t | nfc_ble_pair_on_pm_params_req (pm_evt_t const *p_evt) |
Function for replying to PM_EVT_CONN_SEC_PARAMS_REQ. More... | |
High-level library for BLE Connection Handover pairing using NFC.
enum nfc_pairing_mode_t |
NFC pairing types.
ret_code_t nfc_ble_pair_init | ( | ble_advertising_t *const | p_advertising, |
nfc_pairing_mode_t | mode | ||
) |
Funtion for initializing NFC tag data and turning on tag emulation.
[in] | mode | Pairing mode, this is the value of the nfc_pairing_mode_t enum. |
[in] | p_advertising | Pointer to the advertising module instance. |
NRF_SUCCESS | If NFC has been initialized properly. |
NRF_ERROR_INVALID_PARAM | If pairing mode is invalid. |
NRF_ERROR_NULL | If pointer to the advertising module instance is NULL. |
Other | Other error codes might be returned depending on used modules. |
nfc_pairing_mode_t nfc_ble_pair_mode_get | ( | void | ) |
Function for obtaining the current pairing mode.
ret_code_t nfc_ble_pair_mode_set | ( | nfc_pairing_mode_t | mode | ) |
Function for setting pairing data and BLE security mode.
[in] | mode | New pairing mode, this is the value of the nfc_pairing_mode_t enum. |
NRF_SUCCESS | If new pairing mode has been set correctly. |
NRF_ERROR_INVALID_PARAM | If pairing mode is invalid. |
Other | Other error codes might be returned depending on used modules. |
ret_code_t nfc_ble_pair_on_pm_params_req | ( | pm_evt_t const * | p_evt | ) |
Function for replying to PM_EVT_CONN_SEC_PARAMS_REQ.
This function is used to allow dynamic changes in the Peer Manager security parameters depending on security parameters obtained from the peer. This is essential for dynamic switching between Legacy OOB and LESC OOB pairing modes when pairing library works in NFC_PAIRING_MODE_GENERIC_OOB mode.
[in] | p_evt | Pointer to the Peer Manager event struct with information about peer security parameters. |
NRF_SUCCESS | If proper reply has been sent or library does not need to reply. |
NRF_ERROR_NULL | If pointer to the Peer Manager event is NULL. |
Other | Other error codes might be returned by the pm_conn_sec_params_reply function. |