NFC Tutorial: Protocol Stack, Working, Frame and Modes
Advertisement
Near Field Communication (NFC) is a short-range wireless communication technology that has revolutionized how devices interact in various industries, from payments to data sharing.
This NFC tutorial guide covers the protocol stack, working principles, frame structure, and different communication modes.
What is NFC (Near Field Communication)?
NFC stands for Near Field Communication. It’s a short-range, low data rate wireless communication technology operating at 13.56 MHz frequency. It’s a contactless mode of communication using electromagnetic waves.
This technology allows two devices housing an NFC chip to communicate for various applications, for example:
- Data communication between smartphones
- Verification of an authenticated person having an NFC ID card at the office by an NFC reader in the door.
- Banking payments using NFC compliant credit cards to enhance security
- Ticket booking at airports
- Automatic running of scheduled features in an NFC phone.
The following table summarizes features of wireless NFC (Near Field Communication) technology.
Features | NFC (Near Field Communication) |
---|---|
Support RF Carrier Frequency | 13.56 MHz |
Distance | less than 10 cm |
Data Rate | 106 or 212 or 424 Kbps |
NFC Network Devices | Tags and Readers, NFC Tag vs Reader |
NFC Tag Types | Type 1 to 5, More on NFC tag types |
Network configuration | peer to peer |
NFC Network Device Modes | Card Emulation, Reader/Writer, Point to Point (active & passive) |
Two NFC device communication modes | active-passive or active-active |
Connection establishment time | Few seconds (approx. less than 0.1 sec) |
Data Coding Schemes | NRZ-L, Manchester, Modified Miller, |
Data Modulation Schemes | ASK, BPSK |
Collision mechanism (i.e. MAC) | Anti-collision support |
NFC Standards | ISO 14443A/B, ISO 18092, JIS X6319-4 |
Table 1: NFC network features or NFC capability
There are three types of NFC forum specifications viz. NFC-A, NFC-B and NFC-F.
How NFC Works
Fig:1 NFC Network
As mentioned, an NFC network consists of two devices known as the initiator device and the target device.
An NFC tag can be an active or passive device. An NFC reader is always an active device. These devices operate in either active-active or active-passive modes.
In active-active mode, both NFC devices have their own power. In active-passive mode, the passive device derives its power from the received EM waves of the active device.
The basic mode of communication in NFC is half-duplex, where one NFC device transmits while the other receives. This is also referred to as “Listen before Talk.”
One of the two NFC devices will function as an initiator, which first listens on the channel and transmits only when no other signal is present. The Initiator polls other devices that come closer, and the other NFC device, referred to as the target, listens and responds to the initiator as per the requested message.
NFC Network Modes: Card Emulation, Reader/Writer, Point to Point (Peer)
There are three modes in which NFC tags and readers work: Card Emulation, Reader/Writer, and Peer to Peer (or Point to Point), as explained below.
NFC Card Emulation Mode
In this mode, usually an active device reads a passive device.
EXAMPLE #1: ID cards, NFC tags, or NFC-compliant tickets are read by NFC-compliant active readers at offices or railway stations.
EXAMPLE #2: A smartphone acts as a smart card to allow booking tickets or performing online banking transactions or payments using a credit card reader.
Following are the steps involved in card emulation mode:
- Step 1: The NFC reader oscillates at a 13.56 MHz RF field. When the card comes near the RF field, it gets power due to EM (Electro-Magnetic) coupling and connects with the reader.
- Step 2: The reader sends commands using the RF field.
- Step 3: The card responds to the reader as requested.
NFC Reader/Writer Mode
In this mode, one device will be in reading mode, and the other will be in writing mode. They can be either active or passive devices.
- Example #1: Product Authentication
- Example #2: Smart advertising
- Example #3: Device pairing
Following are the steps involved in reader/writer mode:
- Step 1: In read mode, the NFC reader reads NFC tags, either passive or active.
- Step 2: In write mode, one NFC device writes to the other NFC device.
NFC Peer to Peer (Point to Point)
In this mode, data is transmitted from one NFC device to another in ad-hoc or peer-to-peer mode. Any device can become the initiator, and the rest will act as targets to complete the connection establishment.
- Example #1: Smartphone to smartphone communication
- Example #2: Automotive (in-car operation)
- Example #3: Social media applications or games
Following are the steps involved in peer-to-peer mode (active mode):
- Step 1: Both NFC smartphones establish pairing for data communication. Both have power and their own RF fields.
- Step 2: The initiator sends commands by modulating the RF field and switches off the RF field.
- Step 3: The target device responds to the initiator using its own RF field modulation.
NFC Protocol Stack
Fig:2
The figure depicts the protocol stack of NFC in peer-to-peer mode. As shown, it consists of the application layer, data link layers (logical link control and media access control), and the physical layer.
- Application Layer: This layer takes care of the format of the data to be exchanged between NFC devices or between the NFC device and tags. NFC uses NDEF (NFC Data Exchange Format).
- Data Link Layer: This layer takes care of different modes of operation and anti-collision mechanisms. LLCP establishes communication between two peer devices.
- Physical Layer: This layer takes care of modulation, coding, and RF-related parameters such as frequency and power.
NFC Frame Structure
Fig:3
The NFC frame uses a special encapsulation format referred to as NDEF (NFC Data Exchange Format). Each NFC device transmission is known as a message. One message is composed of one or more records. Each record consists of a header part and a payload part. The header part is made of identifier, length, and type fields. The payload carries data or a URL.
Conclusion
NFC technology simplifies wireless communication by utilizing a well-structured NFC protocol stack and various operational modes. Its intuitive working principles and frame structure make it ideal for a range of applications, from simple data transfers to complex secure transactions. This NFC tutorial is very useful for beginners who would like to understand how NFC enables secure and efficient data exchange in close proximity.