Beginner xBee/ZigBee question

I've been going through the Building Wireless Networks book and have a fundamental question about xBee/ZigBee networks. I understand that they form an ad-hoc mesh network, but I'm not sure quite how the whole parent/router/etc. thing works. Here's an example:

Suppose we have the following nodes:

A - configured as an end node B - configured as a router (or a controller) C - configured as a controller (or a router)

Physically, they are placed in a row, so that A is within range of B, B is within range of C, but A is not within range of C.

Can A send info directly to C? In other words, if A is a bare sensor wired directly to the xBee and C is the processing node (with an arduino or something attached to it), can B just sit there (with no micro-controller) and play relay? I am assuming the answer is yes, since that's the whole point of the mesh network, but I'd like some confirmation that that's the case.

I've wondered this also, have not tried it but I think the answer would have to be yes, assuming node B is configured on the same PAN, etc. Of course, the traffic doesn't go directly from A to C, it goes through B.

Physically, they are placed in a row, so that A is within range of B, B is within range of C, but A is not within range of C.

Can A send info directly to C?

Go back and re-read your premise. Then, see if you can't answer your own question.

If A is not within range of C, then how can it send information directly to C?

The whole purpose of a mesh setup is so that A and C can exchange information, through any other nodes necessary.

Trying to make two specific nodes communicate directly is not in the spirit of a mesh network. If that is what you think you need to do, then a mesh network is NOT what you want.

Obviously I wasn't clear in my question. When I said "Can A send info directly to C?" I did not mean a direct radio-to-radio communication, obviously they are out of range, I meant "can A send an info packet addressed to C?" In other words, at the Arduino level, can I establish communication between A and C ignoring the fact that the data is being routed through B by the network protocols?

Yes, absolutely. The traffic only needs to be addressed to the desired endpoint. I have a setup where the received signal strength is displayed on an LCD when a message is received. Without touching the source or destination nodes, I have noticed large variations in signal strength when I've moved other nodes around. Even though all my nodes are within range of each other, I believe this is due to the traffic sometimes being routed through an intermediate, closer node (the RSSI only reflects the signal strength for the last hop). So again, not only is the answer yes, extraordinary steps might be required to prevent it! It's very cool technology, I'm impressed! It is possible to specify the entire route a message should take (i.e each hop); at this point it's not a capability I need, I don't have a reason to go through the extra trouble.

Oh, I have no desire to prevent it! :) Quite the opposite!

I am trying to set up a doorbell system in my house, which has certain obstacles to more conventional systems - no good way to run wiring to 2 of the 3 doors for a wired system, and normal cheap wireless doorbells don't work in my house for more than a room away. I currently have one wireless doorbell that works ok, but it's a one transmitter, one receiver system, so if I'm upstairs, I can't hear it, and there's no bell on the back doors at all.

The thought was to have 3 push buttons+xBee units on the doors (bare xBees just using the digital input pin to sense the button being pressed, probably in end device mode with sleep enabled to conserve battery power), 2 or more buzzer/Bell +xBee units throughout the house to ring (again, bare xBees using the digital out pin to trigger the sound maker, configured in router mode as these can be plugged into the wall), and then one ARduino+xBee logic box to control all this (wall power, so configured as either a router or coordinator). All of the data traffic would be from the door units to the logic unit, and then from the logic units to the bell units.

I want the logic unit upstairs in my office (so I can tweak it as necessary), but I'm concerned that there might not be a good enough signal from the doors to the upstairs directly. The bell units would be physically located between the door units and the logic unit, so I want to make sure that they will rout the signals correctly.

Interesting project! Wiring doorbells does stink if you're not building a new house!

I think you have a good idea, the topology sounds right. And like we said before, it there are still distance issues (man, I gotta see this house!) then just bare routers can be sprinkled around as needed.

