Bluetooth LE OOB records
A Bluetooth® LE device that has an NFC interface (a tag or a polling device) can use NFC to send or receive data required for connecting and pairing in the Bluetooth domain. This data should be presented in the form of a Bluetooth LE pairing message.
A Bluetooth LE pairing message that works with Android devices contains one Bluetooth LE OOB record. This record contains the Bluetooth LE advertising data structure with information that is used to establish the connection and pair.
The following Bluetooth LE 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 that are used for OOB authentication: Confirmation Value and Random Value. 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.
- group nfc_ndef_le_oob_rec
Generation of NFC NDEF LE OOB records for NDEF messages.
Temporary Key length.
Macro for including Appearance BLE AD Type to the nfc_ndef_le_oob_rec_payload_desc descriptor.
Macro for including Flags BLE AD Type to the nfc_ndef_le_oob_rec_payload_desc descriptor.
Macro for including LE Role BLE AD Type to the nfc_ndef_le_oob_rec_payload_desc descriptor.
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.
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.
- enumerator NFC_NDEF_LE_OOB_REC_LE_ROLE_PERIPH_ONLY
int nfc_ndef_le_oob_rec_payload_constructor(const struct nfc_ndef_le_oob_rec_payload_desc *payload_desc, uint8_t *buff, uint32_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 values:
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.
- #include <le_oob_rec.h>
LE OOB record payload descriptor.