Serial2 interface settings

A list of all valid configuration settings for the config.txt file, which relate to sending pass information over the Serial2 port, which supports an RS-485 connection on a VTAP100 with a suitable expansion board..

Note: The Serial2 port is only available on VTAP100 v4 hardware onwards.

If Serial2Mode=1 and Serial2Source is set, you can open an application on the computer connected to the VTAP reader, and pass or card data that is read will be sent over the Serial2 interface. Serial2Source determines whether the Serial2 interface is used to send mobile pass reads only, or cards/tag reads too.

You might need Serial2Settings to change the standard parameters for data transfer from the 9600, n, 8, 1 default. Serial2RS485 is used to set up RS-485 transmission over the Serial2 interface, rather than RS-232.

When Serial2PassMode=1 you can use all of the other settings beginning Serial2Pass... to extract only part of the mobile pass data. To do this you have to start by identifying a separator character in the data as Serial2PassSeparator. This allows the data to be regarded as a set of sections that can be identified by number. By identifying a Serial2ContentSeparator this process can be repeated at a lower level, within a section. There is a simple example in the section Extract only part of the pass data.

If you want to receive serial QR/barcode scanner input (assumed to be an ASCII sequence) on this interface set Serial2ScannerMode, and adjust Serial2ScannerDelimiter if scanner inputs are terminated by something other than a new line character.

Serial2Mode
Definition:

Activate the Serial2 interface for receiving mobile pass data.

Options:

=1 (default) if you want VTAP data sent over the Serial2 interface,
=0 switches it off

Default value: =1
Example value: =0
Serial2PassContentMode
Definition:

Turns on a subdivision of a data section into content sections.

Options:

=0 off (default),
=1 on.

To use this mode you must also supply Serial2PassContentSeparator if the default % is not the separator you want to use and Serial2PassContentSection.

Default value: =0
Example value: =1
Serial2PassContentSection
Definition:

Identifies the content section of interest, based on finding Serial2PassContentSeparator characters. The first content section, before the first separator, is numbered 0.

Options:

Only used if Serial2PassContentMode=1.

Default value: =0
Example value: =1
Serial2PassContentSeparator
Definition:

Identifies the content separator character in the data which bounds content sections.

Options:

Only used if Serial2PassContentMode=1 and Serial2PassContentSection is set.

Default value: =%
Example value: =%
Serial2PassLength
Definition:

Number of characters of data to extract, used in conjunction with Serial2PassStart.

Options:

Defaults to 0 meaning do not truncate data, send all available characters from the pass data, or extracted section of pass data.

Default value: =0
Example value: =10
Serial2PassMode
Definition:

Sets whether to extract parts of the data from the mobile NFC pass.

Options:

=0 does not extract a character delimited section of the pass payload (Serial2PassSection is ignored).
=1 uses the Serial2PassSection value to extract a character delimited section of the pass payload.

Default value: =0
Example value: =1
Serial2PassSection
Definition:

Identifies the section of interest, based on finding Serial2PassSeparator characters. The first section, before the first separator, is numbered 0.

Options:

Only used if Serial2PassMode=1.

Default value: =0
Example value: =2
Serial2PassSeparator
Definition:

Identifies the separator character in the data which bounds sections.

Options:

Only used if Serial2PassMode=1 and Serial2PassSection is set.

Default value: =|
Example value: =|
Serial2PassStart
Definition:

Number of characters into string to start reading data, where first character is 0.

Options:

May be used with Serial2PassLength.

Default value: =0
Example value: =5
Serial2Postfix
Definition:

Adds special characters after data, if needed.

Options:

Use standard ASCII hex characters to describe the keystrokes to append.

%0D in the example adds a carriage return after the data,
%0A adds a new line after every pass or tag entry.
$t would include the pass type.
$$t would append '$t' to the output.
$t$n will follow the pass type character with a digit for VAS merchant ID/ST collector ID index (1 to 6) and a digit for keyslot used (1 to 6).
$u adds the UID as 8, 14 or 16 hex ASCII digits.

(For a ClosedPass type explainer - click here)

Pass type character

Pass type is a single character to describe the source of a received pass payload, which may be an Apple VAS pass or Google ST pass, a particular type of NFC card, or other source such as a barcode scanner. The values that returned are:

