MFRC522-python
MFRC522-python copied to clipboard
AUTH ERROR
The following error is printed when running this Python code:
Card detected Card read UID: 13,136,60,202,115 Size: 8 AUTH ERROR!! AUTH ERROR(status2reg & 0x08) != 0
AUTH ERROR
I've fixed the issue with authentication. Until the maintainer of this repo answers the issue I created, you can get the working code from: https://github.com/mj3052/MFRC522-Pi
@mj3052 hey Mat already i have reported in your repo https://github.com/mj3052/MFRC522-Pi still this Auth Error exist can you please look into that, because when i try to use dump.py it reads once and later it prints only auth error msg which is shared already by @afkham-azeez . I am using nodejs to python-shell to run this library.
Hi, Did you fix the authentication problem? I've the same problem with the MFCrypto1ON bit of the register "Status2Reg"
I have fixed the issue with auth error, so you can try my fork: https://github.com/mikicaivosevic/MFRC522-python
@mikicaivosevic Hello,I found https://github.com/mikicaivosevic/MFRC522-python still this Auth Error exist,what can i do?
Also having the same issue. I've tried all the common auth keys as well as all the different forks out there of this library with no success. I have at least verified that the MFRC522 can for sure read the NTAG213 and NTAG216 rfid tags using the arduino MRFC522 library. Maybe comparing the way that library works vs this one would help.
I also have this autherror and it is the same error like afkham. The error only came if i used the small rfid tag, it didn't happened with the big card.
the tag may not support authentication. Try something like:
nfc.SelectTag(uid) for i in range(16): nfc.Read(i)
Where do I put that @robertmuth ?
nfc.SelectTag(uid) for i in range(16): nfc.Read(i)
If the tag does not support authentication, you should simply not call MIFAREReader.MFRC522_Auth(MIFAREReader.PICC_AUTHENT1A, 8, key, uid)
. For example around line 85 in the Read.py example.
If you would out comment that line and just call MIFAREReader.MFRC522_Read(8)
instead, it will work for cards without authentication (or at least it seems so in my first checks).
In a broader sense, this is not a great solution, as you will now no longer support tags that require auth. So, doing a try, catch etc (or some other design) is better, but requires some other changes as well.
I hope I will be able to pull that off soon.
Thanks Kobes, I will try that tomorrow.
Hello there, I had the same issue when reading the 13.56 Mhz tags. What I did is to go to the SimpleMFRC522.py file located in /usr/local/lib/python3.7/dist-packages/mfrc522/SimpleMFRC522.py, I commented the following lines. ` # Check if an error occurred
if not (status == self.MI_OK):
self.logger.error("AUTH ERROR!!")
if not (self.Read_MFRC522(self.Status2Reg) & 0x08) != 0:
self.logger.error("AUTH ERROR(status2reg & 0x08) != 0")`
so far so goo!