Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been looking at xbees recently but can't seem to find a tutorial on configuring and programming for 3 xbees on the same network - 1 to act as a master the other 2 respond as slaves, but the slaves will do separate functions such as one could be a device for turning on a light the other could be a sensor. So here are a couple of questions:

  • Is this possible?
  • What terminology should I be using when searching for this as i feel that this where my research is going wrong.
  • How are the 2 slaves addressed across the network?
share|improve this question
Why the downvote? – Dean Nov 23 '12 at 22:25
Nothing to do with electronic design. – Leon Heller Nov 23 '12 at 22:36
Actually XBee questions are on-topic – geometrikal Nov 23 '12 at 23:57
up vote 5 down vote accepted

My answer here may help: The appropriate code (arduino) of Xbee

Once you have one master and one slave like in that answer, repeat the slave configuration steps for the second slave. Then:

  • To send from slave to master, just send the data.
  • To send from master to a slave, set the master's DH and DL to the slave's SH and SL respectively, then exit command mode (ATCN) and send the data. To send to the second slave, do the same but using the second slave's SH/SL.

Note that when you use AT mode and the slaves send simultaneously, the bytes may become mixed at the master. E.g Slave1 sends "hello", Slave2 sends "there", master gets something like "hethelrloe" (painful own experience. :) At some point you will end up needing API mode, but AT mode is a very good, simple, way to start.

The tools and tutorials I found useful on XBee, I gathered them here: http://erion.elmasllari.com/2012/06/in-the-trenches-with-xbee-resources-and-tips/

Good luck!

share|improve this answer

Is this possible?

Yep, XBees use Zigbee, a wireless mesh networking protocol. The protocol is most definitely designed for more than 2 devices. In fact, devices can talk to each other via other devices. e.g. if A cannot talk directly to C, but A can talk to B and B can talk to C, then A can talk to C via B, so long as they have the same network identifier.

What terminology should I be using when searching for this as i feel that this where my research is going wrong.

Try xbee network configuration. xbee arduino setup, etc.

How are the 2 slaves addressed across the network?

XBees have two modes of communication, an AT command set and an API. AT mode is a little bit easier.

For devices to talk to each other they must have the same network ID. This can be setup using the X-CTU software, or using AT commands. To talk to different slaves, one simply changes the master's destination address. This can be done inside a program using AT commands.

share|improve this answer
  1. Set the master xbee as coordinator.
  2. Set its DH as 00 and DL as FFFF.
  3. Set the slaves as router.
  4. Set the DH and DL as 00 for both the xbees.
  5. Set NI some value you want for the two routers.

Enjoy. It worked for us.

share|improve this answer
Welcome to EE.SE! This answer seems useful but if you wanted to improve it further a brief explanation of the various register values and why they should be set that way would be good. – PeterJ Jan 21 '15 at 9:46

You don't mention what you are planning on the remote side. If you are planning on using a microcontroller, you can just build a protocol that includes the device number in it.

share|improve this answer
uC not necessary, Xbees can be used without one. Xbee protocol includes full support for Dean's situation – Erion Nov 24 '12 at 2:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.