Mega2560 XBee w/ Sparkfun XBee Explorer Regulated

I have several XBee's running using the Adafruit adapters, one coordinator and several end devices which works fine. So I decided to try the Sparkfun explorer on my Mega2560 to see if I could get into the network with the others. Didn't happen...The coordinator hears the Mega/XBee sending messages but the Mega/XBee can't hear the coordinator. When I hook the Sparkfun board up to XCTU, it hears the coordinator just fine and sends messages as well. I am stumped!

End Device Code

#include <SoftwareSerial.h>

#define TxPIN 18
#define RxPIN 19
#define bzero(b,len) (memset((b),'\0',(len)),(void) 0)

String Command;
SoftwareSerial xbeeSerial(RxPIN,TxPIN);

void setup() {
  xbeeSerial.begin(9600);
  Serial.begin(115200);
}

void loop() {
  int cnt = 0;
  
  Command = "";
  xbeeSerial.print("I AM HERE"); //this shows up on the coordinator
  while (!xbeeSerial.available() && cnt < 5) {
    Serial.println("not avail yet");
    delay(100);
    cnt++;
  }
  While (xbeeSerial.available()) {
    //Serial.print((char) xbeeSerial.read());
    Command += (char) xbeeSerial.read();
    Serial.print("serial available"); //Got command from Coordinator
  }
  
  delay(1000);                                      // Delay a bit...
}

I get stuck in the "While(!xbeeSerial.available())" loop, it seems like it never comes available, thereby missing the messages that ae send by the coordinator. Pins connected on the Sparkfun XBee board - GND, +5, DIN, DOUT. What am I missing???

Ya, I know, I can just go out and buy more of the Adafruit devices and you won't have a problem..But then it wouldn't be fun!

SoftwareSerial needs an interrupt capability on the RX pin, and D19 is not one of them. Use hardware serial instead. You have the right pins, so use Serial1 like this:

#define bzero(b,len) (memset((b),'\0',(len)),(void) 0)

String Command;

void setup() {
  Serial1.begin(9600);
  Serial.begin(115200);
}

void loop() {
  int cnt = 0;
  
  Command = "";
  Serial1.print("I AM HERE"); //this shows up on the coordinator
  while (!Serial1.available() && cnt < 5) {
    Serial.println("not avail yet");
    delay(100);
    cnt++;
  }
  While (Serial1.available()) {
    //Serial.print((char) Serial1.read());
    Command += (char) Serial1.read();
    Serial.print("serial available"); //Got command from Coordinator
  }
  
  delay(1000);                                      // Delay a bit...
}

SurferTim - thanks, forgot about the mega having multiple serial ports...Hope your watching the big surfing competition going on in CA. They have some big waves out there!

robfmcc:
SurferTim - thanks, forgot about the mega having multiple serial ports...Hope your watching the big surfing competition going on in CA. They have some big waves out there!

Actually I'm not. Besides being a surfer, I'm a science nerd too. Between answering questions here, I'm watching "The Great Debate - The Storytelling of Science" which features some of my science heroes including Neil deGrasse Tyson, Bill Nye, and Richard Dawkins.