NDEF Mechanisms
a terminating record chunk. Each record chunk is encoded as an NDEF record using the
following encoding rules:
• The initial record chunk is an NDEF record with the CF (Chunk Flag) flag set (see section
3.2.3). The type of the entire chunked payload MUST be indicated in the TYPE field
regardless of whether the PAYLOAD_LENGTH field value is zero or not. The ID field MAY
be used to carry an identifier of the entire chunked payload. The PAYLOAD_LENGTH field
of this initial record indicates the size of the data carried in the PAYLOAD field of the initial
record only, not the entire payload size (see section
2.4.1).
• Each middle record chunk is an NDEF record with the CF flag set indicating that this record
chunk contains the next chunk of data of the same type and with the same identifier as the
initial record chunk. The value of the TYPE_LENGTH and the IL fields MUST be zero and
the TNF (Type Name Format) field value MUST be 0x06 (Unchanged) (see section
3.2.6).
The PAYLOAD_LENGTH field indicates the size of the data carried in the PAYLOAD field
of this single middle record only (see section
2.4.1).
• The terminating record chunk is an NDEF record with the CF flag cleared, indicating that
this record chunk contains the last chunk of data of the same type and with the same identifier
as the initial record chunk. As with the middle record chunks, the value of the
TYPE_LENGTH and the IL fields MUST be zero and the TNF (Type Name Format) field
value MUST be 0x06 (Unchanged) (see section
3.2.6). The PAYLOAD_LENGTH field
indicates the size of the data carried in the PAYLOAD field of this terminating record chunk
(see section
2.4.1).
A chunked payload MUST be entirely encapsulated within a single NDEF message. That is, a
chunked payload MUST NOT span multiple NDEF messages. As a consequence, neither an
initial nor a middle record chunk can have the ME (Message End) flag set.
2.4 NDEF Payload Description
Each record contains information about the payload carried within it. This section introduces the
mechanisms by which these payloads are described.
2.4.1 Payload Length
Regardless of the relationship of a record to other records, the payload length always indicates the
length of the payload encapsulated in this record. The length of the payload is indicated in the
PAYLOAD_LENGTH field. The PAYLOAD_LENGTH field is one octet for short records and
four octets for normal records. Short records are indicated by setting the SR bit flag to a value of 1
(see section
3.2.4). Zero is a valid payload length.
2.4.2 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 type of the first record, by convention, SHOULD provide the processing context not only for
the first record but for the whole NDEF message. Additional context for processing the message
MAY be provided, for example, by the link layer service access point (LSAP) or transport service
port (e.g. TCP, UDP, etc) at which the message was received and by other communication
parameters.
It is important to emphasize that NDEF mandates no specific processing model for NDEF
messages. The usage of the payload types is entirely at the discretion of the user application. The
NFC Data Exchange Format (NDEF) Page 9