Send pass payload over a serial RS-485 interface

RS-485 is a half‑duplex interface, so the VTAP reader should be set to passive mode to avoid contention when bi-directional communication with a host system is required.

In passive mode the VTAP reader connected over RS-485 becomes subordinate to a system, such as a PC, which is the master. The PC (master) sends a command (query) to the VTAP reader and waits for a response. The PC can send a serial command to the VTAP reader such as ?r to retrieve the last pass payload, or ?t to retrieve the type of the last pass read. The VTAP reader only responds to incoming commands.

Physical RS-485 connector

The RS-485 interface is only available on the VTAP100‑PAC-485-CC. Refer to the Installation Guide for your VTAP reader for advice on wiring a serial RS-485 interface.

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

  • The Serial2 RS-485 interface is enabled by default. (It can be disabled by setting Serial2Mode=0 and/or Serial2RS485=0 to disable the Serial2 interface and RS-485 transmission driver respectively, if required.) The default serial2 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 Serial2Settings and defining the parameters in the sequence = <baud rate>, <parity>, <data bits>, <stop bits>, such as Serial2Settings=115200,n,8,1.

  • Use the setting Serial2Source in config.txt to restrict the types of data to be passed through the serial2 RS-485 interface, if needed. The default value is =A5, which allows every mobile pass, card or tag read, scanner input, all commands and interface messages. This setting works in the same way as SerialSource for RS-232. Refer to SerialSource values in the Send pass payload over a serial RS-232 or TTL interface section for more, if it needs to be changed to suit your application.

  • You could add extra prefix or postfix characters (up to 16 characters) to the data being sent, using Serial2Prefix or Serial2Postfix settings. (Only when the serial interface is used in active mode). This setting works in the same way as SerialPrefix and SerialPostfix for RS-232. Refer to SerialPrefix and SerialPostfix syntax in the Send pass payload over a serial RS-232 or TTL interface section for more, if this is needed for your application.

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

    Copy
    Serial2Prefix=UID:

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

    This will result in Google pass output:

    UID:3|F6I53ZaPv2Ys2PAb|Employee Name|Dot Type:G,Slot:16

    or MIFARE Classic card output:

    UID:0473816A831E80 Type:4,Slot:--

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

After changing the Serial2... settings in config.txt and saving it (if something other than default behaviour is required), you can start sending commands (queries) over the serial2 RS-485 interface, to receive pass payloads in response.

To set up the VTAP for passive mode and start sending different commands and receive responses, follow the instructions in Use an interface in passive mode.

You can then modify or add any of the Serial2... settings by sending them as a command over the serial RS-485 interface. This is useful if you need to change a setting value on a VTAP reader which is not accessible over USB.