The magical world of RFID cards
RFID stands for Radio Frequency ID identification . It will be about Hungarian-language cards, the plastic sheets or key chains that companies use for entry and identification. There are several of them that work at different frequencies, I won't go into detail about that.
Due to the relocation of an access control system, I got stuck with the above cards and looked at them angrily, because the readers of the two access control systems read two different identification numbers from the same card. So it was not possible to simply export the data from the old one and import it into the new one.
The new system is a Dahua Access Controller DHI-ASC3202B, the old one is a noname Chinese something. And as we know, picking up many cards by hand is not the height of pleasure.
The root of the solution to the identification number of the two different cards was found in the xth English forum.
As we can see, there are three numbers on the card above, but when scanned digitally, the card contains 1 line of numbers. The ID of the card is 9645512 , this can be read from the card. This identifier consists of a facility identifier 96 (Facility code), as the name indicates, it is assigned to the given building where the card provides access. (If we use it correctly.) As well as the card code 45512 (card code), this is assigned to the person whose entry is ensured by the card.
In reality, some card readers display 9645512 and others display 6336968 . How is this possible when the card only contains the number 9645512 ? This is what I asked before enlightenment.
This is possible by calculating 6336968 from 09645512.
We convert 96 to hexadecimal and 45512 to hexadecimal, write them next to each other and convert back to decimal.
(96)HEX=60 (45512)HEX=B1C8 (60B1C8)DEC=6336968
The road is straight from here. There was an old card reader that communicates with the Wiegand (26) protocol, which is the most common among card readers. You can read about how and how here. I connected this card reader to an Arduino UNO board so that Wiegand(26) translates it to a serial output.
As you can see from the pictures:
Reader D0 -> Arduino 2 feet
Reader D1 -> Arduino 3 feet
Power supply directly from the Arduino DC connector, the reader works with 9-12V . Its output is 5V .
I downloaded the program to the Arduino from this page , only changed its output to hexadecimal and deleted/modified the error messages. Here it is:
My colleague and I decrypted the file exported from the Dahua Access Controller DHI-ASC3202B device, so I wrote a program that adds the cards per card swipe.
If you are satisfied with this, you can add the names and other data in Excel, and then import the file into the above Access Controller. It comes in handy if we are not on site and add the cards remotely.
Program operation:
RFID Card reader (Wiegandalf cardmagic)
The attached program communicates with a serial port RFID card reader and saves the scanned cards in a file compatible with Dahua Access Controller.
Details: https://hirehamva.hu/wpblog/archivum/1713
OS: Windows 10, Windows 11