Comments on: ESP32 with MFRC522 RFID Reader/Writer (Arduino IDE) https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Mon, 24 Mar 2025 11:52:25 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Mark https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1011682 Thu, 27 Feb 2025 22:30:38 +0000 https://randomnerdtutorials.com/?p=163493#comment-1011682 In reply to jack.

Jack – from my investigations I think the RC522-based Sensor Module does not connect the pins of its controller chip such that I2C would work, even though the chip itself is listed as having this capability. It might be possible to perform surgery on the board to make it work but I have not tried that.
I found the above information here so you can look for yourself and make sure I am not misunderstanding something.
Look for Adrianotiger post #4 on Mar 2023 on https://forum.arduino.cc/t/esp32-rfid-rc522-i2c/1100200/3

]]>
By: Juergen https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1009143 Wed, 19 Feb 2025 09:13:00 +0000 https://randomnerdtutorials.com/?p=163493#comment-1009143 Hello,
when compiling the example “Write/Read Personal Data to and from the RFID Card” I get the error message “Compilation error: ‘MIFARE_Key’ in ‘class MFRC522’ does not name a type”
I am using version 2.0.4 of “MFRC522v2”

Juergen

]]>
By: jack https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1008593 Mon, 17 Feb 2025 12:11:51 +0000 https://randomnerdtutorials.com/?p=163493#comment-1008593 I have an ESP32-S3, and i am trying to get this working for I2C. But i am not receiving any signal on the card.
Please see my code

#include <Wire.h>
#include <MFRC522_I2C.h>

#define SDA_PIN 8
#define SCL_PIN 9
#define MFRC522_I2C_ADDRESS 0x28 // Adjust if needed based on your scanner results

MFRC522_I2C mfrc522(MFRC522_I2C_ADDRESS, 0xFF, &Wire); // Instance with I2C address and reset pin

void setup() {
Serial.begin(115200);
while (!Serial) delay(10);

Serial.println("Starting I2C MFRC522...");
Wire.begin(SDA_PIN, SCL_PIN);
Wire.setClock(400000);

Serial.println("Initializing MFRC522...");
mfrc522.PCD_Init(); // Just call PCD_Init(), no return check
Serial.println("MFRC522 initialized successfully.");
}

void loop() {
Serial.println("Checking for card...");
if (!mfrc522.PICC_IsNewCardPresent()) {
delay(500);
return;
}

if (!mfrc522.PICC_ReadCardSerial()) {
Serial.println("Failed to read card.");
delay(500);
return;
}

Serial.print("Card UID: ");
for (byte i = 0; i < mfrc522.uid.size; i++) {
Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? "0" : "");
Serial.print(mfrc522.uid.uidByte[i], HEX);
Serial.print(" ");
}
Serial.println();
delay(2000);
}

]]>
By: Rui Santos https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1007887 Fri, 14 Feb 2025 14:01:31 +0000 https://randomnerdtutorials.com/?p=163493#comment-1007887 In reply to angel.

What exactly is not working?

]]>
By: angel https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1007527 Thu, 13 Feb 2025 06:34:53 +0000 https://randomnerdtutorials.com/?p=163493#comment-1007527 i had uploaded the code and pressed reset button ,but it doesn’t working

]]>
By: MK https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1007303 Wed, 12 Feb 2025 10:27:04 +0000 https://randomnerdtutorials.com/?p=163493#comment-1007303 In reply to Sara Santos.

Thank you

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1007297 Wed, 12 Feb 2025 10:19:06 +0000 https://randomnerdtutorials.com/?p=163493#comment-1007297 In reply to MK.

Hi.
Maybe you need to try another ESP32 board.
Regards,
Sara

]]>
By: MK https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1006836 Mon, 10 Feb 2025 13:46:42 +0000 https://randomnerdtutorials.com/?p=163493#comment-1006836 In reply to Sara Santos.

Hello,
Thanks for responding,
I pressed the reset button but it did not work.
I think the problem is in my ESP32, my variant is the ESP-WROOM-32D.
I tried everything, including changing the baud rate and downloading correct UART bridge drivers.
I tested the UART bridge driver with PUTTY application but PUTTY was unable to access the bridge. It responded with a authentication error.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1006544 Sun, 09 Feb 2025 09:42:29 +0000 https://randomnerdtutorials.com/?p=163493#comment-1006544 In reply to MK.

Hi.
That message is normal after uploading the code.
Open the Serial monitor and press the ESP32 reset button.
Regards,
Sara

]]>
By: MK https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/#comment-1006305 Sat, 08 Feb 2025 12:58:20 +0000 https://randomnerdtutorials.com/?p=163493#comment-1006305 Hello, I uploaded the code, it did not go past the ‘hard resetting via rst pin’ part, it was stuck there, I did not recieve any output in my serial monitor

]]>