I cannot get two Arduinos to communicate over Xbee, even though they work properly using xctu.
2 xbee pro s2b devices after firmware update and factory default
2 xbee shleld(sic) v03 (also tested with arduinoxbee v1.1 shield from libelium)
2 arduino unos
Device one setting changes
Function: Zigbee Coordinator AT
PAN ID:2015
Serial Number High: 13A200
Serial Number Low: 40F327E0
Destination Address High:13A200
Destination Address Low: 40F327D6
Device two setting changes
Function: Zigbee Router AT
PAN ID:2015
Serial Number High: 13A200
Serial Number Low: 40F327D6
Destination Address High:0
Destination Address Low: 0
In the xctu console window, anything I type sends from one of the Xbees to the other without incident. If I have one xbee connected to the xctu software,
and the other device connected to my arduino running code, it works perfectly. I can happily send and receive the signals I expect from the arduino and monitor it from the software.
To be specific, I send 001001 to tell it to turn on a light from xtcu. It turns on. I hit a switch on the arduino to say the light is off, and I get 001002 that
says the light is off. I can do this for either device, so it isn’t one of the devices. Now, when I connect the Xbee to both arduinos the arduinos appear to send the signals they are supposed to be sending, but they never receive or process the signal on the other end. I believe this because I can watch the devices with the serial monitor and they are indeed sending out, based on the documentation they send both out the usb and the xbee serial, the signals I expect. I can also see the tx light on the arduino flash when I trigger a signal. On the receiving end, it does nothing. I have been at this problem for 20 hours and I just cannot figure out what I’m missing. Any help is greatly appreciated!
//example read. Serial.begin(9600); is set in setup()
if(Serial.available() >0)
{
transmission = Serial.readString();
if(transmission==“something”)
{
//do something
}
}