NDEF, NFC Data Exchange Format

- notes and essential details about NFC NDEF, the near field communications data exchange format..

The NFC Data Exchange Format or NDEF specification is used to define a message encapsulation format for the exchange of data information over an NFC link - between and two NFC devices or an NFC device and a tag.

NFC NDEF has been designed to be a lightweight format, not adding a significant overhear to the messages.

The NFC data exchange format is a binary message format that can be used to encapsulate one or more application-defined payloads which may be of a variety of types and sizes. These are combined into a single message construct. Each payload is described by a type, a length, and an optional identifier.

NFC NDEF basics

With many different high level applications needing to transfer data over the NFC radio interface, the concept of the NFC NDEF is to be able to send data of any format over the interface while still being able to retain the air interface data format.

An NDEF message is composed of one or more NDEF records. There can be multiple records in a NDEF message.

The limit for the number of records that can be encapsulated into an NFC NDEF message depends upon the application in use and the tag type used.

In order that the system knows where the messages begin and end, the first record in a message is marked with the MB or Message Begin flag set and the last record in the message is marked with the ME or Message End flag set. The minimum message length is one record. This is achieved by setting both the MB and the ME flag in the same record.

To ensure that the data capability is used efficiently, NFC NDEF records do not incorporate an index number - the index number within the message is implicitly assigned by the order in which the records occur.

NFC NDEF message structure
NFC NDEF data exchange format message structure

It can be seen that the NDEF is exchanged in messages that comprise of a sequence of records.

Each record consists of two parts:

  • Header:   The header for the NDEF exchange includes indicator for a number of elements:

    • Payload length:   The payload length is always included in the NDEF header by a specific field. The payload length field is one octet for short records but for normal records it is four octets long. Short records are indicated by setting a flag bit known as the SR or short record flag to a value of 1. Zero is a valid payload length.
    • Payload type:   The payload type of a record indicates the kind of data being carried in the payload of that record. This may be used to guide the processing of the payload at the discretion of the user application. The format of the Payload Type field value is indicated using the TNF, Type Name Format field.
    • Payload identification:   An optional payload identifier allows the applications to identify the payload carried within an NDEF record.
  • Payload:   The payload can be of one of a variety of different types: URL, MIME media, or NFC-specific data type. For NFC-specific data types the payload contents must be defined in an NFC Record Type Definition file, RTD.

By Ian Poole

<< Previous   |   Next >>

Share this page

Want more like this? Register for our newsletter

Clarifying Machine Vision with High Quality Sensors Mark Patrick | Mouser Electronics
Clarifying Machine Vision with High Quality Sensors
Automated imaging technology is everywhere we look. As cameras and their processing units get ever smaller, they are moving into ever more industries - from speed cameras and factory production lines to diagnostic medicine. For many of these applications, image quality is critical - but what does image quality really mean? Different applications will require quite distinct performance characteristics. Understanding camera specifications, differences between CCD and CMOS sensors, and features such as real-time processing or near-infrared (NIR) can help guide the camera selection process to produce better imaging results.

Radio-Electronics.com is operated and owned by Adrio Communications Ltd and edited by Ian Poole. All information is © Adrio Communications Ltd and may not be copied except for individual personal use. This includes copying material in whatever form into website pages. While every effort is made to ensure the accuracy of the information on Radio-Electronics.com, no liability is accepted for any consequences of using it. This site uses cookies. By using this site, these terms including the use of cookies are accepted. More explanation can be found in our Privacy Policy