SL-CNWLC01103V1

Active

ST25DV-I2C BLE out-of-band pairing solution

Solution
Solution Evaluation Kit
Core Products
Documentation
Tools & Software

Solution Description

This solution demonstrates a simple way to ensure secure connections and easy pairing of Bluetooth® Low Energy (BLE) devices using Near Field Communication (NFC).

When pairing two Bluetooth devices, one of the most vulnerable phases is when the two devices exchange cryptographic keys and agree on which encryption key to use. As this information is exchanged over the air, it is vulnerable to man-in-the-middle (MITM) attacks.

One way to ensure a secure key exchange is to use NFC technology. NFC provides a side communication channel with the advantage of being a very short distance (a few centimeters) so malicious people cannot intercept this communication. The information exchanged through NFC is used to authenticate the cryptographic keys exchanged by the two Bluetooth devices. Hence, the data transfer is safe. The data exchanged through a side communication channel during BT pairing is known as out-of-band data.

Another benefit of using NFC technology for pairing devices is that instead of selecting a Bluetooth device from a list, the user can tap the NFC tag. The Bluetooth connection is automatically set up, avoiding the risk of selecting an incorrect device from the list.

How it works

When pairing your device with a smartphone via Bluetooth® Low Energy (BLE), it is possible to add an NFC tag in your device to implement “out-of-band” pairing (OOB) to ensure a secure connection. Moreover, using this method means that instead of selecting a Bluetooth device from a list, the Bluetooth connection is automatically established between the two devices.

In this case, when someone taps the NFC tag on your device with their smartphone, the device will send an NDEF message to establish communication that will be processed natively by the smartphone. The smartphone screen will display a message asking the user to confirm their wish to establish a Bluetooth connection with your device. If the user clicks Yes, the OOB data is used to setup a secure Bluetooth LE connection.

 

NDEF message content of the NFC Tag  
during “ordinary” BLE pairing

NDEF message content of the NFC Tag  
during “out-of-band” BLE pairing

Record Type name: “application/vnd.bluetooth.le.oob” 

BT Device name: ST25OOB (example) 

BT Device address: 80:e1:26:00:6A:a8 (example) 

Record Type name: “application/vnd.bluetooth.le.oob” 

BT Device name: ST25OOB (example) 

BT Device address: 80:e1:26:00:6A:a8 (example) 

BLE Secure connection: Random value (16 bytes) 

BLE Secure connection: Confirmation value (16 bytes) 

 

For our solution, we recommend using an ST25DV04K dynamic NFC Forum Type 5 tag. As the communication range between the smartphone and a tag is in the range of a few centimeters, NFC Forum Type 5 tags (ISO/IEC 15693 vicinity standard) provide the best range as they have been defined to operate at the best possible distance. For the best user experience, the use of Type 5 tags is strongly recommended.

The ST25DV04K works very well with our ultra-low-power, multi-protocol, wireless STM32WB55 microcontrollers which support Bluetooth® LE communication in addition to Zigbee® and Thread® connectivity. A simple I2C connection between the NFC tag and the MCU is all that is needed for out-of-band pairing. Moreover, the STM32WB55 MCU’s extremely low power consumption will help ensure a longer lifetime for your device on a single charge.

 

  • Key Product Benefits

    ST25DV04K: 4-Kbit Dynamic NFC/RFID tag NFC Forum type 5 with I2C interface, fast transfer mode and energy harvesting

    Features a fast transfer mode between the RF and contact worlds, thanks to a "Mailbox" function. In addition, it can provide data informing the contact world about incoming events, like RF field detection, RF activity in progress or mailbox message availability. An energy harvesting feature is also proposed when external conditions make it possible.

    STM32WB55XX: Dual-core, multi-protocol wireless STM32WB55xx microcontrollers, supporting Bluetooth® LE, Zigbee® and Thread® connectivity

    These multiprotocol, ultra-low-power, wireless MCUs also implement a full set of DSP instructions and a memory protection unit (MPU) that enhances application security. Features a customer-key storage function able to effectively hide encryption keys.