RDM 6300 + Arduino 2560

Hi,
I have a problem that I consider absurd :frowning:
I have an Arduino UNO configured with a RDM 6300 and works PROPERLY
When I go to replace the RDM 6300 to Arduino MEGA 2560 with the SAME configuration but it does not work, it's incredible :frowning: but why?
I am attaching a picture and code.

Please help, I'm going crazy for this :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:
Thanks in advance.

********** THE CODE **********

// RFID
SoftwareSerial rfidReader(2,3); // Digital pins 2 and 3 connect to pins 1 and 2 of the RMD6300
String tagString;
char tagNumber[14];

void setup() {
Serial.begin(9600);
rfidReader.begin(9600); // the RDM6300 runs at 9600bps
Serial.println("AVVIATO");
}

void loop() {
while (rfidReader.available()){
int BytesRead = rfidReader.readBytesUntil(3,tagNumber, 15);//EOT (3) is the last character in tag
tagString=tagNumber;
Serial.println();
Serial.print("TAG=");
Serial.println(tagString);
Serial.write(255);
delay(2000);// a delay of 1500ms and a flush() seems to stop tag repeats

rfidReader.flush();

memset(tagNumber,0,sizeof(tagNumber)); //erase tagNumber

}
Serial.println("CONTREOLLO");
delay(2000);// a delay of 1500ms and a flush() seems to stop tag repeats

}

*********** IMAGE ******************

Software Serial has limitations on the Mega:

Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).

Suggest you use on of the other hardware serial ports, Serial1, Serial2, Serial3, on the Mega instead.