From 9a2593d7d59c442afaf0f3fc2384fc1d9715addd Mon Sep 17 00:00:00 2001 From: Semaf Electronics Date: Sat, 1 May 2021 00:05:49 +0200 Subject: [PATCH] PCD_Authenticate last 4 bytes used Thanks to @cyp-git --- src/MFRC522_I2C.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MFRC522_I2C.cpp b/src/MFRC522_I2C.cpp index 9c4675b..7baa85d 100644 --- a/src/MFRC522_I2C.cpp +++ b/src/MFRC522_I2C.cpp @@ -816,7 +816,7 @@ byte MFRC522::PCD_Authenticate(byte command, ///< PICC_CMD_MF_AUTH_KEY_A or PIC sendData[2+i] = key->keyByte[i]; } for (byte i = 0; i < 4; i++) { // The first 4 bytes of the UID - sendData[8+i] = uid->uidByte[i]; + sendData[8+i] = uid->uidByte[i+uid->size-4]; } // Start the authentication.