NDEF

NDEF Message

A complete NDEF data unit consisting of one or more NDEF records. An NFC tag typically contains a single NDEF message. The message structure includes a header, type, payload length, and payload for each record.

รู้จักในชื่อ: NDEF message message

What Is an NDEF Message?

An NDEF message is the fundamental data transport unit in the NDEF standard. It holds one or more NDEF records, each carrying distinct data such as a URL, text string, or application payload. When a smartphone taps a tag, it reads the NDEF message and dispatches each record to the appropriate OS handler.

Message Structure

The first and last records are marked by special flags:

Flag Position Description
MB (Message Begin) First record Start of NDEF message
ME (Message End) Last record End of NDEF message

Single vs Multi-Record Messages

Single-record: A tag with one URL has one message with one URI record. Every NFC phone handles this by opening the URL.

Multi-record: Common combinations include URI + AAR (ensures specific app opens), Smart Poster (URI + title + action), and multiple text records for multilingual content.

Storage in Tag Memory

Messages are stored using TLV encoding:

[Type: 0x03] [Length: N] [NDEF Message: N bytes] [Terminator: 0xFE]

For messages exceeding 254 bytes, a three-byte length format is used (0xFF followed by two big-endian bytes).

Reading and Writing

Reading: The NFC subsystem reads the capability container, scans for the NDEF message TLV (type 0x03), parses records, and dispatches based on TNF and type fields.

Writing: The application constructs the message, serializes it, wraps in TLV, and writes to user memory after the capability container.

Message Size Limits

Chip User Memory Max NDEF Payload
NTAG 213 144 B ~137 B
NTAG 215 504 B ~497 B
NTAG 216 888 B ~881 B
DESFire EV3 Up to 8 KB ~7.5 KB

Platform Handling

Android: URI records trigger ACTION_VIEW intents; AAR records launch specific apps.

iOS: Background tag reading (iPhone XS+) automatically handles URI records. Apps using Core NFC can read all record types programmatically.

Related Terms

Related Guides

คำถามที่พบบ่อย

The NFC glossary is a comprehensive reference of technical terms, acronyms, and concepts used in Near Field Communication technology. It is designed for developers, product managers, and engineers who work with NFC and need clear definitions of terms like NDEF, APDU, anti-collision, and ISO 14443.

Each glossary term is cross-referenced with related NFC chips, standards, and other terms. For example, the term 'AES-128' links to chips that support AES encryption (NTAG 424 DNA, DESFire EV2/EV3), and the term 'ISO 14443' links to all chips compliant with that standard.

Yes. NFCFYI provides glossary definitions in 15 languages including English, Korean, Japanese, Chinese, Spanish, Portuguese, Hindi, Arabic, French, Russian, German, Turkish, Vietnamese, Indonesian, and Thai. Use the language selector in the header to switch languages.