mxgxw / MFRC522-python

A small class to interface with the NFC reader Module MFRC522
GNU Lesser General Public License v3.0
524 stars 418 forks source link

AUTH ERROR #6

Open afkham opened 10 years ago

afkham commented 10 years ago

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

mj3052 commented 10 years ago

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

whitehorse5353 commented 10 years ago

@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.

Denisfmartinez commented 9 years ago

Hi, Did you fix the authentication problem? I've the same problem with the MFCrypto1ON bit of the register "Status2Reg"

mikicaivosevic commented 8 years ago

I have fixed the issue with auth error, so you can try my fork: https://github.com/mikicaivosevic/MFRC522-python

xcxz1994 commented 7 years ago

@mikicaivosevic Hello,I found https://github.com/mikicaivosevic/MFRC522-python still this Auth Error exist,what can i do?

TheRealBanana commented 7 years ago

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.

doppelhund-developer commented 5 years ago

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.

robertmuth commented 5 years ago

the tag may not support authentication. Try something like:

nfc.SelectTag(uid) for i in range(16): nfc.Read(i)

CosmaP commented 5 years ago

Where do I put that @robertmuth ?

nfc.SelectTag(uid) for i in range(16): nfc.Read(i)

Kobes commented 4 years ago

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.

CosmaP commented 4 years ago

Thanks Kobes, I will try that tomorrow.

Sologaistoa commented 3 years ago

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!