Closed dorindabassey closed 5 years ago
uhh, I actually changed authentication key from sector 2 to sector 15
so how can I gain access to my cards with my new authentication key
thanks in advance
you need to authenticate to block with new key, if you do not know what is the new key you write, throw chip away and start with new one :)
okay, so I know the new key, please how do I authenticate the block with the new key thanks
here is how I define my key
MFRC522::MIFARE_Key key;
// for (byte i = 0; i < 5; i++) key.keyByte[i] = 0xFF;
key.keyByte[0] = 0xFF;
key.keyByte[1] = 0xFF;
key.keyByte[2] = 0xFF;
key.keyByte[3] = 0xFF;
key.keyByte[4] = 0xFF;
key.keyByte[5] = 0x77;
if you cannot understand that part, should move your question to arduino forums for complete solution
okay thanks, well, I made some changes like this
void loop() {
// Prepare key - all keys are set to FFFFFFFFFFFFh at chip delivery from the factory. MFRC522::MIFARE_Key key; for (byte i = 0; i < 6; i++) key.keyByte[i] = 0xCC;//my new authentication key
//some variables we need byte block; byte len; MFRC522::StatusCode status;
//-------------------------------------------
and when I tried to execute the readpersonaldatafromtag example I edited, it still showed authentication failed
*my new authentication keys were set to 0xCC
changing auth key is a bit tricky, when you write new key there is some access bits that need to be set in proper way, if you do not do that correctly, sector got bricked. So I suggest you start read something about mifare 1k documentation before start playing with authentication keys
😢 thanks, but am not satisfied, I don't think the sector is broken😕, I'll read some more though
what code you use to set new authentication key?
Well I never used that function, I was writed my own, but on different platform to change keys. I'm not sure if that function set properly access bits. You can play with another sector/block and experiment before throw chip on garbage, you have 14 more sectors to brick :)
meanwhile I was starting to looking for alternative library since this one cannot hangle some readers.
HI, thanks so much, for (byte i = 0; i < 6; i++) key.keyByte[i] = 0xCC;//my new authentication key
this did the trick, the problem was my code, I was busy trying to read block1 that had a different authentication key, but now I've changed all my sectors from 1 to 15 authentication key to 0xCC and am good to go. thanks😃.
good, now close that issue please
oww. I thought I did thanks
hi, am a newbie but I've been read about rfid tags for sometime now, my issue is-
i used the changekey example code to change the authentication keys of my rfid cards now i can't access the block where i changed authentication key, so i tried to run the dumpinfo example code and it shows