NFC BLE Pairing Lib

nRF5 SDK v14.0.0

High level library for BLE Connection Handover pairing using NFC. More...

Functions

ret_code_t nfc_ble_pair_init ( ble_advertising_t *const p_advertising, nfc_pairing_mode_t mode)
Initializes NFC tag data and turns on tag emulation. More...
ret_code_t nfc_ble_pair_mode_set ( nfc_pairing_mode_t mode)
Sets pairing data and BLE security mode. More...
nfc_pairing_mode_t nfc_ble_pair_mode_get (void)
Funtion to obtain current pairing mode. More...

Detailed Description

High level library for BLE Connection Handover pairing using NFC.

Enumeration Type Documentation

NFC pairing types.

Enumerator
NFC_PAIRING_MODE_JUST_WORKS

Legacy Just Works pairing without security key

NFC_PAIRING_MODE_OOB

Legacy OOB pairing with Temporary Key shared through NFC tag data

NFC_PAIRING_MODE_LESC_JUST_WORKS

LESC pairing without authentication data

NFC_PAIRING_MODE_LESC_OOB

LESC pairing with OOB authentication data

NFC_PAIRING_MODE_GENERIC_OOB

OOB pairing with fallback from LESC to Legacy mode

NFC_PAIRING_MODE_CNT

Number of available pairing modes

Function Documentation

ret_code_t nfc_ble_pair_init ( ble_advertising_t *const p_advertising ,
nfc_pairing_mode_t mode
)

Initializes NFC tag data and turns on tag emulation.

Warning
It is assumed that Peer Manager has already been initialized before calling this function. It is also assumed that BLE advertising has already been initialized and it is configured to run in the BLE_ADV_MODE_FAST mode.
Parameters
[in] mode Pairing mode, this is value of the nfc_pairing_mode_t enum.
[in] p_advertising Pointer to the advertising module instance.
Return values
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 )

Funtion to obtain current pairing mode.

Returns
Current pairing mode.
ret_code_t nfc_ble_pair_mode_set ( nfc_pairing_mode_t mode )

Sets pairing data and BLE security mode.

Parameters
[in] mode New pairing mode, this is value of the nfc_pairing_mode_t enum.
Return values
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.