Mifare RFID-RC522

Hi... I'm newbie to arduino.

I've got a Mifare RFID-RC522 reader -writer. With some examples I found on the internet I managed to read the serial number of the cards, but ... Anybody can explain like a fool how I can write and read data on the cards? or Where I can get examples to do?

Thanks in advance.

Check this sketch: https://github.com/rena2019/myarduino/blob/master/RC522DumpMifare.ino

Thanks Rena... But this example is more complex for me. Do not exist any library for read-write data more simple?

Greetings.

┬┐Nobody? :~

Oso57: But this example is more complex for me. Do not exist any library for read-write data more simple?

Greetings.

to complex? The sketch is a one-file-solution: the lib-functions to talk to the board are included, that's why it looks so complex. You can replace the loop function with the following (untested) code:

void loop() { uchar buffer[MAX_LEN]; int block=0; //TODO: your block number if (selectCard(true) && MFRC522_Auth(PICC_AUTHENT1A, block, defaultKeyA, serNum) == MI_OK && MFRC522_Read(block, buffer) == MI_OK) { //TODO: block buffer contains the read data } }

if you want to read 1 block only

Hi, I've test the code and it's working. i can read all block of the Token.

So, now the question is : can you explain the use of the function Auth, we need to send defaultKeyA table, what is the content of the table ? what this table is it?

Thank you. Timiti29

Hello...

Thanks for your kindness

And to write? I can not find the way

Greetings.

Oso57: And to write? I can not find the way

Fill the buffer with the data you want to write and then use MFRC522_Write instead of MFRC522_Read from my sample code above (select,auth,write)

Thanks again for your kindness.

I am learning.

Greetings