NFC library and modules

nRF5 SDK v15.3.0

Near field communication (NFC) is a technology for wireless transfer of small amounts of data between two devices. It uses very simple communication protocols and therefore allows quicker connection than BLE. However, because NFC uses magnetic induction to enable communication, the devices must be very close (< 10 cm) to connect.

NFC supports different modes of operation. In reader/writer mode, one of the NFC devices (the polling device ) is active and requests and reads data from the other device (the tag ). The NFC tag is passive. It does not generate an electromagnetic field, but it modulates the field that is generated by the polling device. The tag contains data, such as a URL, that can be read and written by the polling device.

The nRF52 IC contains an NFC tag that works in NFC-A technology (see the nRF52832 Product Specification and the nRF52840 Product Specification ). The SDK provides libraries and modules to program two types of tag:

  1. The Type 2 Tag - based on the NFC Forum Type 2 Tag Operation Specification (see NFC Type 2 Tag for more information)
  2. The Type 4 Tag - based on the NFC Forum Type 4 Tag Operation Specification (see NFC Type 4 Tag for more information)

NFC communication uses NFC Data Exchange Format (NDEF) messages to exchange data. The SDK provides modules for Generating messages and records to make it easy to generate such messages.

If you want to implement your own polling device, you can use the parser libraries supplied in the SDK. Note that you need additional hardware for reading NFC tags. The Adafruit NFC Shield library provides functions to read and write NFC tag data.

Page-1 Concentric layer 3.34 Concentric layer 1.333 Concentric layer 3.334 Sheet.335 Electromagnetic field Electromagnetic field Electromagnetic field Process.245 Polling device Polling device Process.324 Type 2 Tag Type 2 Tag Flowline1 Generate field Generate field Flowline1.326 READ command READ command Flowline1.327 NDEF («Hello World!») NDEF («Hello World!») s.5 Hello world! Hello world! Sheet.337 Data Data
Simplified overview of how NFC can be used

NFC BLE pairing library

NFC Type 2 Tag

NFC Data Exchange Format

Adafruit NFC Shield library nRF52832 only

NFC Type 4 Tag