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.
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