Virtual COM port settings
A list of all valid configuration settings which relate to sending pass information over a virtual COM port interface for the config.txt file.
If ComPortEnable=1, ComPortMode=1 and ComPortSource is set, pass or card data read by the VTAP reader will be sent over the virtual COM port. This is the virtual COM port in active mode. ComPortSource determines whether data is sent over the COM port interface only when there are mobile pass reads, or cards/tag reads too.
After setting ComPortEnable=1 in config.txt the unit needs to be rebooted or power cycled. On a Windows PC, if you check the Device Manager, you will see under 'Ports (COM & LPT)' that there is now a VTAP reader that has been assigned a COM port. (If it says 'USB Serial Device' rather than 'VTAP100', you should right click on the VTAP100.inf or VTAP.inf file on the VTAP file system to install the correct driver.)
The COM port is described as being in either active or passive mode. Active mode means that pass or card data read by the VTAP reader will be sent over the COM port immediately, whenever it is read. Passive mode means that the VTAP reader will only send on that data in response to a command. These are listed in Command Interface.
By default the VTAP reader is in active mode. Use PassiveInterfaces=1 to enable passive mode and CommandInterfaces=1 to allow commands to be received on the command interface. Set InvalidDataCacheMS for the time you want pass read data to be retained by the VTAP reader, while it is waiting for a Com Port request to send it onwards. There is a simple example in Use the virtual COM port in passive mode.
ComPortPrefix and ComPortPostfix can be optionally used to add extra characters before or after a pass read, to suit your application.
When ComPortPassMode=1 you can use all of the other settings beginning ComPortPass... 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 ComPortPassSeparator. This allows the data to be regarded as a set of sections that can be identified by number. By identifying a ComPortPassContentSeparator 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 ComPortScannerMode, and adjust ComPortScannerDelimiter if scanner inputs are terminated by something other than a new line character.
Settings below:
CommandInterfaces | ComPortEnable | ComPortMode | ComPortPassContentMode | ComPortPassContentSection | ComPortPassContentSeparator | ComPortPassLength | ComPortPassMode | ComPortPassSection | ComPortPassSeparator | ComPortPassStart | ComPortPassPostfix | ComPortPrefix | ComPortSource | ComPortScannerDelimiter | ComPortScannerMode | InvalidDataCacheMS | PassiveInterfaces
Definition:
Enables or disables your ability to send commands over particular interfaces.
Options:
=1 enables the ComPort,
=2 enables the Serial port,
=4 enables the Serial2 port.
Add values together to enable multiple ports, so
=3 enables both ComPort and Serial port.
=7 (default) enables all ports.
Default value: =7
Example value: =1
Definition:
Enable a virtual COM port for the USB interface so the VTAP is treated by the connected PC as a COM port, as well as a mass storage device.
Options:
=1 is enabled (default)
=0 is disabled
Default value: =1
Example value: =0
Definition:
Activate the COM port as an interface for receiving mobile pass data.
Options:
=1 (default) if you want VTAP data sent over the COM port
=0 is disabled
Default value: =1
Example value: =0
Definition:
Turns on a subdivision of a data section into smaller content sections.
Options:
=0 off (default),
=1 on
To use this mode you must also supply ComPortPassContentSeparator if the default % is not the separator you want to use and ComPortPassContentSection.
Default value: =0
Example value: =1
ComPortPassContentSection
Definition:
Identifies the content section of interest, based on finding ComPortPassContentSeparator characters.
The first content section, before the first separator, is numbered 0.
Options:
Only used if ComPortPassContentMode=1 is set.
Default value: =0
Example value: =1
ComPortPassContentSeparator
Definition:
Identifies the content separator character in the data which bounds content sections.
Options:
Only used if ComPortPassContentMode=1 and ComPortPassContentSection is set.
Default value: =%
Example value: =%
Definition:
Number of characters of data to extract, starting from the position defined by ComPortPassStart.
Options:
=0 is default, 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
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 (ComPortPassSection is ignored).
=1 uses the ComPortPassSection value to extract a character delimited section of the pass payload.
Default value: =0
Example value: =1
Definition:
Identifies the section of interest, based on finding ComPortPassSeparator characters. The first section, before the first separator, is numbered 0.
Options:
Used only if ComPortPassMode=1.
Default value: =0
Example value: =2
Definition:
Identifies the separator character in the data which bounds sections.
Options:
Only used if ComPortPassMode=1 and a ComPortPassSection is set.
Default value: =|
Example value: =|
Definition:
Number of characters into pass data to reading, where first character is 0.
Options:
May be used in conjunction with ComPortPassLength.
Default value: =0
Example value: =5
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 Pass 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: =%0D%0A
Example value: =end%0D
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 Pass 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
Definition:
Controls which types of event data (pass reads, card/tag reads, serial commands, scanner inputs) are sent to the COM port 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
Definition:
Controls whether a serial QR/barcode scanner input is expected on the COM port interface.
(Note: If this is enabled the COM port interface cannot be used for commands or OSDP.)
Options:
=0 (default) serial QR code/barcode scanner input not permitted on the ComPort interface
=1 enable serial QR code/barcode scanner input on the ComPort interface
Default value: =0
Example value: =1
Definition:
Controls which character is expected to terminate each serial QR/barcode scanner input on the ComPort 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
Definition:
A period to retain data after reading in milliseconds. Set to retain data in memory until requested, but without undue security risk to that data.
Options:
Example says retain data for 3000ms after a mobile pass, card/tag read. Used with interfaces in passive mode only.
Default value: =3000
Example value: =3000
Definition:
Enable passive mode at startup for any of the command interfaces.
Options:
The value is any combination of bit values (as per CommandInterfaces values) where
=1 enables the ComPort,
=2 enables the Serial port,
=4 enables the Serial2 port.
=0 (default) means passive mode is disabled on all interfaces.
=3 in example enables passive mode on Serial and COMport.
Default value: =0
Example value: =3