How to determine the card format of a Wiegand card using Scp Debug
Procedure Steps
Prerequisites:
1) Ensure the correct card reader is online for the type of card you are evaluating (for example, an HID Prox reader for an HID card).
2) If the Communication Server service is installed on a computer running Windows Vista, Windows 7, or Windows Server 2008, User Account Control (UAC) must be disabled. Follow the instructions in article How to turn User Account Control (UAC) on or off in Windows Vista, Windows 7 or Windows Server 2008"
In System Administration, complete the following steps:
1) From the Access Control menu, select Readers.
2) Verify that the correct total bit format is NOT selected. For example: If you are evaluating a 26-bit card, do not assign a 26-bit format to the reader that is used for this test.
3) On the computer where LS Communication Server is running:
- Click the Start button, then select Control Panel > Administrative Tools > Services.
- Stop the service.
4) Start the Communication Server as an application. Click the Start button, select All Programs > OnGuard version> > Communication Server right click and run this as Admin. This application will run interactively with the desktop.
Note: The debug files may not be created if the service is not ran as an Admin.
5) A new icon will display in the notification area in the lower right-hand corner of the screen. Double-click on this icon. The Communication Server will appear in the taskbar. Click on the application in the taskbar to open the program.
6) From the Diagnostic menu, select Scp Debug File.
Important: Do not close the Communication Server as an application at this point.
7) Present the card to the reader making note of the card number (if known) and the order in which the cards are presented.
Important: The error received must be an invalid card format error.
8) Once all the cards have been presented, open the Communication Server application and deselect Scp Debug File in the Diagnostic menu. This will stop the debug process and write the output debug file.
9) Navigate to the OnGuard installation directory (C:\Program Files (x86)\OnGuard by default) and then open the SCPDebug.txt file.
10) Scroll to end of file. You should see text similar to this example:
36866 Oct 27 10:07:45 SCP-1:262 ACCESS READER-32, 13:5
36870 Chnl-1, SCP-1 (0) rx: 5B 80 20 00 02 81 06 04 10 00 07 01 00 00
36870 > C5 93 C1 BB 09 20 00 03 01 10 22 D4 08 8A 60 00=AB F7
36870 Oct 27 10:07:49 SCP-1:263 ACCESS READER-32, 3:1 34 bits: D4088A6000
36872 Chnl-1, SCP-1 (0) rx: 5B 80 20 00 02 81 06 04 10 00 08 01 00 00
36872 > C7 93 C1 BB 09 20 00 03 01 10 22 E2 08 8A 60 00=85 CA
36872 Oct 27 10:07:51 SCP-1:264 ACCESS READER-32, 3:1 34 bits:E2088A6000
36878 SCP detach: found it, detaching it
36878 Closing handle 00000190
36878 1, enCcDetachScp: 0208 1
36878 SCP detach: this SCP is already detached - nothing to do
36878 1, enCcDeleteScp: 0015 1
11) Locate the card data. There should be an entry for every card read that lists the number of bits, followed by a colon, and then by a hexadecimal value. In this example, the text of interest is: "34 bits:E2088A6000." Using a scientific calculator, convert the hexadecimal value to both decimal and binary values.
12) Convert the actual printed card number from a decimal to a binary number.
Note: Sometimes the printed card number is not the same as the internal number. For example, given E2088A600, the binary value is 1110001000001000100010100110000000000000.
13) From the Administration menu, select Card Formats and add a test card format equal to the number of bits found previously:
- If the Facility Code is known, enter it. Set the bit values for Facility Code to start at 1 and end at half of the total number of bits -1.
- Set Card Number to start at 1 bit greater than the Facility Code end point. Card Number should then have its Number of Bits set to the number of the remaining bits (-1 if there is a issue code leaving the last bit available in the format).
- Number of Even Parity Bits should be 0.
- Number of Odd Parity Bits should be 0.
- Total Number of Bits On Card is set to 19.
- Starting Bit for Facility Code is set to 1.
- Number of Bits for Facility Code is set to 14.
- Starting Bit for Card Number is set to 15.
Important: The total number of bits in Facility Code and Card Number must be 1 less than the Total Number of Bits On Card.
14) Swipe the card. Alarm Monitoring will display a code number or the message "Invalid Facility Code."
15) Type the code number from Alarm Monitoring into the Facility Code field on the Card Format tab.
16) Swipe the card again. A card number will be displayed.
17) Convert both numbers (facility code and card number) to binary numbers.
18) Copy and paste the binary numbers into a standard text editor such as Notepad.
19) Adjust the start position and lengths to determine the best possible format match.
20) Compare the binary number of the printed card number to the binary number of the facility code and card number binary numbers to see if there are any matches.
21) When you think you are close, it is good to swipe at least 3 - 5 different cards in sequence to verify the match.
Note: The parity bits can only be turned back on if you have a large enough sample of cards to verify that the parity check is working properly.
If you are unable to determine the card format after performing this procedure, the card may be sent to Lenel for evaluation. Contact Technical Support for further assistance.
Applies To
OnGuard (All versions)Additional Information
Do not to stop the LS Communication Server unless you are authorized to do so, as system-wide operation will be impacted.A scientific calculator is available via Windows: Click the Start button, then select All Programs > Accessories > Calculator. In the Calculator window, from the View menu, select Scientific.