I've been trying to get this working for a while now. I've been reading the Building Wireless networks book and have got the two Xbees working via X-CTU. So I know they are configured properly and are talking via that protocol .

When I hook them up to my Arduinos though I can't seem to get it working as expected. I can see via the Xbee leds that they are communicating / associated but when listening to the serial port I don't receive anything. I put a simple test to turn on a LED when receiving some data and no luck . I've tried a heap of different code with no luck.

My objective is to have the seeduino out in the garden in report moisture and temp readings. The etherten with relay shield and xbee shield will receive this data and trigger the relay and turn on/off a water valve depending on the readings.

The I have the Seeduino transmitting "D" via serial BR 9600 every 5 seconds atm to test it. I can see the 2nd Xbee to associating with the Xbee on the Seeduino when it sends the "D" every 5 seconds.

Your right there is no loop in that code snippet. It wasn't the full set of code. It would not compile with out that.

When you say that I'm using the hardware serial port == fail. What do you recommend to use?

I feel I'm missing something basic here because all the stuff I have read it should work. I can see via the Xbee status that they are associating and if I hook the Etherten xbee via USB to X-UTU it is receiving the "D"

Also if I hook up via USB and type in "D" the LED turns on so I know the code is right (logic wise).

'Serial interface - To save space and lower costs, USB<->Serial connectivity is not provided by default. You may use the FT232 based UartSBee or other USB to serial adapter boards to do the programming or communicate with the PC.'

1. with your setup, are you using any kind of USB device [FTDI cable or FTDI Friend, etc], or making comms via XBee only?

2. unless something is funny with the Stalker design, you should not be using SoftSerial at pins 0,1 because those pins are wired to the hardware UART of the Arduino, accessed via Serial.begin(9600); and other Serial.xxx functions. Therefore, having both

Serial.begin(BaudRate); mySerial.begin(BaudRate);

kinds of statements in the same sketch will cause a conflict between Serial and SoftSerial.

3. Similarly, where you are using SoftwareSerial on pins 2,3, what is connected to those pins on the header? Normally, they're just open.

4. I assume in your Receiver sketch where you have Serial and SoftSerial, you are trying to use one of those ports as a debug port? Do you have something [FDTI cable or Friend] connected to J2 on the Receiver board?

1. with your setup, are you using any kind of USB device [FTDI cable or FTDI Friend, etc], or making comms via XBee only?

Only via XBee.. just use USB to program it then remove them. Running off battery on the Seeeduino and mains on the Etherten Arduino

2. unless something is funny with the Stalker design, you should not be using SoftSerial at pins 0,1 because those pins are wired to the hardware UART of the Arduino, accessed via Serial.begin(9600); and other Serial.xxx functions. Therefore, having both

Serial.begin(BaudRate); mySerial.begin(BaudRate);

kinds of statements in the same sketch will cause a conflict between Serial and SoftSerial.

I changed to 2,3 on both units to avoid conflicts.

Also made Serial 9600 and myserial 4800 on both ends (Seeeduino and Etherten)

3. Similarly, where you are using SoftwareSerial on pins 2,3, what is connected to those pins on the header? Normally, they're just open.

Nothing connect on either ends on these pins. I tired different pins also

4. I assume in your Receiver sketch where you have Serial and SoftSerial, you are trying to use one of those ports as a debug port? Do you have something [FDTI cable or Friend] connected to J2 on the Receiver board?

3. Similarly, where you are using SoftwareSerial on pins 2,3, what is connected to those pins on the header? Normally, they're just open.

Nothing connect on either ends on these pins. I tired different pins also

I checked about the Etherten board, I have not seen it before.

http://www.freetronics.com/products/etherten#.UKpwPOTBGfU

I assume this is where your problem is, as it has a USB chip onboard and that is hardwired to the RX,TX pins and Serial.xxx functions, so you have to use SoftSerial on that board for the XBee. The problem is now you have to connect the XBee module to the pins used by SoftSerial, rather than to Rx,TX [pins 0,1] default.

Does your XBee shield allow you to do that? From what I've seen, all in all, most XBee shields are not very well designed to deal with these problems.

'The serial pins (DIN and DOUT) of the XBee are connected through an SPDT switch, which allows you to select a connection to either the UART pins (D0, D1) or any digital pins on the Arduino (D2 and D3 default).'

Then, flip the switch and try using SoftSerial on pins 2,3 - or 3,2 - it's easy to get the wrong ones, crossed.

Also, you need to check the shield you have has 3.3V to 5V level shifters on the Rx,Tx lines from the Arduino to the XBee, as it's a 3.3V device. Some of the olderSparkfun shields were deficient on this aspect.

Good thinking, your pictures show so many wires, it looks like you may have gotten ahead of yourself in hooking everything up before the various pieces were all tested individually.

I looked at the schematic for the Sparkfun XBee shield you linked. Like most Arduino world schematics, I find it to be totally bizarre.

IE, the headers on the board are not labelled at all, and JP1-1..6 on the schematic no doubt refer to pins 2..7 on the unlabelled header. Also, there are no 5V - 3.3V level-shifters. I swear they must have4-yearolds designing these things. In any case, that's no doubt clearly a big problem you're having.You'll likely damage the XBee module connecting 5V to the Din pin.

Some other companies, like Adafruit, sell properly-designed XBee shields.

The other problem is, people always have trouble trying to do debugging and XBee comms simultaneouslyon -UNO style boards, which have only 1 hardware UART. You have to use SoftSerial, and it's never worked well for me. All in all, it works better to jumper the XBee module to pins 0,1 [through level-shifters].