Learn to use PN532 to copy IC access card
Introduction to PN532
The PN532 chip is a near field communication (NFC RFID) chip developed by NXP. The chip integrates a contactless communication protocol for communication at 13.56MHz. It contains an 8051 core. If you say so much, you won’t come. Nonsense, to be honest about the many functions and principles of the chip, bloggers don't know much, but it does not prevent us from using it to read and write ordinary IC cards on the market!
PN532 module
There are a variety of modules made of PN532 chips on the market, some are expensive and some are cheap. You can search on the Internet by yourself. The following is the blogger’s
|
|
Preparation before use
Although the communication protocol interface between the module and the outside world has a UART interface, it is of TTL level and cannot be directly connected to a computer. We also need a USB-TTL module
|
|
Hardware wiring
Before wiring, let's put a big picture and look at the pin names on the module.
Above we can see that TX and RX are not marked for the UART protocol pins. After checking the information, we found that SDA corresponds to the TX pin of the UART protocol, and SCL corresponds to the UART. Protocol RX, power supply can use the 3.3V power supply port on the USB-TTL module. Check the
following table for wiring
PN532 | USB-TTL |
---|---|
GND | GND |
VCC | 3V3 |
SDA | RX |
SCL | TX |
Software settings
After wiring according to the above pins, open the computer device manager and you can see that there is a CH340 device in the port. If an unknown device is displayed, please install the CH340 driver (by Baidu)
Open the host computer software included with the information (friends who need information can leave a message below or search online by themselves), if the connection is ok, the host computer will display an NFC device found
Read data
Next, paste the white card and our PN532 module together, click "read card content" on the computer host computer,
you can see that this is a white card, and then we find the access control card we need to copy, and put it Read out the content of the
card in the same way as the white card above
. After reading the data, we first save it as a file, click the triangle in the upper left corner of the data, and save it to a place where you can find it. You need to use it when writing the card.
data input
The next step is to write the data of the access control card into the prepared white card. Click Write to the white card and find the previously saved file
. When this is reached, we have already copied an IC access control card. Here I use ordinary If there is a need to change the 0 sector block, it is recommended to use a UID card. The ordinary M1 card cannot modify the 0 sector block information.
Write complete
At this time, we read the data of the card again.
Comparing the data above, we can find that the data of the original access control card has been written to the new card, and the process of copying a card is completed here.
to sum up
The above copying process does not apply to encrypted cards. Ordinary non-encrypted IC cards are still no problem.
We are here for this issue. Interested friends are welcome to leave a message below!