IEEE 802.15.4 (intro)
This standard defines a communication layer at level 2 in the OSI (Open System Interconnection) model. Its main purpose is to let the communication between two devices.It was created by the Institute of Electrical and Electronics Engineers (IEEE), entity which main task is to set standards so that technological developments can count with a common platform of rules to be set over. In the Waspmote devices this protocol is set using the XBee 802.15.4 OEM Digi module.
This standard defines a communication layer at level 3 and uppers in the OSI model. Its main purpose is to create a network topology (hierarchy) to let a number of devices communicate among them and to set extra communication features such as authentication, encryption, association and in the upper layer application services. It was created by a set of companies which form the ZigBee Alliance. In the Waspmote devices this protocol is set using the XBee ZB Digi module.
1 - Understanding 802.15.4
As mentioned before this protocol lies over the level 2 of the OSI. This layer is called the Data Link. Here the digital information units (bits) are managed and organized to become electromagnetic impulses (waves) on the lower level, the physical one. This layer is similar to others known ones such as the 802.11 (commercially named under Wifi technologies) or the common Ethernet (802.3). The frequencies defined in the standard are spread among 27 different channels divided in three main bands:
Three different XBee transceivers are used in the Waspmote to provide communication in these frequencies:
1-1 Why is 802.15.4 good against noise?
It used Direct Sequence Spread Spectrum (DSSS) to modulate the information before being sent to the physical layer. Basically, each bit of information to be transmitted is modulated into 4 different signals (another kind of bits alphabet), this process causes the total information to be transmitted to occupy a larger bandwidth but it uses a lower spectral power density for each signal.
This causes less interference in the frequency bands used and improves the Signal to Noise Ratio (SNR) in the receiver due to the fact that is easier to detect and decode the message which is being sent by the transmitter.
1-2 Why is 802.15.4 good against interferences?
The most common is the Carrier Sense Multiple Access-Collision Avoidance (CSMA-CA). This method is described as follows: each node listen the medium prior to transmit. If the energy found higher of a specific level the node the transceiver waits during a random time (including in an interval) and tries again. There is a parameter defined in the standard: macMinBE which sets the back-off exponent to be used when calculating this time slot.
The second one is Guarantee Time Slots (GTS). This systems uses a centralized node (PAN coordinator) which gives slots of time to each node so that any knows when they have to transmit. There are 16 possible slots of time. As a first step a node must to send to the PAN coordinator a GTS request message, as response the coordinador will send a beacon message containing the slot allocated and the number os slots assigned. Waspmote use the CSMA-CA method due to the fact that it is inherent to each mote and does not depend on a central server. There area some special frames like the ACK packets which doesn't require this method to be performed.
One of the functionalities implemented in 802.15.4 is the channel energy scan (PLME-ED request). The idea is to be able to know how much energy (activity/noise/interferences) there is in one (or several channels) prior to start using it. This way we can save energy choosing free channels when setting the network. There are three different behaviors when facing the energy detection issue:
1-3 Why is 802.15.4 a low consumption protocol?
It is ready to work with low-duty cicles. It means the transceiver can be sleeping most of the time (up to 99% on average) while the receiving and sending tasks can be set to take just a small part of the devices' energy. This percentage depends on the kind of communication model used. If beacon mode is used (star or PAN networks) the minimum amount of time used to transmit/receive this frames will increase the total time the transceiver is used. Waspmote can be synchronized so that he network can have duty cicles much lower. They can be sleeping for minutes or hours and wake up all at the same time to perform an Adhoc communication creating a mesh network just when really needed.
1-4 Transmission Power and Reception Sensibility for the 802.15.4 transceivers
802.15.4 sets the minimum amount of energy needed to transmit in -3dBm, (0'5 mW) and the minimum sensibility in the receiver is -92dBm (6'3 * e-10 mW). Waspmote radio module has a variable transmission power strength of 0dBm (1mW) in XBee 802.15.4 OEM and 20dBm (100mW) in the XBee-Pro 802.15.4 OEM, both values are higher than the minimum set in the 802.15.4 Standard. Regarding the reception sensibility , the XBee shows -92Bm (6'3 * e-10 mW) and -100dBm (1 * 1e-10mW) the XBee-Pro flavor.
This means we will detect any packet which reach us with a energy of as low as 0'000000000063mW for the XBee and 0'00000000001mW for the XBee-Pro.
1-5 What is there on top of 802.15.4?
There are several protocols which use 802.15.4 as its MAC layer. The most known is ZigBee, although there are a lot of them:
2- Understaning ZigBee
ZigBee offers basically four kinds of different services:
ZigBee is a layer thought to organize the network. The first thing a node (route or end device) which want to join the network has to do is to ask to the coordinator for a network address (16b), as part of the association process. All the information in the network is routed using this address and not the 64b MAC address. In this step authentication and encryption procedures are performed.
Once a node has joined to the network can send information to its brothers through the routers which are always awake waiting for the packets. When the router gets the packet and the destination is in its radio of signal, the router first looks if the destination end device is awake or slept. In the first case the router sends the packet to the end device, however if it is sleeping, the router will bufferize the packet untill the end device node gets awake and ask for news to the router.
2-1 Is ZigBee a mesh protocol?
To answer this question we have to clarify what the mesh concept means. Let's see first how a ZigBee network works.
There are three kinds of nodes in a ZigBee network:
Coordinator and routes can not be battery powered, motes can. ZigBee creates star topologies. There are some basic rules:
The concept "Mesh Network" relays in the Ad hoc communications, also called peer to peer (P2P). This means all the devices in the network can communicate with each other directly. They have to be able to discover each other and send broadcast messages to all the brothers ("hello!, is there anybody out there?"). They have to be able to create networks like the one represented in the image below.
ZigBee creates start network topologies, not mesh ones. To create a completely mesh network such as the one showed in the image below all the nodes have to have the same role, all of them have to be "end devices + routers" so that they can route their brothers information and sleep when no action is required (saving energy). The DigiMesh protocol (over 802.15.4) sets a completely distributed network where all the nodes talk among them using p2p (equal to equal) datagrams.
2-2 What is the difference between ZigBee and ZigBee-Pro?
Read the ZigBee vs ZigBee-Pro article.
2-3 What is the difference between ZigBee certified and ZigBee compliance?
Read the ZigBee Compliance vs ZigBee Certified article.
3- 802.15.4 Versus ZigBee, summarizing...
Both Waspmote benefit from all the 802.15.4, ZigBee and DigiMesh protocols and support all the frequency bands 869MHz, 900MHz and 2.4GHz.
3-1 802.15.4 / ZigBee Frequently Answers and Questions (FAQ)
3-2 XBee 802.15.4 OEM vs XBee ZB vs ZNet2.5 Comparative
What are the differences among the XBee 802.15.4 OEM, XBee ZB and XBee ZNet 2.5?
Are they compatible?
Can I upgrade the firmware which is running on this modules?
Can I transform them from one kind to another?
All the answers in the XBee 802.15.4 OEM vs XBee ZB vs ZNet2.5 Comparative article.