0

I want to use a RPi combined with a RC522 NFC reader to make a Mifare card-based authentication system(1). I am struggling with the capacity to read selected blocks of data on the NFC card.

I have been using information and code from PiMyLifeUp to read and write data on NFC cards. It works great.

I see however that this is limited to reading (not writing) the UID and reading and writing to block 8. I almost thought that I had the remaining of the information from a detailed answer but it stops short at what I did (and uses the same code).

My question: how to read and write any block?


(1) I initially intended to use an Arduino but even my limited initial tests show that the RPi is much more reliable in reading and writing the cards

1 Answer 1

0

I just realized that SimpleMFRC522.py defines the blocks to read and write:

BLOCK_ADDRS = [8, 9, 10]
1
  • Congratulations on answering - all on your own! One suggestion: You should click the "Accept" mark on your answer when you're able (may take a day or two??). That will signal others that this answer worked for you. Note that you can't upvote your answer (or your Q), but you can accept it.
    – Seamus
    Nov 6, 2023 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.