How to make 2 xbee's "chat" (TX & RX)?

Hi everyone

I was wondering if I could ask some suggestions to get me started with xbees. I currently have 2 xbee series 1 (each connected to an xbee explorer regulated), and two arduino Uno's. What I would like to do is simple: set up the xbee's so that they can talk to each other.

In other words, I would like for xbee A connected to Arduino A to be able to transmit "Hello, Arduino B!" wirelessly, and for Xbee B connected to Arduino B to receive the text. Then, arduino B would transmit "Hi! How are you, Arduino A?" via xbee B, and this message be received by xbee A.

The set up would be:

Arduino A -- Xbee A ------ "Hello, Arduino B!" ----------------------> Arduino B -- Xbee B
Arduino B -- Xbee B ------ "Hi! How are you, Arduino A?" -----------> Arduino B -- Xbee B
etc etc.

I'm sorry if this sounds trivial, but I've been looking at various places (almost all talk about 1-way data transmission), and I've been getting very confused. That's why I would like to ask others about their experiences in the hopes to get ideas and possibly examples on how I could achieve this.

Thanks!!

I was able to find some valuable resources that talk about how to configure the xbees (CommunityOfRobots.com is for sale | HugeDomains and Using two Xbee/Arduino combos to send data to one Xbee/Explorer? - Networking, Protocols, and Devices - Arduino Forum), but there is no "chat" code examples available. Only 1-way data communications :frowning:

but there is no "chat" code examples available. Only 1-way data communications

Because the XBees are not kindergartners. They know that only one can talk at a time.

On one Arduino, Serial.println("Hey, there Joe"); will cause the attached XBee to transmit that string over the air.

If there is another XBee around, configured to use the same PAN ID, and configured to accept messages from the first XBee (DL = the other XBee's MY), then it will receive the data and put it in the Arduino's serial input buffer (for whichever mechanism is being used to collect data from the XBee). You would then use Serial.available() and Serial.read() to read and store the data until the end of packet marker arrives (the carriage return and/or line feed; ignore the other). Then, parse that data and return the appropriate reply, using Serial.print() (or the software serial equivalent).

You haven't provided near enough information to help you. The configuration of the XBees, how they are attached to the Arduinos, any code...

Hey Paul

thanks... your description of how to set up the xbees really helps. It was a bit tricky at first as I was reading through the different posts, but I now understood how they work. I am still in the process of getting the serial exchanges working, but I think I'm slowly getting there. My apologies that I wasn't more specific earlier... the xbees are point-to-point configurations, they are xbees pro series 1 (the "easy" ones to configure). I'm starting to make one say something to one, and the other be able to hear it. The next step will be to put it all in one. Thanks again!