This page contains instructions to generate tags for testing reader
compliance with NFC Forum Tag Type, NDEF and RTD specifications. The
tools used are in the examples
directory.
This is a collection of tags to test processing of the the Type 3 Tag attribute information block. These can be used to verify if the NFC device correctly reads or writes tags with different attribute information, both valid and invalid. Below figure (from the NFC Forum Type 3 Tag Operation Specification) shows the Attribute Information Format.
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t "nfcpy documentation hosted on readthedocs" | ./tagtool.py load - $ ./tagtool.py format tt3 --len 80 --max 5 --rw 0
- Settings: Len = Nmaxb * 16, RWFlag = 0x00
- Expected: Fully used tag. Read all data stored (Len)
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t "nfcpy documentation" | ./tagtool.py load - $ ./tagtool.py format tt3 --len 58 --rw 0 --nbr 1
- Settings: Nbr = 1, RWFlag = 0x00
- Expected: Identify as „Read Only“ (normal read-only tag, read only 1 block at a time)
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t "nfcpy documentation" | ./tagtool.py load - $ ./tagtool.py format tt3 --len 58 --rw 0 --max 3
- Nbr > Nbmax, RWFlag = 0x00
- Read Nbmax blocks (NOT read Nbr blocks)
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t "nfcpy documentation" | ./tagtool.py load - $ ./tagtool.py format tt3 --len 58 --rw 0 --wf 15
- WriteFlag = 0x0F, RWFlag = 0x00
- Identify as „corrupted data“ (previous write interrupted)
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t "nfcpy documentation" | ./tagtool.py load - $ ./tagtool.py format tt3 --len 58 --rw 0 --max 3
- Nmaxb * 16 < Len, RWFlag = 0x00
- Identify as „Corrupted data“ (invalid length)
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t `python -c 'print(810*"nfcpy")'` | ./tagtool.py load - $ ./tagtool.py format tt3 --len 4495 --rw 0
- Nmaxb > 255, Len > 255, RWFlag = 0x00
- Read all data. Identify as „Read Only“. Write prohibited. (normal read-only tag)
- Requires a tag with more than 4 kbyte NDEF capacity
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t "nfcpy documentation" | ./tagtool.py load - $ ./tagtool.py format tt3 --len 58 --rw 0 --nbr 0 --nbw 0
- Nbr = 0, Nbw = 0, RWFlag = 0x00
- Identify as „Corrupted data“ (invalid attribute information block)
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t "nfcpy documentation" | ./tagtool.py load - $ ./tagtool.py format tt3 --len 58 --rw 0 --crc 4660
- Checksum invalid, RWFlag = 0x00
- Identify as „Corrupted data“ (invalid attribute information block)
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t "nfcpy documentation" | ./tagtool.py load - $ ./tagtool.py format tt3 --len 58 --rw 0 --ver 2.0
- Version = 2.0, RWFlag = 0x00
- Identify as unknown version
$ ./tagtool.py format $ ./ndeftool.py make smartposter http://nfcpy.readthedocs.org/ -t "nfcpy documentation" | ./tagtool.py load - $ ./tagtool.py format tt3 --len 58 --rw 0 --rfu 255
- All unused bytes in attribute block = 0xFF
- Ignore when reading RWFlag = 0x00
$ ./tagtool.py format tt3 --rw 0
- RWFlag = 0x00, no content
- Identify as „Read Only“. Write prohibited. (normal read-only tag)
$ ./tagtool.py format tt3 --rw 1
- RWFlag = 0x01, no content
- Identify as „Read/Write“. Write permitted. (normal writtable tag)
$ ./tagtool.py format tt3 --rw 0 --max 4
- Nbw > Nbmax, RWFlag = 0x01
- Write Nbmax blocks (not write Nbw blocks)