Send pass payload over a serial RS-232 or TTL interface

The VTAP reader will, by default, send pass payload or a command response to the connected system (such as a PC) over any serial RS-232 or TTL interface.

Physical RS-232 or TTL connector

The RS-232 interface is available on the captive USB/RS-232 connector on VTAP100‑OEM and VTAP50‑OEM. The TTL serial interface is only available on VTAP50‑OEM on the 12-pin expansion connector (if fitted). Refer to the Installation Guide for your VTAP reader for wiring serial RS-232 and TTL interfaces.

Note: RS-232 and TTL serial present as different physical interfaces but use the same UART, so only one of these interfaces should be used at a time, if both are available.

The VTAP reader can communicate in either Active or passive interface? mode over a serial RS-232 interface. The settings in this section assume active mode, as this is the default. See Use the virtual COM port in passive mode for additional settings and considerations if you need to use passive mode.

The following list describes optional settings. You may need to use some of them to suit your VTAP reader application:

  • The RS-232 interface is enabled by default. (It can be disabled by setting SerialMode=0 if required.) The default serial port settings are 9600 baud rate, no parity, 8 data bits and 1 stop bit, but this can be changed to match your system, in config.txt, using SerialSettings and defining the parameters in the sequence = <baud rate>, <parity>, <data bits>, <stop bits>, such as SerialSettings=115200,n,8,1.

  • Use the setting SerialSource in config.txt to restrict the types of data to be passed through the serial RS-232 interface, if needed. The default value is =A5, which allows every mobile pass or card/tag read, scanner input, all commands and interface messages.

    SerialSource values

    You restrict the types of data passed through the serial RS-232 interface by setting a hex value for SerialSource in config.txt. The most common values are:

    • =A5 (default) allows every mobile pass, card/tag read, scanner input;

    • =83 for all mobile pass, card/tag reads, all commands and interface messages;

    • =80 for mobile pass reads only.

    The values come from a bitwise combination of the following hexadecimal values:

    FIRST HEX DIGIT

    SECOND HEX DIGIT

    BIT 7

    BIT 6

    BIT 5

    BIT 4

    BIT 3

    BIT 2

    BIT 1

    BIT 0

    0x80

    0x40

    0x20

    0x10

    0x08

    0x04

    0x02

    0x01

    Mobile wallet pass

    -

    Write to card emulation mode

    -

    -

    Scanners

    Command interface message

    Card/Tag UID

    So, for example setting SerialSource=80 (hex) will send only NFC mobile pass data to the serial interface because 80 corresponds to choosing 1000 0000 in the table above.

  • You could add extra prefix or postfix characters (up to 16 characters) to the data being sent, using SerialPrefix or SerialPostfix settings. (Only when the serial interface is used in active mode).

    SerialPrefix and SerialPostfix syntax

    • URL encoding of ASCII characters is supported.

    • Use $t command to return the pass type (A, G, 0, 2, 4, or 6, E, Q , X or W ) together with the payload.

      0 = MIFARE Classic

      2 = NFC Forum type 2 / MIFARE Ultralight / NTAG

      4 = NFC Forum type 4 / DESFire

      6 = NFC Forum type 5 / I‑CODE

      A = Apple VAS pass

      G = Google Smart Tap pass

      E = Card emulation (when in write back mode)

      Q = QR / Barcode scanner

      X = Apple Wallet Access iPhone

      W = Apple Wallet Access Watch

    • $n will add VAS merchant ID / Smart Tap collector ID index (1 to 6) and the keyslot number used (1 to 6). For cards/tags, QR/barcode or card emulation, $n will return no value --.

    Example: Using prefix and postfix on Serial RS-232 interface for pass and card/tag payload

    Copy
    SerialPrefix=%0a%0d

    SerialPostfix=%20Type:$t,Slot:$n

    This will result in Google pass output:

    (New line)
    3|F6I53ZaPv2Ys2PAb|Employee Name|Dot Type:G,Slot:16

    or NFC Type-2 card output:

    (New line)
    0473816A831E80 Type:2,Slot:--

  • SerialPass... settings allow you to extract only a part of the full pass payload, if preferred. Refer to Serial RS-232 interface settings for more about these settings.

  • A start‑up message is set up on the VTAP reader, which defaults to "VTAP100/<firmware version>\r". Change this using the setting SerialStartup in config.txt.

After changing these Serial... settings in config.txt and saving it (if something other than default behaviour is required), you can start reading pass payloads over the serial RS-232 interface, in either active or passive mode.

You can continue to modify or add any of the Serial... settings by sending them as a command over the serial RS-232 interface. This is useful if you need to change a setting value on a VTAP reader which is not accessible over USB. Read more in how to Use the virtual COM port in passive mode, and important factors to bear in mind when using this approach.