Point-to-multipoint communication
Point-to-point communication works well if you have two XBee modules. When the number of devices increases, however, this model falls short. Using point-to-multipoint communication, a module can communicate with one or multiple devices on the network. This type of communication generally involves a central coordinator with multiple remote nodes (end devices) connecting back to the central host. This network topology is called star.
A home security system can illustrate the concept: proximity sensors connected to each end device send a notification to the central coordinator when movement is detected. The coordinator can also send data to a specific end device or to all of them.
Roles
In the 802.15.4 protocol, the XBee modules can have two different roles: coordinator or end device.
- The coordinator is the central node of the network. It starts the network, allows other devices to join it, can select the frequency channel to use, and provides network synchronization by polling nodes. To set an XBee module as coordinator, you have to change the Coordinator Enable (CE) parameter to Coordinator [1].
Note Note that in star topologies there can be only one coordinator in the network.
- An end device is a remote node of the network. It can communicate with the coordinator but also with other end devices. It can be put into states of sleep for low-power applications, as you will learn in the Extending the battery life topic. By default, all XBee modules in the 802.15.4 protocol are end devices. If you want to set a coordinator as end device, you must change the CE parameter to End Device [0].
Unicast and broadcast
A unicast transmission consists of sending messages to a single node on the network that is identified by a unique address. An example of unicast communication is a telephone call between two people. To send a unicast transmission, the XBee module needs to know the address of the destination module.
Broadcast, unlike unicast, means transmitting the same data to all possible nodes on the network. An example of broadcast communication is a radio station. To send a broadcast transmission, the destination address must be 000000000000FFFF.
Congratulations! You have just completed the section, so you are ready to do the Example: Advanced chat.