NDEF Data Template

Description

Use the NDEF Data Template to read the content of either a card formatted according to the NFC Forum Tag specification, or to receive a message through NFC beam (SNEP over LLCP).

Lookup List

This Template supports 10 protocol selectors:

LKL Value Selected protocol(s)
4E All NFC Forum Tags
4F All NFC Forum Tags and SNEP peers (P2P mode)
41 NFC Forum type 1 Tags (T1T)
42 NFC Forum type 2 Tags (T2T / NFC-A)
43 NFC Forum type 3 Tags (T3T / NFC-F)
44 NFC Forum type 4 Tags (T4T on NFC-A and NFC-B)
45 NFC Forum type 5 Tags (T5T / NFC-V)
4A NFC Forum type 4A Tags (T4T on NFC-A only)
4B NFC Forum type 4B Tags (T4T on NFC-B only)
40 SNEP peers (P2P mode)

Registers

This Template uses 7 configuration registers:

Alias Offset Name Description
LKL 0 Lookup List See the Lookup List table above
TNF 5 Type Name and Format Specify the TNF of the NDEF messages to accept. Messages with another TNF will be discarded.
TYPE 6 Type Filter Specify the actual Type of the NDEF Record you want to read.
TOF 1 Output Size and Format See details below
LOC 3 Location of Data See details below
OPT 4 Options Template-specific Options
PFX 2 Prefix Template-specific Prefix

TNF - Type Name and Format

Offset : 5

Size : 1

Value TNF Filter Alias
01 NFC Forum Well-known record (NFC RTD) well_known
02 NFC Forum Media record (RFC 2046) media
03 Absolute URI record (RFC 3986) absolute_uri
04 NFC Forum External record (NFC RTD) external
53 Read a SpringCard data entry springcard
54 Read a Text (either a Well-known record with type T or a text/plain Media record) text
55 Read an URI (either a Well-known record with type U or an Absolute URI record) uri
FF Read either a SpringCard data entry, a Text or an URI anything

TYPE - Type Filter

Offset : 6

Size : 32

Specify the actual Type of the NDEF Record you want to read.

Please refer to the specifications of NFC Forum NDEF Data and Records, and to the specifications of the MIME Media, to provide a valid TNF+Type combination.

Remark : This field is relevant only if TNF is either 01, 02, 03 or 04; otherwise, its content is ignored.

TOF - Output Size and Format

Offset : 1

Size : 2

Byte 0 : RAW Mode

Condition : When RAW Mode is selected (Bit 6 in Byte 0 is 0)

Bit    Role Values
7 Invert Data? 0 : Transmit the sequence of bytes as is
1 : Transmit the sequence of bytes in reverse order
6 Mode 0 : RAW Mode (Data is a numerical value)
1 : String Mode (Data is an ASCII string)
5 Padding if Data is shorted than specified length 0 : Padd with 0 on the left
1 : Padd with F on the right
4 Remove leading zeroes? 0 : Keep all digits
1 : Suppress 0 digits on the left of the Data
3-0 Length and Format 0 : Decimal, 10 digits (truncation on 4-B)
1 : Raw (hex), 4 bytes (32 bits)
2 : Raw (hex), 8 bytes (64 bits)
3 : Raw (hex), 5 bytes (40 bits)
4 : Raw (hex), 10 bytes (80 bits)
5 : Raw (hex), 7 bytes (56 bits)
6 : Raw (hex), 11 bytes (88 bits)
7 : RFU
8 : Raw (hex), 16 bytes (128 bits)
9 : Raw (hex), 20 bytes (160 bits)
10 : Raw (hex), 24 bytes (196 bits)
11 : Raw (hex), 32 bytes (256 bits)
12 : Decimal, 12 digits (truncation on 5-B)
13 : Decimal, 13 digits (truncation on 5-B)
14 : Decimal, variable length
15 : Raw (hex), variable length

Byte 0 : String Mode

Condition : When String Mode is selected (Bit 6 in Byte 0 is 1)

Bit    Role Values
7 Invert Data? 0 : Transmit the sequence of characters as is
1 : Transmit the sequence of characters in reverse order
6 Mode 0 : RAW Mode (Data is a numerical value)
1 : String Mode (Data is an ASCII string)
5 Padding if Data is shorted than specified length 0 : Variable length (no padding)
1 : Padd with (space characters) on the right until the specified length
4 Short string or Long string? 0 : Short string (truncate to 16 characters or less)
1 : Long string (more than 16 characters)
3-0 Length 0 : 16 characters
1 : 1 character
2 : 2 characters
3 : 3 characters
4 : 4 characters
5 : 5 characters
6 : 6 characters
7 : 7 characters
8 : 8 characters
9 : 9 characters
10 : 10 characters
11 : 11 characters
12 : 12 characters
13 : 13 characters
14 : 14 characters
15 : 15 characters

Byte 1 : Options for Long String

Condition : When Long String Mode is selected (Bit 6 in Byte 0 is 1 and Bit 4 is 1)

Use this byte to specify the exact length to read from the card. Valid range is 1 to 255.

LOC - Location of Data

Offset : 3

Size : 2

Byte 0 : Shift Bytes

Leading bytes to suppress.

Byte 1 : Shift Bits

Leading bits to suppress; valid range is 0 to 7.

OPT - Options

Offset : 4

Size : 1

If this register is set, the Reader adds a token to its output to tell the receiver what kind of credential has been read.

Bit    Role Values
7-4 RFU
3-2 Position of the Card Type Token 0 : Before the Prefix
1 : After the Prefix, before the Data
2 : After the Data (before the Suffix)
3 : RFU
1-0 Add a Card Type Token to the output stream? 0 : Do not add a Card Type Token
1 : Add Card Type Token in hex (4F)
2 : Add Card Type Token as char (N)
3 : RFU

PFX - Prefix

Offset : 2

Size : 8

A Template-specific Prefix, that is added after the Reader’s global Prefix.

Remark : Use \t for a Tab, \n for Enter, \b for Back space, \v for Vertical space.