An Introduction to NFC

发布人是

NFC is becoming ubiquitous, but due to many terminologies and standards, taking the first steps can be overwhelming. This article aims to clarify and simplify those steps for newcomers.

NFC stands for Near Field Communication, which is a short distance, low data rate and low cost protocol. It is complementary to WIFI and Bluetooth and is a subset of 13.56MHz RFID. NFC is deployed to enable contactless transactions for data exchange and simplified setup of more complex communications such as Bluetooth and WIFI. For instance, version 4.0 and 4.1 of Bluetooth low energy has no secure way of exchanging the temporary key for encryption without the help of NFC. Hence, NFC is poised to play an important role in the connectivity for the “Internet of Things.” In addition, NFC is widespread in smart phone markets, as in 2015, 50% of smartphones were compatible with NFC. NFC is gaining presence in more and more applications, from POS terminals for tap & pay applications to consumer environments with tap & pair application to home appliances and healthcare for tap & exchange applications.

The difference between NFC and RFID can sometimes raise confusion, as the terms are sometimes used synonymously. However, NFC is actually an extension of RFID. NFC is designed to build on RFID by enabling more complex exchanges between devices. The root cause of the confusion is the fact that it’s still possible to read passive RFID tags with an NFC reader and to write to a limited amount of memory.
RFID was designed for identification. RFID tags can hold a small amount of data, and you can read and write to them from RFID readers, but the amount of data is limited to a few thousand bytes. An RFID is passive when it receives power from the reader, but it is active when it has its own power source.

An RFID exchange involves two factors: a target and an initiator. The initiator, a tag reader or reader/writer, starts the exchange by generating a radio field and listening for responses from any target in the field. The target, a tag, responds when it picks up a transmission from an initiator. It will respond with a unique identifier number (UID).

RFID has various standards defined by ISO (International Standards Organization). A standard defines radio frequency, data transfer rates, data formats, and (optionally) layers of the protocol. It can be rather specific – for instance the ISO-11784 standard was developed for animal tracking! The most common one is the ISO-14443 standard that was developed for use with payment systems and smart cards. Many NFC applications were developed based on this standard.

As said previously, NFC can be thought of as an extension of RFID and hence shares many properties (active or passive communication modes, how to initiate communication and hardware layer). But, instead of just delivering static data from memory, an NFC target can generate unique content for each exchange and deliver it back to the initiator. For example, if you’re using NFC to exchange address data between two phones, the NFC target device can be programmed to only provide limited information if it has never seen this particular initiator before.

In order to communicate between 2 NFC devices, three modes are defined in NFC:

-    Reader mode: Reader/Writer drives the communication with the tag. Tag can only answers to Reader/Writer requests.
-    Card Emulation: Device acts like a Tag or Card.
-    P2P mode: Exchange of data in both directions.

When a technology is ubiquitous, standardization is required in order for devices from many different vendors to communicate with each other. Three standardization bodies exist:

-    ISO: International Standard Organization: ISO 14443 and ISO 15693
-    NFC forum: http://nfc-forum.org
-    ITU : Region organization

参阅相关产品

EVAL-ST95HF

STMicroelectronics 射频/无线开发板和套件 查看

Various frequencies can be used: the Low Frequency (125-135 kHz), the Ultra High Frequency (418-458MHz or 860-960MHz), or the High Frequency (13.56MHz). The latest one is the main focus of most silicon companies, as it is low cost and standardized. ISO-14443 specifies short range (up to 10 cm), and ISO-15693 specifies long range (up to 100cm).
Among the ISO specifications, the physical interface in ISO14443 is defined as type A or type B. Both types work with a 13.56MHz but signal interfaces are different:

-    Type A:
o    Reader to Tag: 100% amplitude modulation with Miller encoding (also known as delay encoding)
o    Tag to Reader: OOK (On-Of-Keying) Manchester encoding
-    Type B:
o    Reader to Tag: 10% amplitude modulation of the RF field with NRZ (Non Return to Zero) encoded data
o    Tag To Reader: BPSK of an 847.5kHz subcarrier with NRZ-L encoded data

There is also a definition for a type F, but it is limited to the Japanese market and hence is not commonly encountered by developers.

