Advice for network of 3 radios

I’m trying to figure out the most robust way to set up a network of 3 (and
perhaps more) xbee 900 pro x3b 9600 radios. This would service an existing
water monitoring system.

I currently have a single remote station (site #1) at the water tanks that gathers
data from a variety of sensors. The station runs off an arduino mega and aggregates
the data for subsequent download to an iPhone app I wrote. If I’m away, the data
may persist for up to 2 weeks before download.

With the bee’s I’d like to accomplish 2 things:

  1. Add a remote sensor at the pump house so I know exactly when and for how long
    the well pump is running. This would be site #2.

  2. Download the data automatically from #1 to my house at site #3

Note that the sites are in a wooded hilly area. I did a simple test to see if
the radios will actually work and I get a reasonable signal between #1-#2 and
#1-#3. I used simple broadcast between all the sites and did see that the
data did contain some errors.

Since from the xbee documentation, broadcast communications are not error checked or
acknowledged, I need to set up the radios for more robust communications. This will
mean using an actual “destination address” (not broadcast) and setting up retries, etc.

The problem is that the radio #1, at the main remote station, needs to request data
from #2 and then send it to #3. This means that radio #1 needs point-to-point to 2 different
radios.

I see 2 solutions:

  1. Add code to #1 so that it changes the “destination address”, using the “ATDT”
    xbee command, depending on whether it is requesting data from the pump house (#2) or
    sending data to the house (#3). I’ve already got arduino code that allows me to read
    the signal strength (“ATRS”) but this seems like a hack.

  2. Although the documentation flow charts are awful (there is no entry point specified!),
    it seems like I might be able to play around with the address mask so through careful
    choice of address (MY parameter) I might be able to avoid changing the “destination address”.
    I can’t really tell from the docs if this would work. (I may sit down with XCTU and 2 radios
    and try to figure it out empirically but I really shouldn’t have to do that…)

At this point, it seems like what I need to do should be pretty common (main sensor
site gathers data from remote sites then forwards it to another site). Any advice would
be appreciated.

jim barstow

The current firmware you are using is designed to allow a product with an existing protocol such as Modbus to communicate over an RF connection just like it would on a cabled connection.

For what you are doing, I would suggest switching to the 900 HP firmware and use the API function instead. This way you can control who the data is to go to with each and every data packet. You can also then know where the data is coming from.