Interesting case of Zigbee and BLE Mesh, which one to choose for your IoT network?
Internet of Things related products and use cases play a key role in our lives now a days. It is further proliferating at a rapid pace across industries and verticals. With all this happening, there is a need of making decentralized, short or medium range and sometimes crowded networks of nodes which collects and sends data over internet for further processing and receive commands from the end users over the internet. Since the amount of data exchanged is not huge therefore it is assumed that mesh technology could be used to solve some of the problems caused due to traditional point to point, star or hub network topology. In the mesh topology, all or few nodes become routers and in addition to consuming the data, they also take responsibility to share data with their neighbors. This makes a network of routers as well as end nodes making the network operation more decentralized. There is no single point of failure in the network, hence it is much more reliable. A well-designed routing mechanism and acknowledgement driven approach makes this kind of network quite dynamic, scalable and reliable.
Another advantage of meshing is that it reduces power consumption as transmission range for nodes is smaller. It reduces cost as single gateway can be used to collect data from multiple nodes spread across larger area.
BLE and Zigbee are the 2 most popular PAN (Personal Area Network) technologies for mesh topology-based use cases. Zigbee is based on IEEE 802.15.4 standard, while BLE is maintained by Bluetooth SIG.
Often, decision makers get into a lot of debate to choose one out of these for their products as both have their edges and pitfalls. In this article, an effort has been made to help decision makers choose out of these two awesome technologies. Below study is based on BLE 4.0 based mesh. Latest BLE standard 5.0 claims to have much improved stack but most of the systems still use BLE 4.0 or 4.2 based mesh stack.
Difference in mesh routing mechanisms
For smaller networks, both perform similar but as the network grows Zigbee tends to perform better due to its more advanced routing.
BLE uses flooding approach with some intelligence to route mesh packets. This is called managed flood approach. It is called managed because not all nodes relay the packet but only those which are on mains supply (not battery operated) will act as relay nodes. This mechanism works great when networks are smaller. BLE assumes that in most typical use cases, all end nodes will be requiring the same command such as “turn lights ON” at any instance. And, cases where only one end node is expecting the command is going to occur less often. Considering lighting is one of the most prominent use cases of IoT, this approach gives very good performance.
Zigbee face challenges when nodes are mobile as there will be lot of exchange of routing protocol messages to update route tables which may cause network congestion.
Since Zigbee nodes have less latency for larger packets, it can encapsulate higher layer headers and commands while providing good performance. It can be used in combination with unicast & broadcast to create localized effect. In this mechanism, a dynamically chosen proxy node may receive (form the source) command packets for multiple surrounding nodes as unicast and then broadcast it to nodes in proximity to create localized sound or color effects. This approach is utilized in Hue Entertainment feature provided in Philips Hue products. BLE gives higher latency when larger than 12 packets size is sent across the link due to segmentation and reassembly performed at higher layers. Therefore, it may be difficult to get same performance as compared to Zigbee.
Both, Zigbee and BLE mesh work primarily in 2.4 GHz frequency band which is already crowded due to multiple other technologies’ presence in the same band. Zigbee, however supports other frequency bands (784 MHz in China, 868 MHz in Europe, 914 MHz in USA and Australia) also in some part of the world. Since 2.4 GHz is comparatively a crowded band, it can be a good choice to use Zigbee in lower frequency bands wherever it is allowed. Hence, Zigbee provides more flexibility from frequency band selection perspective in certain jurisdictions.
BLE 4.2 standard rate is 1Mbps. Zigbee is based on 802.15.4 which limits data rate up to 250Kbps. Thus, BLE has faster data rate compared to Zigbee. However, in most IOT applications, it does not make much of a difference as amount of data is very limited.
Node to node range calculations are dependent on multiple factors such as transmit power, operational frequency, receiver sensitivity, Antenna etc. However, Zigbee (at 2.4GHz) generally is found to provide better range than BLE.
BLE works best for smaller size packets (i.e. less than 12 bytes). For smaller size (less than 12 bytes), its comparable to Zigbee but as packets size starts increasing BLE higher layers do the fragmentation and cause latency to increase.
MTU size (maximum transfer unit at link layer or physical limitation of the link) is an important criterion to estimate performance of the overall system. Smaller MTU size will have performance degrade if higher layer protocols or apps are meant to use larger packets. For example, one IPv6 header may translate to multiple mac layer packets if MTU size of mac layer is smaller than the standard IPv6 packets. This causes latency in the network. BLE has smaller MTU size comparatively so it adds more latency for larger packets. Therefore, it is important to consider application layer and higher layer protocols’ needs before closing on the mesh technology for your system.
Power consumption for Zigbee and BLE is comparable. Additionally, routed mesh mechanism adopted in Zigbee makes it slightly more power efficient.
BLE mesh has bigger eco system and uses the same BLE chipset used in other applications, therefore high scale production of BLE chipsets pulls down the cost of IC compared to Zigbee.
Need of gateway device for Zigbee further increases the cost of overall system. BLE based systems can provide limited functionality (everything except full-fledged internet connectivity) without gateway as well. So, if we consider SW cost as negligible for both, BLE scores higher. In addition, licensing of Zigbee is more expensive and complex than BLE.
Zigbee has smaller protocol stack but its routing is more complex to manage. In contrast BLE has overall more complex stack but routing is simple.
Both are inherently secure. Both provide options for authentication and data encryption.
Zigbee has better gateway and network provider ecosystem compared to BLE. Samsung Smart things, Philips Hue are few of the most prominent home networking systems which use Zigbee as primary technology for home networking. There are also service providers such as Deutsche Telekom, Comcast which provide Zigbee network ecosystem.
Form application layer support perspective, BLE is good for lighting specific use cases but lags for other use cases. Zigbee stack has good support for other use cases as well such as door locks, HVAC etc. However, BLE has support for beaconing which means nodes could also be used for asset tracking in addition to their main use case. This allows an additional feature out of the mesh network which can be really useful.
Zigbee mesh lacks stable stack implementation in most of the popular OS platforms such as Android, OS X etc. BLE is part of most of the popular OSes such as Android, OS X, Windows etc. already. Therefore, adopting Zigbee on a new OS platform will require more time and effort in comparison to BLE mesh.
IPv6 is going to rule the internet in near future as IPv4 addresses are depleting quickly. There is a need and effort to make every device on the internet to support IPv6 addresses so that all upper layer applications could easily be run across IoT networks. BLE has more latency for larger packets, which implies that Ipv6 over BLE will have lower performance than in Zigbee due to segmentation and reassembly overheads.
Problems with Zigbee that BLE solves
To utilize full IOT capability of mesh-based networks, it is important that nodes are connected to the internet. In both BLE and Zigbee based systems, for controlling and monitoring device nodes over internet, we’d need to have an edge gateway device which translates BLE or Zigbee packets into IP network packets and vice versa.
However, locally, Zigbee nodes can also be controlled using Zigbee remotes, but remote controls provide less user-friendly control compared to a smart phone. In contrast, smartphones are ubiquitous devices and most of them have BLE built-in. BLE mesh is a SW stack so existing devices could be easily topped up with firmware and installable mobile applications can be used to control BLE nodes directly without the use of any gateway for temporary connectivity.
Therefore, for applications that do not have edge gateways, BLE provides more user friendly and rich experience. For cloud connectivity, smart phones could be used as temporary gateway device if users are physically present in the vicinity of BLE mesh network. But, for full fledged IOT connectivity and control over internet (or cloud), there is a gateway required in both BLE and Zigbee based systems.
Problems with BLE that Zigbee solves
For highly congested and large networks, Zigbee is more suited due to its full-fledged routing approach.
We can objectively see from above description that BLE and Zigbee RF performances are comparable, but more advanced routing adopted by Zigbee makes it irreplaceable when it comes to large networks.
With its simpler routing mechanism, BLE is more suitable for mobile nodes as Zigbee routing protocol causes more network overhead for maintaining route tables for highly mobile nodes. Therefore, it is important to consider the use case before choosing any of these technologies.
Lower hardware cost, stable protocol stacks in popular OS implementations and smart phone control are few of the advantages BLE has over Zigbee. Zigbee has bigger ecosystem in home networking, industrial IOT (IIOT) systems at present due to its early entry into this market segment. However, BLE mesh being software-based solution on top of existing BLE stack, can quickly catch up in near future.
It will be interesting to see how quickly BLE mesh leverage the ecosystem it already has and compete in the world of mesh technology based IOT systems which is already captured by Zigbee.