In order to communicate, the reader generates an electromagnetic field that powers the tag. The reader modulates the carrier frequency to provide information to the tag. Then, the tag modulates the reader field to provide answer to the reader (backscattering concept).

From the software point of view, having a grasp of NFC is to understand NFC Data Exchange Format (NDEF). NDEF (NFC Data Exchange Format) defines a format to store data on NFC tags and transmit data.

An NDEF message can contain several records. Each record is split in two sections: the record header and the record payload. It is a good practice to use one NDEF message made up of several records, with each record having a specific data. For instance, for the example of a typical business card, it is better to have one record for the name, one record for the phone number, and one for the address.



Indeed, as some information inside the header explains how the payload must be interpreted, it is more efficient to split the message in records.
Looking at the header in details, next to common information like the payload length, 2 bytes are critical: the TNT + Flags byte and the Payload type byte.
TNF standards for Type Name Format; it is coded on 3 bits and hence has 8 possible values:

    0: Empty record that has no type or payload.
    1: Well-known: One of several pre-defined types or specifications by the NFC-forum.
    2: MIME media-type: an internet media type defined in RFC 2046.
    3: Absolute URI, as defined in RFC 3986.
    4: External: a user-defined value based on rules in the NFC forum record type definition.
    5: Unknown: type is unknown. Type length must be 0.
    6: Unchanged: Only for middle and terminating records of chunked payload. Type length must be 0. As NFC uses short messages most of the time, chunked payload is rarely used and hence, this TNF is also almost never used.
    7: Reserved by the NFC forum for future use.

The most frequent TNFs are TNF 1 (well known), TNF 2 (MIME media-type), and TNF 4 (external). For instance, Android uses an External type called on Android Application Record to trigger apps to open.



The payload type, also known as the Record type, describes the content of the payload more specifically.
For example, a record of TNF 1 (well-known) could have a record type of “T” for a text message, “U” for an URI message, or “SP” if the payload is a Smart Poster. A record of TNF 2 (MIME media-type) might be one of several different Record types, among them “text/html,” “text/json,” or “image/gif”.

It is the combination of TNF and Record type (or Payload) that gives precious information about the way the payload must be interpreted.

Finally, another important concept defined by the NFC Forum is the kind of type tag. This is done to guarantee interoperability between different NFC tag providers and NFC device manufacturers. Four type tags are specified:

-    Type 1
o    Based on ISO/IEC 14443A specs. Tags are read or re-write capable; users can configure the tag to become read-only. Memory availability is 96 bytes and expandable to 2 kbytes.
-    Type 2
o    Very similar to type 1, but was historically used for lower memory size than type 1. But new type 2 tags have been released with high capacity and extra features like fast reading, counters, or user configurable password-protection. Thanks to these extra features, this type is very common.
-    Type 3
o    Based on Sony FeliCa system. It has a 2kByte memory capacity and data communication speed is 212 kbit/s. It allows for more complex operations.
-    Type 4
o    Defined to be compatible with ISO14443A and B standard. They can be either read/ re-writable or read-only. The memory capacity can be up to 32 kbytes, and the communication speed is between 106kbits/s and 424 knits/s.

NFC has many more specifications, but this short overview will allow an engineer to map these specifications in the NFC and RFID world, and it provides a basis for determining which path to follow in the development of an application.

最新消息

Sorry, your filter selection returned no results.

请仔细阅读我们近期更改的隐私政策。当按下确认键时,您已了解并同意艾睿电子的隐私政策和用户协议。

本网站需使用cookies以改善用户您的体验并进一步改进我们的网站。此处阅读了解关于网站cookies的使用以及如何禁用cookies。网页cookies和追踪功能或許用于市场分析。当您按下同意按钮,您已经了解并同意在您的设备上接受cookies,并给予网站追踪权限。更多关于如何取消网站cookies及追踪的信息,请点击下方“阅读更多”。尽管同意启用cookies追踪与否取决用户意愿,取消网页cookies及追踪可能导致网站运作或显示异常,亦或导致相关推荐广告减少。

我们尊重您的隐私。请在此阅读我们的隐私政策。