nRF5 SDK v17.1.0
Modules | Data Structures | Macros | Functions
Advertising and Scan Response Data Parser for NFC OOB pairing

Functions for parsing and decoding data in the Advertising and Scan Response Data format for NFC OOB pairing. More...

Modules

 BLE OOB pairing AD data parser configuration
 

Data Structures

struct  ble_gap_dev_name_t
 Bluetooth Low Energy GAP device name. More...
 
struct  nfc_ble_oob_pairing_data_t
 BLE Advertising data that is relevant for OOB pairing. More...
 

Macros

#define BLE_ADVDATA_APPEARANCE_NOT_PRESENT   0
 

Functions

ret_code_t nfc_ble_oob_advdata_parse (uint8_t const *p_advdata, uint8_t len, nfc_ble_oob_pairing_data_t *p_nfc_ble_pairing_data)
 Function for parsing BLE data encoded in AD Type format. More...
 
void nfc_oob_data_printout (nfc_ble_oob_pairing_data_t const *const p_pairing_data)
 Function for displaying values of basic BLE OOB Advertising data types. More...
 

Detailed Description

Functions for parsing and decoding data in the Advertising and Scan Response Data format for NFC OOB pairing.

Macro Definition Documentation

#define BLE_ADVDATA_APPEARANCE_NOT_PRESENT   0

Appearance AD structure not present.

Function Documentation

ret_code_t nfc_ble_oob_advdata_parse ( uint8_t const *  p_advdata,
uint8_t  len,
nfc_ble_oob_pairing_data_t p_nfc_ble_pairing_data 
)

Function for parsing BLE data encoded in AD Type format.

This function parses BLE data encoded in Advertising Data Type format which can be generated with ble_advdata_encode function. The result of the parsing is stored within nfc_ble_oob_pairing_data_t structure.

Note
Currently, module can be used to parse BLE AD Type data, which contains AD Structures with following GAP AD Types: Flags, Shortened and Complete Device Name, Security Manager TK Value and OOB Flags, Appearance, LE Bluetooth Device Address and LE Role.
Warning
Before passing p_nfc_ble_pairing_data structure to this function, it is necessary to provide buffers for AD Structures Data, which are expected to be found within parsed buffer. This applies to following GAP AD Types with corresponding structures: Shortened and Complete Device Name - ble_gap_dev_name_t, LE Bluetooth Device Address - ble_gap_addr_t, Security Manager TK Value - ble_advdata_tk_value_t and Security Manager OOB Flags - uint8_t.
Parameters
[in]p_advdataPointer to the data to be parsed.
[in]lenSize of the data to be parsed.
[out]p_nfc_ble_pairing_dataPointer to the structure that will be used to hold parsed data.
Return values
NRF_SUCCESSIf the function completed successfully.
NRF_ERROR_NO_MEMIf the provided buffer for device name is too small to hold parsed data.
NRF_ERROR_INVALID_LENGTHIf any AD Structure Length field contains different value than expected.
NRF_ERROR_INVALID_PARAMIf any AD Structure Data field contains invalid parameters.
NRF_ERROR_NULLIf any function pointer parameter is NULL or any expected buffer in p_nfc_ble_pairing_data was not provided.
NRF_ERROR_NOT_SUPPORTEDIf any AD Structure Type field contains type which is not supported or any AD Structure Type occurs more than once.
void nfc_oob_data_printout ( nfc_ble_oob_pairing_data_t const *const  p_pairing_data)

Function for displaying values of basic BLE OOB Advertising data types.

Parameters
[in]p_pairing_dataStructure containing parsed data.

Documentation feedback | Developer Zone | Subscribe | Updated