Bluetooth LE OOB records¶
BLE pairing messages contain information that tell a polling device how to pair with the device that contains the NFC tag through Bluetooth Low Energy. A BLE pairing message that works with Android devices contains one Bluetooth LE OOB record. This record contains the BLE advertising data structure that is used to establish the connection.
The following BLE pairing methods can be used in combination with this module:
- Legacy and LE Secure Connections Just Works pairing
The NDEF record contains basic advertising data such as device name, address, and role. In this case, pairing over NFC does not provide MITM protection - the only advantage is automation of pairing through NFC touch.
- LE Secure Connections pairing with OOB data
The NDEF record contains two additional data types: Confirmation Value and Random Value that are used for OOB authentication. In this case, pairing MITM protection is considered as strong as the MITM protection of NFC.
The Bluetooth LE OOB record is used in the Bluetooth: Peripheral HIDS keyboard sample.
Generation of NFC NDEF LE OOB records for NDEF messages.
NFC_NDEF_LE_OOB_RECORD_DESC_DEF(name, payload_id, payload_desc)¶
Generate a description of an NFC NDEF Bluetooth Carrier Configuration LE Record.
This macro declares and initializes an instance of an NFC NDEF record description for a Bluetooth Carrier Configuration LE record.
The record descriptor is declared as automatic variable, which implies that the NDEF message encoding must be done in the same variable scope.
name: Name for accessing the record descriptor.
payload_id: NDEF record header Payload ID field (limited to one byte). If 0, no ID is present in the record description.
payload_desc: Pointer to the description of the payload. This data is used to create the record payload.
Macro for accessing the NFC NDEF Bluetooth Carrier Configuration LE record descriptor instance that was created with NFC_NDEF_LE_OOB_RECORD_DESC_DEF.
LE role options.
Only Peripheral role supported.
Only Central role supported.
Peripheral and Central roles supported. Peripheral role preferred for connection establishment.
Peripheral and Central roles supported. Central role preferred for connection establishment.
Total number of options.
nfc_ndef_le_oob_rec_payload_constructor(const struct nfc_ndef_le_oob_rec_payload_desc *payload_desc, u8_t *buff, u32_t *len)¶
Construct the payload for a Bluetooth Carrier Configuration LE Record.
This function encodes the record payload according to the payload descriptor. It implements an API compatible with
payload_desc: Pointer to the description of the payload.
buff: Pointer to payload destination. If NULL, function will calculate the expected size of the record payload.
len: Size of available memory to write as input. Size of generated payload as output.
- Return Value
0: If the payload was encoded successfully.
-EINVAL: If parameters in the payload descriptor are invalid or missing.
-ENOMEM: If the predicted payload size is bigger than the provided buffer space.
External reference to the type field of the Bluetooth LE Carrier Configuration NDEF Record, defined in the file
- #include <le_oob_rec.h>
LE OOB record payload descriptor.