Hi Guys i am using a arduino uno and MFRC522 to read and write from and to a card
but when i want to change the key i need to specify a specific sector so i used the
'for' Command and i get a PCD_authentication failed
the small piece of code where i get error is
for (int i = 1; i < 16; i++){ // 16 is to encrypt all sectors which are 15 including 0
if (!MIFARE_SetKeys(&key, &key, &newKeyA, &newKeyB, i)) {
Serial.print("Block Not Encrypted: ");
Serial.print(i);
Serial.println();
}
}
i do not want to encrypt sector 0 as it has its own unique key
how do i solve this