mxgxw / MFRC522-python

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

Fixed authentication, added examples. #8

Closed mj3052 closed 10 years ago

mj3052 commented 10 years ago

Authentication has been fixed and is now working. The issue was with the UID, as we only want the first 4 bytes of the backdate (the UID) appended when authenticating.

I've also removed the code in the bottom of the file MFRC522.py, as it should be easy to import it to whatever project you're doing. Instead I've added some proper examples showing how to read, write, and dump data.

Some comments have also been added here and there for better documenting what is happening. A function called StopCrypto1() has also been added for stopping authentication so that you can scan another card.

mxgxw commented 10 years ago

Thanks for the fixes! Great Job!