Issue
How to reverse and/or complement the bits as read from a Wiegand access card in a custom card configuration
Environment
CyberStation
CX9702
CX9900
CX9680
ACX5720
ACX5740
ACX701
ACX781
Cause
Some Wiegand cards are encoded with the bits in one or more fields reversed and/or complemented. It is then necessary to operate on the fields when decoding the data in order to obtain the correct data.
Resolution
In the AccessFormat array a control field is provided to configure the system so that the bits in a field in the access card data can be reversed and/or complemented.
The control mask is located at AccessFormat[2]
Control Mask
The bits of the control mask will be used by the parsing routine to reverse or complement selected fields. Setting the appropriate bit to a 1 will enable the special action:
Field |
Issue Code |
Card Number |
Site Code |
Manufacturers Code |
||||
Feature |
Reverse |
Complement |
Reverse |
Complement |
Reverse |
Complement |
Reverse |
Complement |
Bit # |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Bit Value: 128 64 32 16 8 4 2 1
Examples:
To reverse the bits in the site code field set AccessFormat[2] = 8
To reverse the bits in both the card number and site code fields set AccessFormat[2] = 40
Reversing the bits makes the first bit in the field become the last.
Complementing the bits flips the bit's value, 1 becomes 0 and vice versa.