RFID ERROR: PCD_Authenticate() failed: Timeout in communication

Hello guys,

Soo... i bought an RFID reader RC522 for a home project and i've played a little with it and i got some kind of error.
I uploaded the code for the RFID DUMP READER to read the dump files ( dumb/ dump ?).
And i got 2 cards not tags. Both are mifare 1kb but from one i can read the dumb/dump files and from the other i got this error :

PCD_Authenticate() failed: Timeout in communication

on every row of the bytes.

The card with the error is ( i think ) is formatted like ndef?
I found these :

So can i do something to read the dumb files from the card or anything without UID and version ?
Thank you

Bump

(Does anybody know why ? Thanks)

dumb/ dump

dumb - means stupid
dump - to transfer from one place to another - This is the one you want.

PCD_Authenticate() failed: Timeout in communication

When you read the data in a Mifair card you need an authenticate code. In a blank card this defaults to six bytes of 0xFF. Have you put this in to the dumping program somewhere?

It could be the card has been used before and someone has written encrypted data on it. Does it happen on all sectors?

Hello and thank you for the answer.

Yes the "PCD_Authenticate() failed: Timeout in communication" happens every sector, i will check again today.

And if it's encrypted i can't somehow decrypt it ? ( i don't think i have a 'decryption key' )
And if i get that key how do i apply it and decrypt it since i can't read any dump file. (?)

Now i'm pretty curious what was on that card.
Any idea of decryption ?
It's .HEX isn't it ?

if i can't decrypt, i guess i can't 'clone' it and paste it to a new card...

Thank you again.

And if it's encrypted i can't somehow decrypt it ?

No that is the point of data on a card. If you could do this easily then you would be able to get free transport tickets for life in many parts of the world.

Any idea of decryption ?
It's .HEX isn't it ?

No. You pass the decryption key in the call you make to read the sector. The default as I said is six bytes of 0xFF. Have you put this in to the dumping program somewhere?

Can you read the UID from the card? That first sector is not protected.

Mhm, so the transportation system got a card like that but with a key (for dectypt), right ?
What if i got that key ? :)))
I guess the one that made them knew that (for example, i don't know the key, but maybe my friend can remember it)

And yes i can read the UID of the card (the HEX & DEC i guess) and the type of the card. (Mifare 1kb ~kinda)

I'll try tomorrow something new.

P.S. I read on other forums that the card is formated ndef ? something like that and not encrypted ? is that real ?

Thank you for answering me.

P.S.S How does the transport companies change the card, or clone them?
Like, we got some kind of dispenser where you put money and that adds points for transportation :?
looks simple but they got that key or ?

That's very interesting, i would like to know more but just untill the legall point, becouse it could be kinda ilegal to know how to put points on cards, but awesome :))))

Thanks again.

. I read on other forums that the card is formated ndef ? something like that and not encrypted ? is that real ?

You might want to read this Mifare classic 1k and NFC communication protocol - Stack Overflow

Ok, so i need the decryption key...
Can't decrypt or see anything without it ? (no UID... ) :slight_smile:

Grumpy_Mike:
You might want to read this Mifare classic 1k and NFC communication protocol - Stack Overflow

and if i have the decryt code ? how do i read the card using it ?
Since the error is "PCD_Authenticate() failed: Timeout in communication"
and not security error,,, or ?

Thanks

You said that you could read the UID? You do not need a key for that.

I think it is time you posted your code, you seem not to know where in it is the encription key. Please use code tags, read the how to use this forum sticky post.

I have the same Problem.

My Tags worked before, but after i wrote something on them with a smartphone app, they only show this "error".

So my question is: Is there any possibility to reset the tag as if they are factory fresh?

fusionftw:
I have the same Problem.

My Tags worked before, but after i wrote something on them with a smartphone app, they only show this "error".

So my question is: Is there any possibility to reset the tag as if they are factory fresh?

You do not got the same problem. Yours is completely different.

There is a example included in the library. FixBrickedUID. You could try it and see if it solves your problem.

my question is: Is there any possibility to reset the tag as if they are factory fresh?

My answer is no their is not any possibility of resetting a tag.

how to solve the
"PCD_Authenticate() failed: Timeout in communication.
"

Put in the correct Authentication numbers.

Because this is (currently) the top Google result for RFID ERROR: PCD_Authenticate() failed […] and appears to be a frequently-viewed post, I wanted to post an explanation of an unrelated but very simple reason for this error appearing that I suspect may be fairly common (especially for anyone just getting started with RFID, following a tutorial and/or using an example file as I was).

Quite simply, the console dumps information from a card or tag while it is reading it, so you need to keep it in close proximity while the dump completes.

Since my experience with RFID cards has always been as an end-user, I was accustomed to only needing to momentarily "tap" a card or tag near a reader for it to perform an action like unlocking a door and mistakenly assumed this would be no different. Note that removing the card from reading distance early may also result in a MIFARE_Read() failed: Timeout in communication. message (mentioning for searchability). Hope this helps others. Cheers.

I solved my issue. I add my solution on the end of my posting.

Alright, since i am running in the same issue as the thread opener i'll try to supply all the code i used so far.

To change the keys on one of my tags i used the code from this page. All i changed were the pins as i am using an ESP32. Everything else is exactly the same.

If i use the rfid_default_keys example of the MFRC522 library, i always get a success with key 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF. I've tried it for every block so i uploaded it 16 times....

But if i use the read_personal_data example with the key 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF i always get the PCD_Authentication() error.

I don't know why and i don't know how to fix that.

Can you guys and girls on here assist me please.

Thank you.

Solution:
I added both keys that were written into the card at the beginning and modified the routine for changing the keys to use both of them. I also replaced key a and b with the factory defaults. After running that sketch once the read_personal_data sketch worked without any issues. The modified sketch is attached so it might help some others in here.

Downloadlink

Meu amigo
É so você deixar o cartão junto ao leitor que o erro não vai ocorrer.
É provavel que você esteja passando o cartão e retirando antes de escrever no mesmo.
Espero que te ajude.

Google translate of @Rogtel's reply:

My friend
Just leave the card with the reader and the error will not occur.
It is likely that you are swiping the card and removing it before writing on it.
I hope it helps you.