Functions for parsing and decoding data in the Advertising and Scan Response Data format for NFC OOB pairing.
More...
Functions for parsing and decoding data in the Advertising and Scan Response Data format for NFC OOB pairing.
#define BLE_ADVDATA_APPEARANCE_NOT_PRESENT 0 |
Appearance AD structure not present.
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_advdata | Pointer to the data to be parsed. |
[in] | len | Size of the data to be parsed. |
[out] | p_nfc_ble_pairing_data | Pointer to the structure that will be used to hold parsed data. |
- Return values
-
NRF_SUCCESS | If the function completed successfully. |
NRF_ERROR_NO_MEM | If the provided buffer for device name is too small to hold parsed data. |
NRF_ERROR_INVALID_LENGTH | If any AD Structure Length field contains different value than expected. |
NRF_ERROR_INVALID_PARAM | If any AD Structure Data field contains invalid parameters. |
NRF_ERROR_NULL | If any function pointer parameter is NULL or any expected buffer in p_nfc_ble_pairing_data was not provided. |
NRF_ERROR_NOT_SUPPORTED | If any AD Structure Type field contains type which is not supported or any AD Structure Type occurs more than once. |
Function for displaying values of basic BLE OOB Advertising data types.
- Parameters
-
[in] | p_pairing_data | Structure containing parsed data. |