Should I be able to perform a loopback test with SoftwareSerial?

I'm running the SoftwareSerialExample unmodified. I connect pin 10 to pin 11 and open the serial monitor. For reference, here is the loop function:

  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());

I expected that if I type anything on the serial monitor input line, it would show up in the serial monitor output area. Instead, I get nothing.

I read the limitation that only one software serial port can be read at a time, but I'm only using one.

What am I doing wrong?

Should I be able to perform a loopback test with SoftwareSerial?

No. SoftwareSerial is strictly half duplex. You can read. You can write. But you cannot do both at the same time.

Thanks. I just realized that in the middle of the night. It's interrupt driven, and ATMega has only 1 level of interrupt.

Thanks again, Michael

I just realized that in the middle of the night. It's interrupt driven, and ATMega has only 1 level of interrupt.

That's not completely correct, higher level interrupts are just deactivated by default on the ATmegas. But even if you have more than one interrupt level the processor can do only one thing at a time and with the way SoftwareSerial is programmed you'll never get it full duplex.