Chapter 8. Building Many-to-Point XBee Networks

Setting up a many-to-point or star network using XBee devices need not be difficult or expensive. In the previous chapter, we showed you how to set up point-to-point wireless communications, essentially replacing the USB cable that connects our Arduino to our computer with a pair of XBee modules. With a few simple steps, we can expand this point-to-point connection to incorporate multiple Arduino sensor motes.

Addressing for Multiple XBees

We can take advantage of the XBee configuration we’ve already walked through in Chapter 7. Remember that the basic configuration on the XBee consists of: the baud rate for serial communication, a network identifier (PAN), the node address (MY), and the destination node address (DL). The 802.15.4 protocol uses addressing to distinguish one radio from the next, and to prevent duplicate packets. It is this addressing that directs our messages to the proper location.

If we want multiple Arduino sensor motes to send data to a single XBee master device, we need to configure each of the sensor motes and the master device with the appropriate node addresses (MY) and the appropriate destination node address (DL). We will begin by assigning the node address (MY) of the XBee master device with a simple value, like 0x0001. Now the configuration of the sensor motes is fairly straightforward for communication with the master (see Table 8-1).

Table 8-1. Radio configuration

Radio

PAN

MY

DL

1

1111

0011

0001

2

1111

0012

0001

3

1111 ...

Get Distributed Network Data now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.