Arduino program failed when xbee s2 is plug with funduino shield

First post on this forum

I have followed a simple example on arduino’s forum to light a led when pushing a button. It work well. I have included in this program a message to send via Xbee modules to test my connection When I plug on my Arduino the Xbee module (standard S2) using funduino xshield, after few seconds the program fails, the led doesn’t light when pushing the button. If I reset, it works untils xBee initialization it completed and then not work.
Is it a pb of hardware compatibility ? should I change my shield ?
Here’s my program :
int LED=12;
int BUTTON=4;
SoftwareSerial XBee(2, 3); // RX, TX
void setup() {

void loop() {
if(digitalRead(BUTTON) == HIGH)
XBee.write (“ON”);
} else {
XBee.write (“OFF”);


thks for your help I

Do you have your XBee modules with the API code and one of them Coordinator API?

yes, the modules plugged on the Arduino is configured as router API and the one linked to computer is Coordinator API. The two modules can communicate, I have launched successfully a range test .

Can you verify that your router is associated with the Coordinator? You can do that by checking the CH, AI, II and ID values. They should be the same on both radios.

I will verify tomorrow, hardware is as office… But if coordinator and router have not the same values how can I have succeded to perform range test ?

Due to a bug in the EM250 processor, you can be 12 channels off and communicate and then only part of the time. Yet it will shows as associated. That is why the SC value is not using all possible channels on the S2 and S2PRO modules.

All the parameters are the same, AI=0 CH=16 and I have specified the same PAN ID for the two modules.
I didn’t find II parameter, what is it ?
One thing I didn’t specify : on my Arduino’s shield it’s written “XBEE PRO” and my xbee module is Standard S2.
I read that there’s interoperability between PRO and Standard Version …

Yes they are inter-operable.

The II command is a hidden command. You must access it via the ATII command direct via AT command mode or from the proper API frame on the Coordinator.

From the sounds of it, the nodes are associated so it must be an addressing issue. Make sure that your Destination address high is equal to 0x0013A200 and not 0x13A200.

I just checked II parameter
on coordinator side : AT II return FFFF
on router side : AT II return ERROR ! and if it try
AT IIFFFF I still have error I’m not able to set the value.

That is because II is a Coordinator only command.

Have you verified the DH value yet?

Have you connected to the two radios to a PC and simply ran a range test to eliminate the radios?