Рет қаралды 76
RasPi4 + Arduino + MFRC522 RFID module = programmable RFID reading and writing.
Now that we had a basic understanding of how the memory is stored and the ENTIRE contents (16 sectors of 4 blocks each. 64 blocks of 16 bytes each = 1024bytes or 1kb of total memory) can be memory dumped, we wanted to be able to manipulate each specific sector, block, and hex address to manipulate the entire memory address as we saw fit. So we wrote a program from scratch tonight to do just that using commands and information provided directly from the mfrc522.h file itself 😎🤠
This allows you to scan a RFID card or tag and write what data in what location as you see fit. The user will input first the sector they want to manipulate, followed by the block location they want to manipulate, and finally they input the 16 bytes of data. Here I reset the sector 0 block 2 to all zeros and then enter some random data and write to it then display the new data for sector 0 block 2.
Notice that the user will input decimal numbers in 16 positions to be input into an array. That array then gets written to the block and sector and hexadecimal form. (21 decimal is 15 in hex 🤯)
In case you think it's a different RFID tag/card, sector 0 block 0 stores the UID of the RFID key. You'll notice they are the same both times
We plan on implementing a larger program including this and :
1: Full memory dump option
2: Key Cloning
3: Factory Key Reset
4: Name Key
5: Change keyByte for security (0xFFFFFFFFFFFF)
6: Change UID, PICC, and SAK
7: Write to Trailer Security Blocks