My setup is actually similar, multiple sensor nodes (routers, as they're all plugged in) feeding one central aggregator that is also the ZigBee network controller. I then have a remote monitor unit which would correspond to your bell units. I just have the one remote monitor, but it could just as well be more than one. Right now I just move it around to where I need it.

Keep in touch, I'd be interested to hear how it goes.

House is actually fairly small, not sure why I have such issues with the wireless doorbells in it... It's old (1920s), so maybe something in the old plaster is interfering? Or maybe there's just a source of interference nearby in whatever band the cheap wireless doorbells use? Not sure. The point is they don't work. WiFi, cell phones, and cordless phones (5.4Ghz) all work fine, so I'm hoping the 2.4GHz xBees will work as well.

Old house here too, not quite that old but does have wet plaster, sometimes they used an expanded metal lath. Grounding it might make a nice Faraday cage. Maybe I’ll try that, should work well with the tinfoil hat. Maybe then that’ll stop the voices LOL :grin:

XBees are cool. I have one attached to a 5V wall wart (yes, I have a little 3V regulator too) that I plug in wherever I need an intermediate. It's about 150 feet and 4 walls from a sensor I have in the garage to where I want to use the data, so a relay or two is necessary. I just plug the wall wart in and the XBee takes off and forwards the data.

Now, if I could just make it pretty.

My eventual plan is to have an XBee in every room that monitors temperature and maybe light and sends the data. The other XBees would pick up and forward as necessary to wherever I wanted to look at the data. This would be cool on a weather station setting outside somewhere as well. Man, if I could just pack the electronics such that I could fit it in a wall switch......

I find three types of XBee here.

Xbee series 1 Xbee series 2.5 Xbee series 2 (ZB)

In the description, the Series 1 and Series 2.5 only support Point to point and multi-point networks. They can't set up mesh network. So they can't work as a repeater/router, right?

I want to have the Xbee modules in every room, and send the sensor data to the coordinator. The coordinator and the end device may be out of distance. I need some modules work as the router to repeat the data. I can only use the module Xbee series 2 (ZB), Right?

BTW, is there any other xbee modules wildly used?

Regards, Jeffrey

I'm not sure about the series 1 or 2.5, but the series 2 devices will set up a mesh. Part number XB24-Z7WIT-004 is the device I use. Runs close to US$20 most places and can do the zigbee protocol. These will set up their own routes and modify them as necessary when devices go off line (because you're changing code). Once you get them set up, they just work. They go through power failures, unplugging them to change a parameter, bad weather (thunderstorms) well, and reset in seconds. A little more difficult to program for since there's not as much support out there as there is for internet devices and you wind up inventing stuff yourself.

I'm just starting out placing them all over the house, and once you get two of them in place, adding another is fairly easy. If you need one down the road by the gate, you can get one of the pro models to make the distance or set up a router mid way to repeat the data. These devices, in my opinion, seem to be perfect for home do it yourself projects.

I haven't used the earlier generations, if you're buying new, might as well have the latest and greatest which is the ZB 2 (because 2 > 2.5 evidently) and yes they do mesh networking. The various generations and then all the different models within a generation can be pretty confusing. If you want the current generation, low-power models, the one with the wire antenna is Digi part number XB24-Z7WIT-004, and the chip antenna is XB24-Z7CIT-004.

Best prices I've found are direct from Digi, XB24-Z7WIT-004: (picture shows the chip antenna model, just to confuse things even more)


As I understand it, both the Series 2.5 and the Series 2(ZB) will form the ad-hoc mesh networks. The ZBs are newer, though I believe you can upgrade the 2.5s to the XB witha firmware upgrade (I’m not 100% certain on this - contact Digi tech support to verify this before spending $$$). I don’t know if you can still get the 2.5s (SparkFun is out of stock on them, for instance), but I’d go with the ZBs anyway.

More info: ← ZB Datasheet ← 2.5 Datasheet

Regarding the cost. I priced them at and at Notice how the names collide? was cheaper but the shipping was too high. was more expensive but the shipping was less than a third of I saved six dollars by paying more for the XBee !!

Of course, your mileage may vary on this due to location and such, but be sure to check the shipping costs on the devices.....most especially if you're buying on ebay.