Format pass and card/tag data to match over Wiegand
The following example shows how you might combine these settings to get matching data formats output from both mobile passes and card/tag UID data output from a VTAP reader over all interfaces.
!VTAPconfig
MIFAREClassic=U
WiegandMode=1
WiegandPassMode=1
WiegandPassSeparator=|
WiegandPassSection=2
PassWiegandBits=32 ; Output 32bit mobile wallet pass payload
over Wiegand
TagWiegandBits=0 ; Automatic bit length of tag data over Wiegand
Output for MIFARE card/tag on ComPort or other ASCII interface is in the default format, hexadecimal, since TagReadFormat is not set:
Hex (4-byte): A6D7D15D
Output for MIFARE card/tag on Wiegand interface:
Hex (4-byte): A6D7D15D
Binary: 10100110 11010111 11010001 01011101
Full mobile wallet pass payload: 3|09uwlh2jh|A6D7D15D|Testing
Output for mobile wallet pass on ComPort or other ASCII interface, after the WiegandPass... settings :
Hex (4-byte): A6D7D15D
Output for mobile wallet pass on Wiegand interface:
Hex (4-byte): A6D7D15D
The following example shows how using the card/tag data format settings can change the way secure DESFire data is output from a VTAP reader over all interfaces.
!VTAPconfig
WiegandMode=1
NFCType4=D ; Read DESFire data from NFCType4 cards
DESFire1AppID=92E672 ; 24 bit DESFire application ID to read
; (6 hex digits)
DESFire1FileID=26 ; The file ID to read, within the
; application (decimal 1 to 255)
DESFire1KeyNum=1
DESFire1KeySlot=3 ; Use key saved in appkey3.txt on the VTAP
DESFire1Crypto=1 ; 3DES cryptography
DESFire1Format=0 ; No format, so must set DESFireReadLength
; and TagReadFormat
Output on both Wiegand and ASCII interfaces:
Hex (3-byte) 353132 Binary: 00110101 00110001 00110010
Since DESFire#Format is not set, the default DESFire read length (3-byte) is read
Now add the line:
DESFire1ReadLength=8 ; Number (1 to 16) of bytes to read
; when DESFire1Format=0
Output on both Wiegand and ASCII interfaces:
Hex (8-byte) 3531323334333336
Binary: 00110101 00110001 00110010 00110011 00110100 00110011 00110011 00110110
Add the line:
TagReadFormat=a ; Convert the data read from DESFire card/tag
; for ASCII interfaces
Output on ASCII interface: ASCII (8-character) 51234336
Binary: 00110101 00110001 00110010 00110011 00110100 00110011 00110011 00110110
Output on Wiegand: Hex (8-byte) 3531323334333336
Binary: 00110101 00110001 00110010 00110011 00110100 00110011 00110011 00110110
Add the line:
TagWiegandASCIIFormat=d ; Interpret the ASCII data from
; TagReadFormat as decimal
Output on Wiegand:
Binary: 00000000 00000000 00000000 00000000 00000011 00001101 11000110 00100000
Hex: 00000000030DC620
Decimal: 51234336
Add the line:
TagWiegandBits=32 ; Set the Wiegand output bit length to 32
Final output for DESFire card/tag
ASCII interface (such as output over ComPort): 51234336
Wiegand interface:
Binary: 00000011 00001101 11000110 00100000
Hex: 030DC620
Decimal: 51234336
Now consider the mobile pass.
The full mobile wallet pass payload is: 3|653POAwbeS2|51234336|Testing
Here, we assume that the third section of pass payload contains the required data.
WiegandPassMode=1 ; Enable Wiegand Pass mode to extract only
; part of the entire pass payload
WiegandPassSeparator=| ; Set the separator character VTAP will use
; to separate the pass payload sections
WiegandPassSection=2 ; Use third section (starting from 0)
PassFormat=d ; Interpret the pass payload as a decimal
; number for conversion to a Wiegand
; bit sequence
PassWiegandBits=32
Final output for mobile wallet pass
ASCII interface, such as ComPort: 51234336
Wiegand interface:
Binary: 00000011 00001101 11000110 00100000
Hex: 030DC620
Decimal: 51234336
Note: When using the Wiegand interface, multiple reads are not supported. In this case, only the lowest numbered DESFire#... settings will be used, which might not be DESFire1.... If only DESFire3... and DESFire4... settings are defined in config.txt, the DESFire3... settings would then be used for output over Wiegand.
If you are getting different card/tag and pass outputs over Wiegand, always bear in mind that there are different settings in VTAP reader configuration to control the format of :
-
pass data over serial interfaces,
-
pass data over the Wiegand interface,
-
card/tag data over serial interfaces and
-
card/tag data over the Wiegand interface.
In some applications these may need to be different. Do not assume that the data format you receive over a serial interface is necessarily the same as that being sent over Wiegand. Check the data received by your access control system to see what is being sent over Wiegand. Please do contact vtap-support@dotorigin.com if you need further help adjusting your configuration to achieve a particular format of output.