802.15.4 的 ZigBee的区别和联系

802.15.4 vs ZigBee

工作中听到经常有同事说zigbee就是802.15.4,两者为什么会被混为一谈呢,下面来说一下两者的区别。
首先把这篇文章的结论很要点告诉大家,具体的内容可以看后面的英文原文。

1、概念
802.15.4是链路层协议(OSI二层),定义的目的是适应低功耗的需要,用在物联网中。实现点对点的通信。
ZigBee是网络层协议(OSI三层),目的是用来生成网络拓扑实现多个设备的通信,同时提供认证、加密、路由协议和一些其他的服务。
2、关系
ZigBee 仅仅在802.15.4上层的一种协议而已,其实还有好几个协议都使用它
3、ZigBee网络中仅仅是端点设备具有休眠功能。

下面是一些常见的问题和详细介绍。

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.

ZigBee (intro)

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:

  • 868.0 - 868.6MHz   -> 1 channel     (Europe)
  • 902.0-928.0MHz     -> 10 channels  (EEUU)
  • 2.40-2.48GHz         -> 16 channels  (Worldwide)

Three different XBee transceivers are used in the Waspmote to provide communication in these frequencies:

  • 868MHz   -> XBee 868MHz OEM
  • 900MHz   -> XBee 900MHz OEM
  • 2.40GHz  -> XBee 802.15.4 OEM / XBee ZB

Bit Rates:

  • 868.0 - 868.6MHz   -> 20/100/250 Kb/s
  • 902.0-928.0MHz     -> 40/250 Kb/s
  • 2.40-2.48GHz         -> 250 Kb/s

 

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.



There are different DSSS modulations depending on the hardware physical limits of the circuit and number of symbols which can be processed at a given time. Binary Phase Shift Keying (BPSK), Offset Quadrature Phase Shift Keying (O-QPSK) and Parallel Sequence Spread Spectrum (PSSS) let communication from bandwidths from 20Kb/s to 250Kb/s.

 

1-2 Why is 802.15.4 good against interferences?

802.15.4 uses two techniques to avoid all the nodes start emitting at the same time: CSMA-CA and GTS.

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 theenergy 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 theCSMA-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:

  • Energy: scan the channels and report the energy found. It doesn't matter if it is caused by other ZigBee nodes or by another technology or noise. Just report if the spectrum is being used. Only when the value received is below a certain threshold we will transmit.
  • Carrier Sense (CCA): scan the medium and report if there are 802.15.4 transmissions. Only when the channel is free we will transmit.
  • CCA + Energy: scan the medium and report if there are 802.15.4 transmissions above the energy threshold specified. If not we will use the channel.

 

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:

  • Wireless HART: It is the wireless version of the HART protocol which is the most used in the automation and industrial applications which require real time. It uses Time Synchronized Mesh Protocol (TSMP). A "time coordinator" node is required in order to assign the time slot to all the motes.
  • ISA - SP100: It also centers in the process and factory automation. It is being developed by the Systems and Automation Society (ISA) and tries to be an standard for this kind of projects.
  • IETF IPv6 - LoWPAN: As the same name points it is the implementation of the IPv6 stack on top of 802.15.4 to let any device be accessible and access from and to Internet.
  • New Mesh protocols: A lot of different mesh protocols are being implemented by companies over the 802.15.4 MAC layer. One example is the Digi's own mesh protocol (DigiMesh), which is though to be a completely distributed mesh protocol where all the nodes can sleep and route their brother's packets.Waspmote support also the DigiMesh protocol when the XBee 802.15.4 OEM module is chosen . Paper about the DigiMesh implementation: DigiMesh-whitePaper.pdf.

 

2- Understaning ZigBee

ZigBee offers basically four kinds of different services:

  • Extra Encription services (application and network keys implement extra 128b AES encryption)
  • Association and authentication (only valid nodes can join to the network).
  • Routing protocol: AODV, a reactive ad hoc protocol has been implemented to perform the data routing and forwarding process to any node in the network.
  • Application Services: An abstract concept called "cluster" is introduced. Each node belongs to a predefined cluster and can take a predefined number of actions. Example: the "house light system cluster" can perform two actions: "turn the lights on", and "turn the lights off".

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: is the "master" device, it governs all the networ
  • Routers: they route the information which sent by the end devices
  • End device: (the motes): they are the sensor nodes, the ones which take the information from the environment


Coordinator and routes can not be battery powered, motes can. ZigBee creates star topologies. There are some basic rules:

  • The end devices connect to a router or a coordinator.
  • The routers can connect among them and with the coordinator.
  • The routers and coordinators can not sleep. They have to save in their buffer the packets which go to the end devices.
  • The end devices can sleep.

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

  • 802.15.4 is thought to be a protocol to get point to point and energy efficient communications.
  • ZigBee definces extra services (start topology routing, encryption, application services) over 802.15.4.
  • ZigBee creates semi-centralized networks where just the end devices can sleep
  • Different completely distributed mesh algorithms are being used over 802.15.4 is the protocol used to create

Both Waspmote benefit from all the 802.15.4ZigBee and DigiMesh protocols and support all the frequency bands869MHz900MHz and 2.4GHz.

 

3-1 802.15.4 / ZigBee Frequently Answers and Questions (FAQ)

  • Can the 802.15.4 sensor motes talk each other directly? Yes. They can send packets directly to any of their brothers which are in range.
  • Can the ZigBee sensor motes talk each other directly? No. The sensor motes can not talk each other directly. They have to do it through a router or coordinator device.
  • Can the 802.15.4 nodes live with batteries? Yes. The point here is to find a synchronization algorithm which makes all of them send and receive at the same time. The DigiMesh protocol 
  • Can the ZigBee nodes live with batteries? Not all, at least the routers and the coordinator must be plug powered. The end devices can be battery powered.
  • Can 802.15.4 nodes and ZigBee ones communicate? No. As pointed before, they have different communication methologies an procedures.

 

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.

 

 

 


Research
  • Enclosure
  • Energy Management
  • GPS Mesh Networks
  • Hardware Node
  • Manager Platform
  • Mesh Routing Protocols
  • Securing the Mesh
  • Sensor Integration
  • System and Communications
  • System and Manager Platform

你可能感兴趣的:(802.15.4 的 ZigBee的区别和联系)