Using the RS-485 interface

The RS-485 interface on the VTAP reader can be used to send NFC mobile wallet pass payload straight to a control unit, such as an access control unit, just like sending data from any other card or pass reader. RS-485 is a half‑duplex interface, which means that communication is only ever in one direction at any time. The hardware contains two data or signal lines (either A and B or + and –), which send balanced signals over the two lines. This means both lines contain the same signal but one is inverted with respect to the other. The RS-485 interface makes use of VTAP configuration settings starting Serial2..., described as the Serial2 interface.

The following steps will configure this interface (unless you will be Using OSDP over RS-485):

  1. The Serial2 interface is enabled on the VTAP100 by default. Should you need to disable it, set Serial2Mode=0 and/or Serial2RS485=0 to disable the Serial2 interface and/or RS-485 transmission driver in the config.txt file.

  2. By default, the VTAP reader is in active mode and any data read by the VTAP reader will be passed to the Serial2 interface, since Serial2Source=A1. To restrict this, so that only some types of data will be passed over RS-485, use another value for Serial2Source to suit your application. Refer to Serial2 RS-485 interface settings for options with this setting.

  3. The Serial2 interface needs to be in passive mode to support uni‑directional communications between the VTAP reader and the connected device. So use PassiveInterfaces=4 in the config.txt to enable passive mode on the Serial2 interface.

  4. When the VTAP reader is in passive mode, being polled for data by another system, it is important to realise that, by default, data is only retained for 3000 milliseconds after a pass, card or tag is read. After this period the data and information about this read can no longer be sent on any interface. Use the InvalidDataCacheMS setting if you need to change this to an amount of time that better suits your application.

  5. The default port settings are 9600 baud rate, no parity, 8 data bits and 1 stop bit. If this does not match your RS-485 system, change these settings, using Serial2Settings in config.txt. Define the interface parameters in the sequence <baud rate>, <parity>, <data bits>, <stop bits>, as in the example Serial2Settings=115200,n,8,1.

  6. If you only need a part of the full pass payload use Serial2Pass... settings to extract only that part. Refer to Serial2 RS-485/TTL interface settings for more about these settings.

  7. Prefix and postfix characters can be added to the data being sent over the RS-485 interface. Use Serial2Prefix or Serial2Postfix to set these (max 16 characters). URL encoding is supported.

After changing the Serial2... settings in config.txt and saving that file (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.

The most commonly used commands are:

  • ?r to get the last read pass or card/tag payload (as long as it is within the InvalidDataCacheMS period).

  • ?type to get the pass or card type along with VAS merchant ID or ST Collector ID and ECC key slot.