Hello
I've been searching all over the internet and can't seem to find a clear answer, hoping someone can help out.
Components being used in the project:
- Using Raspberry Pi (is preferred because this is an extension of an existing project and the Pi is available, the rest of the program runs on it + Gpio pins are available, as to not having to introduce another hardware part like an arduino).
Using the mfrc522 library - Using the RFID reader/writer module (works with NFC) from RobotDyn (convenient 5V extra pin and smaller size) (see image below this)

- Using "On-metal Round NFC Tags NTAG213 22mm" (see image)

Problem to be solved:
- Authentication error
I need a way (in python preferably) to write code that authenticates (gives the correct key) and then makes it able to change the password.
Preferred workflow:
- Ntag213 tags gets authenticated and given a password by us. (Initial registration).
Python program for initial registration - Registered ntags will then be need to be able to mainly read and occasionally be overwritten with different data (Only some numbers for identification purposes in a database handled by other code on the raspberry pi)
Python program for reading
Python program for writing
Here is a dump of the NTAG213 (read by the RobotDyn MFRC522):

I've read in the documentation that the authentication is being checked on black 7? Is that right?
I just have no idea how to change this key it uses.
Example of error reading it:

Example of error writing to it:

Code example of writing script (basic one just for testing): (SimpleMFRC522 source: MFRC522-python/SimpleMFRC522.py at master · pimylifeup/MFRC522-python · GitHub )
#!/usr/bin/env python
import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
try:
text = input('New data:')
print("Now place your tag to write")
reader.write(text)
print("Written")
finally:
GPIO.cleanup()
I'm guessing I need to include code in my read/write and registration script to authenticate first (giving the auth key) and if necessary (during write/read) giving a password (after I've set a password during the registration step).
I just have no idea which values or in which way I should give the auth key in script.
If anybody can help in any way or point me in the right direction that'd be great!