The network is a critical part of every IoT device. This article will help you explore several important features of the IoT network. It will also look at how AliOS Things aims to provide some new and innovative solutions to problems.
We live in an era of profound diversity. No matter what technology we are talking about, several competing standards surely exist and compete with each other both in public and behind closed doors. Every person has plans and methods to accomplish things. To form one set of standards is a monumentally difficult task. From this perspective, the very existence of an IP network is a miracle. The IP network has no tribe, no country. It is truly a plug-and-play standard. The IP network provides an excellent foundation for the Internet of Things. This trend is becoming increasingly clear.
Zigbee launched Zigbee IP, then Google introduced the very similar Thread, using 802.15.4. Silicon Labs, TI, and other Zigbee core vendors also support it. (The Thread which Nest uses for home automation was originally a Silicon Labs protocol).
The IP network can also bring several obvious benefits to the Internet of Things:
- IP has a large number of mature software stacks. The security component TLS/DTLS is one such example.
- IPv6 can provide enough address space.
- A large number of software developers are familiar with Socket.
Of course, IP only provides a channel. It also needs upper-level protocols to ensure that “everyone understands each other.” Currently, popular protocols include Alibaba Cloud’s ICA Union, OCF, Google Weave, and HomeKit. However, we will not discuss this topic at length at this time.
There are two main transport layer protocols over IP: TCP and UDP. So far, TCP is crushing UDP. Practically everyone has heard of TCP/IP while only a minority of people know about UDP/IP.
TCP is a reliable, connection-oriented, byte-based transport layer protocol. TCP’s keep-alive/retransmission/congestion control provides a good compromise between functions and stability. For applications with better network environments and less real-time requirements, such as the Web era’s HTTP, TCP is a very good choice. However, some people have begun to think that TCP has done too much. The TCP handshake protocol has become a bottleneck for many Web API functions. For example, Google proposed QUIC (Quick UDP Internet Connection) to try to further improve the user experience on the Internet through UDP.
In the Internet of Things, TCP’s problem becomes even more prominent because the Internet of Things environment often faces poor network signals, limited bandwidth, and harsh power consumption limitations. NB-IoT, as seen recently, is a prime example. Most of NB-IoT’s terminal devices work in a battery powered environment; their transmission rate is low, and their application scenarios are wildly varied. TCP is connection-oriented, the timeout retransmission mechanism consumes more memory, and also affects power consumption.
Imagine a common sensor’s timed data upload scenario: collecting data, reporting data, sleeping. Because of regular reporting, in many cases, occasional loss of data is acceptable. However, to improve the data arrival rate of TCP, its keep-alive, and retransmission mechanisms will reduce the battery life, while the retransmission mechanism will consume memory.
The current mainstream cloud channel protocol still uses TCP as a base, mainly MQTT, including Alibaba Cloud’s IoT suite, Amazon, and Azure. Even so, Alibaba Cloud’s IoT suitealso supports CoAP. Google Weave also uses UDP as a primary means of communication.
Co-Existing Communication Technologies in IoT
Different communication technologies have different speeds, coverage, reliability, power consumption, deployment, and cost; no single technology can cure all problems. 3G/4G networks outperform WiFi in coverage but are not as fast, use more power, and cost more than WiFi. With regards to speed, WiFi kills BLE. But with regards to power consumption, BLE is the way to go.
In the Internet of Things field, LPWA (Low Power Wide Area) technologies NB-IoT, LoRa and SigFox are attracting much attention. Their low power consumption and wide coverage simplify deployment in a variety of complex environments. Based on the 802.15.4 WSN (Wireless Sensor Network) technology Zigbee, Wi-Sun’s power and cost advantages are obvious, suitable for large-scale deployment.
WiFi and BLE are the most popular in consumer electronics, and their application has received widespread attention. Since WiFi does not require gateways, a wide range of appliance manufacturers favor WiFi. (Bear in mind, though, with increasing number of smart devices in the home, the number of AP connections will become a bottleneck.) Meanwhile, looking at the likely future developments in the field of IoT, the WiFi Alliance introduced a low-power version of WiFi in 2016, 802.11ah (Wi-Fi HaLow) . With the introduction of v5.0, BLE now has faster rates and greater mtu. In addition to improving the existing peer-to-peer communication experience, building WSNs based on BLE becomes possible, posing a threat to existing technologies such as Zigbee.
Co-Existing Network Topology in IoT
The following figure is a common network topology:
If you observe closely, you can vaguely see tree shapes. In Ethernet, Tree and Bus are common, with wired LAN a Bus topology. However, from the perspective of accessing the Internet, it needs to go through gateways, and the gateway becomes the root node of the tree. Therefore, it is also a kind of Tree topology. In the field of wireless LAN, WiFi is a Star topology; WSN is Tree/Mesh-based. If we include LPWA in the wide area network, we can consider it as a base station-based Star topology; the base stations, in turn, are Mesh Topologies.
Based on the existing backbone network formed by Ethernet, it is likely that WSN/LPWA will have more and more applications in the Internet of Things. The low cost and low power consumption of WSN, combined with the low power consumption and wide coverage of LPWA, can cover a very wide range of IoT scenarios.
AliOS Things Features
Regarding the above characteristics, AliOS Things provides relevant components from multiple latitudes to better support the network needs of IoT devices. In addition to the highly optimized protocol stack based on LwIP2.0, the following rich components are also available:
CoAP-based Full Link Optimization
AliOS Things supports CoAP-based cloud access (such as Alibaba Cloud IoT Suite) while supporting CoAP-based FOTA, making it possible to build an all-UDP system.
SAL Network Adaptation Layer
On IoT devices, MCU plug-in communication modules are very common. The communication methods between the MCU and the communication module are also varied. To reduce complexity, the communication module often runs the complete TCP/IP protocol stack and controls MCU through AT or a private protocol. In response to this situation, AliOS Things uses SAL components to offer a standard socket interface to the upper layer, while lower layers can use a private protocol based on the SAL device. For the common AT module, AT Parser further reduces the complexity of docking.
uMesh is a self-organizing network protocol stack, independent of wireless protocol, beneath IP and above MAC. uMesh is a Routing Mesh that supports both tree and mesh topologies. Structured address routing is used in tree topologies, greatly reducing the size of the routing table. uMesh can seamlessly interface with the TCPIP protocol stack, making it easy for various types of wireless devices with limited resources to access the IP network. AliOS Things designed uMesh technology for complex networks to solve communication’s last mile problems.
This article explores some unique features of IoT networks and related features of AliOS Things. Visit AliOS Things Github at https://github.com/alibaba/AliOS-Things , and join us in working together to build a better IoT-oriented operating system.