NFC card or tag settings
A list of all valid configuration settings which relate to extracting UID or block data from any type of card or tag, for the config.txt file. Be aware you may also need to use some type specific settings for MIFARE Classic, MIFARE DESFire cards and NDEF records which are grouped separately.
The setting NFCType2, NFCType4 or NFCType5 is used to direct the VTAP reader to recognise and read particular types of data from the different NFC cards that may be presented. The settings prefixed NDEFTag... restrict the types of data that will be read.
TagReadOffset and TagReadLength are often used together, to define where to start extracting data from a data block and how much data to read.
If you choose TagReadFormat=d to require a decimal output of block data you can use TagReadRightShift to drop parity bits or TagReadMinDigits to add leading zeroes, when a fixed width output is required.
TagByteOrder can be used to reverse the byte order of data or UIDs, if that suits your application. Or you can use TagByteOrderTypes if you only want to reverse data for certain card type(s).
If NFCType2=B you can read up to 4 consecutive blocks of data from any NFC Type 2 cards/tags, for example MIFARE Ultralight and Ultralight C cards. It will also allow you to read block data from MIFARE Ultralight AES cards, authenticated using an AES key which is specified using TagReadKeySlot. Setting TagReadKeyType=C will enable CMAC verification, which may also be required (depending on your card configuration) for extra data security/integrity when using MIFARE Ultralight AES with authentication.
If NFCType5=B you can read block of data from NFC Type 5 cards/tags, for example ICODE cards. You will need to specify TagReadBlockNum, TagReadLength, TagReadOffset, TagReadFormat to define which blocks should be read.
Settings below: NFCType | NFCReportReadError | IgnoreRandomUID | TagByteOrder | TagByteOrderTypes | TagReadBlockNum | TagReadKey | TagReadKeySlot | TagReadKeyType | TagReadMinDigits | TagReadOffset | TagReadLength | TagReadFormat | TagReadRightShift
Definition:
Permits the cards or tags of an NFC Type # to be read, and defines which part of the card/tag data will be read.
Options:
For NFC Types:
=U or =1 to permit UID to be read (4 or 7 bytes usually in the first block).
=N or =2 to read NDEF records (NFCType 2 or 4).
=B or =3 to read or decode up to 16 bytes of memory block(s) (or 255 bytes with NFC Type 5) for example with MIFARE Ultralight, MIFARE Ultralight C or MIFARE Ultralight AES cards. (NFCType 2 or 5 only).
=D (NFC Type 4 only) to read DESFire secure data with DESFire card or tag settings.
=0 is disabled (default).
An order of precedence allows multiple selections from Pass, DESFire secure, Block data, NDEF, UID.
=NU or =UN would read UID if an NDEF record cannot be read.
Default value: =0
Example value: =U
Definition:
Option to return an error payload when a pass or NFC Type 4 card read fails, making it possible to trigger alternative actions when an inappropriate card is presented to the VTAP reader.
Options:
=1 a failed pass or NFC Type 4 card read will return an error payload.
=0 (default) will not return any payload if an inappropriate card or pass is presented to the VTAP reader.
The returned error payload will begin ERROR:A, ERROR:G or ERROR:4 depending on whether an Apple (A), Google/Android (G) or NFC Type 4 (4) card/tag was detected in the VTAP NFC field. The error payload ends with a new line.
Note: When a VAS pass or payment card which requires user authentication is presented, on an iPhone in the VTAP NFC field, ERROR:A will not be triggered. In this case the iPhone returns a "not activated" error for the phone user, so that they can authenticate, then immediately present their pass or payment card again.
Default value: =0
Example value: =1
Definition:
Filter out random tag reads. Some devices presented to the VTAP can appear as a Type 4 tag with random UID. May be needed if a VTAP is configured to read both passes and UID from NFC Type 4 tags.
Options:
=1 to filter out random NFC Type 4 tag reads. Only useful if you have set NFCType4=U.
Default value: =0
Example value: =1
Definition:
Reverses the byte order of UID or block data read from all cards/tags. A UID of 1A2B3C4D becomes 4D3C2B1A. (Will be ignored if TagByteOrderTypes is set.)
Options:
=1 in example reverses the byte order. It may be used in conjunction with TagReadFormat to produce hex-standard, hex-reversed decimal and decimal-reversed output of UIDs.
Default value: =0
Example value: =1
Definition:
Reverses the byte order of UID or block data read from selected types of card/tag, where several types are being used in an application. A UID of 1A2B3C4D becomes 4D3C2B1A for your chosen card/tag type(s). (An alternative to TagByteOrder. If both are set TagByteOrderTypes take precedence and TagByteOrder will be ignored.)
Options:
Hex byte value, where each bit indicates reversal of data for a particular card/tag type, which can be added together:
Bit value 1: NFC Forum Type 1
Bit value 2: NFC Forum Type 2
Bit value 4: NFC Forum Type 3
Bit value 8: NFC Forum Type 4
Bit value 10: NFC Forum Type 5
Bit value 20: unused
Bit value 40: unused
Bit value 80: MIFARE Classic
=80 in example reverses the byte order for MIFARE Classic data/UIDs only.
=08 reverses the byte order for NFC Forum Type 4 (DESFire) data/UIDs only.
=82 reverses the byte order for both MIFARE Classic and NFC Forum Type 2 (Ultralight) data/UIDs only.
=00 (default) reverses nothing, any changes will be the result of TagByteOrder.
=FF reverses card/tag data on all card/tag types, equivalent to TagByteOrder=1.
Default value: =0
Example value: =80
Definition:
Select a block number to read.
Options:
MIFARE Classic 1K cards have 64 blocks (16 sectors of 4 blocks each) and 4K cards have 256 blocks (32 sectors of 4 blocks and 8 sectors of 16 blocks). These are numbered in decimal from 0 to 255. (Must also set NFCType#=B or =3, or MIFAREClassic=B or =3).
Default value: =0
Example value: =56
Definition:
The key required to read block data from a MIFARE Classic card or tag. *Use of TagReadKeySlot now preferred.* [Does not support AES keys.]
Options:
6 bytes in hexadecimal
Default value: N/A
Example value: =123ABC456DEF
Definition:
Identifies which uploaded appkey#.txt file contains the key for accessing the block data from a MIFARE Classic card or tag or MIFARE Ultralight AES card. (An alternative to TagReadKey for MIFARE Classic card cards.)
Options:
=1 to =9, to refer to the application key files uploaded as appkey1.txt through appkey9.txt
=0 means no key specified (unless TagReadKey is set)
Default value: =0
Example value: =1
Definition:
This is the key type, for the key set in TagReadKey.
Options:
=A or =B to describe the MIFARE Classic key type to be used with block data,
=C to enable AES CMAC secure message authentication / verification of block data. (Only applicable if NFCType2=B is also used with secured MIFARE Ultralight AES cards).
Default value: =A
Example value: =B
Definition:
Require fixed-width UID output by adding leading zeros as necessary.
Options:
1 to 20 digits, corresponding to the maximum number of decimal digits in a 64 bit value.
=0 or omitted has no effect.
=A for automatic padding with leading zeros to length for UID: 10 digits for 32bit UID, 17 digits for 56bit UID or 20 digits for 64bit UID.
=X for extended automatic padding: 10 digits for 32bit UID, 18 digits for 56bit UID or 20 digits for 64bit UID.
Default value: =0
Example value: =10
Definition:
The byte offset within block or UID data. Describes the position to start reading data from, within a block.
Options:
=0 to =15
If this offset is used together with TagReadLength, TagReadOffset + TagReadLength must be less than or equal to 16.
Default value: =0
Example value: =5
Definition:
The number of bytes of block or UID data to read from a tag or card. (Except for DESFire tags or cards which have an overriding DESFireReadLength setting.)
Options:
=1 byte to =16 bytes
This number should not exceed =4 if TagReadFormat is 'd'ecimal, as no more than 4 bytes are used in this case.
If this offset is used together with TagReadOffset, TagReadOffset + TagReadLength must be less than or equal to 16. (If it is not, the length will be reduced by truncating data.)
Default value: =16
Example value: =4
Definition:
Choose to format the extracted block data as ASCII, hex or decimal.
Options:
=a for ASCII characters (each byte is an ASCII character);
=d for decimal (interpret binary data as a 64 bit decimal value and output as ASCII decimal digits), in this case TagReadLength should not exceed 4 bytes;
=h for hexadecimal (convert binary data to ASCII hex digits with 2 digits per byte).
Default value: =h
Example value: =d
Definition:
Number of bits to right shift data. It may be used to remove any parity bits included at the end of extracted binary data.
Options:
Number of bits to right shift decimal 64 bit block data. (Only relevant if TagReadFormat=d.)
Default value: =0
Example value: =1