I think I found a bug in the HardwareSerial.cpp Library.

My version of IDE 1.5.6-r2

It’s at line 75:

  if (Serial3_available && serialEvent2 && Serial3_available()) serialEvent3();

Should be

  if (Serial3_available && serialEvent3 && Serial3_available()) serialEvent3();

Thank you :slight_smile:

Thank you Coding Badly, I did not really know where to post this.

Looks like they where onto it. Some big changes to the source for 1.5.6.

The current source has been fixed.

void serialEventRun(void)
#if defined(HAVE_HWSERIAL0)
  if (Serial0_available && serialEvent && Serial0_available()) serialEvent();
#if defined(HAVE_HWSERIAL1)
  if (Serial1_available && serialEvent1 && Serial1_available()) serialEvent1();
#if defined(HAVE_HWSERIAL2)
  if (Serial2_available && serialEvent2 && Serial2_available()) serialEvent2();
#if defined(HAVE_HWSERIAL3)
  if (Serial3_available && serialEvent3 && Serial3_available()) serialEvent3();

It's funny cause I never got to use Serial3, but I was out to find out how they call the serialEvent event, so I stumble on it.