Stable XBee connections

I'm using 2 Arduinos with XBee shields to communicate with a Mac running Max5 connected to a Sparkfun Xbee Explorer usb adapter.

Sometimes I notice that the connection is lost. I then reopen my Max patch or reset the Arduino, and everything is fine again. This thing will be part of an installation that runs during the day and is switched off at night. As with any installation I have to make sure it runs as stable as possible.

This is the first time I'm using XBee and I'm wondering what precautions and steps I can take to ensure maximum stability of the XBee connections with the computer. Are there any special settings or things I need to be aware of? What could be the cause for my current setup to have an unreliable connection? Any common pitfalls?

Bet your computer is going to sleep mode to save power.
Xbee also has a sleep mode.

Sorry, but Xbee is only normal reliable. Do not use >5 1st gen units, and do not use encryption (thruput goes to pot quickly). These are normal teething troubles with new technology. I read 2nd gen meshnet is also poor with >5 units.

Already Xbee has 2 generations, soon to be more.

Some have reported better results(faster) using MicroChip ZigBee and custom networking stacks.

My biz partner went to conference for SmartGrid, we know more about zigbee than they did (and they supposed to be industry experts).

(Respectfully: ) I do not agree with the first reply.

To begin with, the XBee Series 1 and Series 2 (2.5) should not be thought of as "2 generations". Series 1 XBees are not old, inferior XBees, but rather a different type.

It may be true that you'll run into problems with more than 5 XBees trying to work in the same network: I've never tried it. But if "only normal reliable" is supposed to suggest that XBees are not reliable, again I disagree. I suspect that the dropout problem you're having has to do with software, not with an unreliability inherent in the XBee modules.

I'm afraid I know nothing about Macs, and you haven't really described your setup in detail, so I don't have any advice about how to make it more reliable.

Hi,

Thanks for the advise so far, even though you two don't agree:) It's good to know at least that >5 is asking for trouble.

I'll give a little more details about my current setup.

I'm using 3 xbee series1 (1mW) modules.

I have a computer connected to one module. I use Max5 with a "serial" object to talk to a the Xbee module with FTDI drivers (Sparkfun Xbee Explorer). This module is used to send and receive data from the 2 other xbee modules.

The 2nd module is driving 9 channels of DMX to control lighting. And returns data from 2 sensors it is polling.

The 3rd module is connected to a motor shield with 2 servos and does little more then switching on/off the internal loop for driving the servos, so there's very little communication going on.

I've currently set up the modules so that the computer module can talk to the 2 other modules, but those don't talk to each other. This to prevent that the sensor and dmx data of module 2 is also received by module 3.

To do this I've configured the modules like this (using AT commands):

Mod1 (Computer)
MY A
CH E
DL B
Mod2
MY B
CH E
DL A
Mod3
MY B
CH E
DL A

I also tried to increase the baudrate from 9600 to 57600 but I couldn't get the Xbee's to work at all so I switched back to 9600.

Is a lower baud rate more reliable anyway?

Is there an alternative to xbee which is more reliable? (bluetooth?)

Thanks in advance for any advise.

Cheers

I had trouble with xbee series 2 modules, after I got them running and communicating they would work fine until they were turned off and back on, then they would not find each other.

I was using them as zigbee coordinator at and zigbee end device at.

When I changed to znet coordinator and end device (at) they seem to work fine (at this stage) don't know if that will help but that was my experience.

It turned out that my problem was a combination of 2 things.

The main one was that I was sending too much data, apparently overflowing the RX input buffer. The standard USB connection could easily handle the amount of messages, but the XBee could not. The Messenger library which I used for Arduino makes it really tempting to use human readable strings, but for the XBee it turned out to be overkill literally. I kept using Messenger, but with minimal character count in my messages.

The second problem was that the higher baud rate was causing the data to be corrupted. Both 115200 and 57600 would corrupt the data. The maximum baud rate which seemed ok in my configuration was 38400 bps.

I don't know if the bottleneck was really the xbee or the configuration of the different components. I need to delve into the RX buffer and Xbee setup some more I think, but I'll leave that for a different thread.