A - Apple VAS pass
G - Google ST pass
0 - MIFARE card/tag
2 - NFC type 2 card/tag
4 - NFC type 4 card/tag
6 - NFC type 5 card/tag
E - Card emulation
Q - Scanner input
X - Apple Wallet Access iPhone
W - Apple Wallet Access Watch

Default value: =%0A
Example value: =end%0D
Serial2Prefix
Definition:

Adds special characters before the data, if needed.

Options:

Use standard ASCII hex characters to describe the keystrokes to append.

%0A in the example adds a new line linefeed before the data.
$t would include the pass type .
$$t would prefix the output with '$t'.
$t$n will follow the pass type character with a digit for VAS merchant ID/ST collector ID index (1 to 6) and a digit for keyslot used (1 to 6).
$u adds the UID as 8, 14 or 16 hex ASCII digits.

(For a ClosedPass type explainer - click here)

Pass type character

Pass type is a single character to describe the source of a received pass payload, which may be an Apple VAS pass or Google ST pass, a particular type of NFC card, or other source such as a barcode scanner. The values that returned are:

A - Apple VAS pass
G - Google ST pass
0 - MIFARE card/tag
2 - NFC type 2 card/tag
4 - NFC type 4 card/tag
6 - NFC type 5 card/tag
E - Card emulation
Q - Scanner input
X - Apple Wallet Access iPhone
W - Apple Wallet Access Watch

Default value: [Empty]
Example value: =%0Astart
Serial2ScannerMode
Definition:

Controls whether a serial QR/barcode scanner input is expected on the serial2 interface.
(Note: If this is enabled the serial2 interface cannot be used for commands or OSDP.)

Options:

=0 (default) serial QR code/barcode scanner input not permitted on the serial2 interface
=1 enable serial QR code/barcode scanner input on the serial2 interface

Default value: =0
Example value: =1
Serial2ScannerDelimiter
Definition:

Controls which character is expected to terminate each serial QR/barcode scanner input on the serial2 interface

Options:

Uses standard ASCII hex characters to describe the keystroke to expect.

=%0d (default) will treat a carriage return character as indicating the end of scanner input
=%0a would treat a new line as indicating the end of scanner input

Default value: =%0d
Example value: =%0a
Serial2Settings
Definition:

Optional setting used to control the transfer of data over the serial2 connection.

Options:

Port settings: baud rate, parity, data bits, stop bits.

=9600,n,8,1 is the default if not specified

Baud rate can be set to 115200 instead of 9600.
Parity could be o for odd, e for even or n for no parity.
8 data bits means that groups of 10 data bits will be sent over the serial link, a start bit, 8 data bits and a stop bit.
The stop bit can be transferred for 1, 1.5 or 2 times the period used to transfer a normal bit.

Default value: =9600,n,8,1
Example value: =9600,n,8,1
Serial2Source
Definition:

Serial2Source controls which types of event data (pass reads, card/tag reads, serial commands, scanner inputs) go to the Serial2 interface.

Options:

The values are determined from a bitwise combination of the following hexadecimal values. Source options include these bit values for mobile passes and tag UIDs:
Bit 7 (0x80) = Mobile Pass (Apple VAS/Google Wallet Smart Tap)
Bit 6 (0x40) = STUID
Bit 5 (0x20) = Write to card emulation mode (CardEmulationMode=1 see VTAP NFC tag emulation settings)
Bit 4 (0x10) = RFU
Bit 3 (0x08) = RFU
Bit 2 (0x04) = Scanners
Bit 1 (0x02) = Command interface messages (>interface:type:message see Dynamic configuration commands)
Bit 0 (0x01) = Card/Tag UID

Default value: =A5
Example value:

=80 (hex) will send only mobile NFC pass data
=A1 to send data from NFC passes and NFC cards/tags and card emulation
=83 to send passes, cards/tags and serial commands

Serial2RS485
Definition:

Automatically enables transmit driver for RS-485 transmission, rather than RS-232 over the serial2 interface.

Options:

=1 indicates the serial2 interface is used for RS-485 (on suitable hardware)

Default value: =1
Example value: =0