I am getting error while connect RFID with esp32, can anyone help to solve this problem

c:\Users\Acer\OneDrive\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'MFRC522::StatusCode MFRC522Extended::TCL_Transceive(TagInfo*, byte*, byte, byte*, byte*)':
c:\Users\Acer\OneDrive\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:824:34: error: ordered comparison of pointer with integer zero ('byte*' {aka 'unsigned char*'} and 'int')
824 | if (backData && (backLen > 0)) {
| ~~~~~~^
c:\Users\Acer\OneDrive\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:847:42: error: ordered comparison of pointer with integer zero ('byte*' {aka 'unsigned char*'} and 'int')
847 | if (backData && (backLen > 0)) {
| ~~~~~~^

exit status 1

Compilation error: exit status 1

#include <SPI.h>
#include <MFRC522.h>

#define RST_PIN         22          // Configurable, see typical pin layout above
#define SS_PIN          21        // Configurable, see typical pin layout above

MFRC522 mfrc522(SS_PIN, RST_PIN);  // Create MFRC522 instance

void setup() {
	Serial.begin(9600);		// Initialize serial communications with the PC
	while (!Serial);		// Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
	SPI.begin();			// Init SPI bus
	mfrc522.PCD_Init();		// Init MFRC522
	delay(4);				// Optional delay. Some board do need more time after init to be ready, see Readme
	mfrc522.PCD_DumpVersionToSerial();	// Show details of PCD - MFRC522 Card Reader details
	Serial.println(F("Scan PICC to see UID, SAK, type, and data blocks..."));
}

void loop() {
	// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
	if ( ! mfrc522.PICC_IsNewCardPresent()) {
		return;
	}

	// Select one of the cards
	if ( ! mfrc522.PICC_ReadCardSerial()) {
		return;
	}

	// Dump debug info about the card; PICC_HaltA() is automatically called
	mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}

pin info
ESP32 RC522

18 SCK

19 MISO

21 SDA

22 RST

23 MOSI

GND GND

3v3 3v3

Show your full error log using the < CODE > block button.

  1. In your IDE, copy your full error report.
  2. On this forum, edit your original post #1 (click the "pencil" below your post)
  3. Delete the contents of this post #1 from the message box
  4. Click the < CODE > button in the message box
  5. Where you see ```type or paste code here```, paste your error code.
  6. Click Save Edit

These errors are from your code, lines 24 and 47, trying to compare a character array (*backData) to an integer (backLen).

Post your full code here, inside a code block (following the instructions in post #2).

on ESP32 microcontrollers I have used the Arduino_MFRC522v2 library on both VSPI and HSPI
the program File>Examples>RFID_MFRC522v2>CheckFirmware is a usful check that the RFID module is connected and working OK

How are you wiring up your RFID reader?

Most web sites get this wrong. Please supply a schematic of all your wiring and components.

It working but this library don't have the sample to read and write the balance in rfid. I want to used as a payment system, but i don't know how to coding

You can read and write to the sectors with a 2K Myfair card, the most popular card with this reader. There is an example in the library showing a sector dump.

It is one or more of these sectors you use to hold variable data, like your balance. You have to write code to manipulate the data in the sectors to keep your balance up to date.