Self-Learn Yourself IoT in 21 Blogs – #2
TCP/IP Layer-wise IoT Protocols
Hello everyone !! Thanks a lot for your valuable response for the previous blog. In this post, I will be explaining the basics of TCP (Transmission Control Protocol)/IP (Internet Protocol) stack and the respective IoT protocols associated with each layer. Anyone who has prior knowledge on TCP/IP stack can skip the next few lines and pass on to “IoT Protocols”. For others, I will explain few important concepts that will help you to have a basic idea on the TCP/IP stack.
TCP/IP – OSI Layers:
Basically, TCP/IP stack is the recent evolution/adaptation of traditional OSI (Open Systems Interconnection). They have their own story similar to that of M2M-IoT. OSI, which was a seven-layered model, was standardized by ISO. TCP and IP which were the predominantly used protocols reduced the seven-layered architecture to four-layered model. However the functionality and features of the layers still remain the same.
Comparison of traditional OSI stack against TCP/IP stack
TCP/IP – Roadways:
To help readers, who are new to TCP/IP, I will explain the above represented architecture comparing it with delivery fleets. Protocol is nothing but set of rules/standards to be followed for the execution of a process. For instance, if a person has to press the “Like” button in Facebook, it involves only the physical activity of clicking the mouse once the cursor is positioned over the symbol. But internally, your PC generates a data which will travel miles. Consider a package, which has to be transported from A to B, via a delivery service. So, the package will be the useful data and the delivery service vehicle will be the transport medium and roads will be the transportation link/channel.
Similarly, a data which is generated from the user application (Web/Mobile) has to travel through few important layers (Transport, Network and Physical). The package will initially be labeled with secure credentials to ensure the delivery to appropriate person. In TCP/IP, transport layer will ensure the data is sent through appropriate connection, based on the type of data. Network layer can be compared with your door address and the Physical layer/communication channel in TCP/IP could be matched with the highway/street number which aids in reaching the destination effectively and efficiently.
With respect to IoT, amendments and additions have been made to the existing protocols and have been released as proprietary (modifications closed to the copyrighted authority) and open alliance versions. In the following image, I have added the most commonly used protocols and the terms that we come across in daily routine of IoT.
TCP/IP layer-wise IoT Protocols
As said earlier, in this blog we shall be discussing the basic details about the existing protocols. In the upcoming blogs, I will be explaining the detailed aspects of protocols and their respective specifications.
Physical layer plays the vital role in establishing the communication channel. IoT’s significance involves the following traits:
- Low power consumption
- Long battery life
- Low bandwidth consumption
- Smaller size and lighter weight
- Allow more devices to be connected and operated in a single environment
The above mentioned features are to be achieved using the effective physical layer standards. IEEE 802.15.4 (ZigBee, 6LoWPAN, WirelessHART, Mi-Wi), IEEE 802.15.1 (Bluetooth Low Energy (BLE) – Bluetooth 4.0), Near Field Communication (NFC), etc are the standards set by specific bodies like IEEE (Institute of Electrical and Electronic Engineers) and proprietary vendors (Z-Wave by SIGMA DESIGNS). These standards specify:
- operating frequency – similar to public bus timings
- bandwidth usage – Capacity per bus
- power consumption – mileage of each vehicle
TCP/IP – Flow of data through Layers
Physical connectivity has been established. Now, there has to be a unique method of differentiating the devices operating in its own range. For instance, you can have two PCs connected to the same router, but there is a method of identifying each PC individually. That’s where the network address plays a vital role. For instance, there will be different buses operating in and out of a terminus. But each bus has its own unique number/ID to differentiate itself from other buses that were supposed to ply to other destinations.
In IoT, ZigBee is an alliance, which has its own network address. They are not the same as IP addresses. Similarly, BLE, Z-Wave, etc have their own network addresses respective to their environments. Wi-Fi devices have IP stack as part of their chip and thus enables IP connectivity. This layer aids the respective devices to communicate within their operating range effectively.
6LoWPAN (IPv6 Low Power Wireless Personal Area Network) devices also operate in IEEE 802.15.4. But they have the Network Stack with IP connectivity (IPv6). To be simple, consider TV remotes which could be operated on internet.
IoT – Layers and Protocols
Transport layer holds the responsibility to secure the network and data exchange. IoT networks are low powered environments and hence they are easily prone to attacks. Transport layer has to be embedded with efficient security features. Also, this layer holds the responsibility for effective bandwidth consumption and session maintenance. For instance, banks need advanced safes and locking mechanisms. But, the same isn’t needed for hotels/cafe corners. The applications developed on top of transport layers have to select the appropriate transport layer for effective power and bandwidth preservation.
Finally, the application layer serves as the interface to interact with the user as well as the desired sensor application. Protocols such as HTTP/HTTPS (Hyper Text Transfer Protocol – Secure) have been in existence ever since IP began. A common browser makes use of HTTP. With IoT, protocols such as Message Queuing Telemetry Protocol (MQTT), Advanced Message Queuing Protocol (AMQP), Constrained Application Protocol (CoAP), etc have emerged significantly. For instance, Adhaar card has made use of AMQP and facebook messenger has made use of MQTT protocols respectively. CoAP finds its effective usage in combination with 6LoWPAN. It is a lighter version of the heavyweight HTTP protocol.
So, the selection of appropriate application level protocols depends on the verticals (Healthcare, Smart Home, Asset Tracking, etc) where they are going to be implemented. This would aid the underlying protocols to effectively work on conserving their respective features and thus aiding in achieving the goal of IoT.
- For now, we have discussed IoT Personal Area Network (PAN) protocols
- LoRA and SIGFOX are IoT Wide Area Network (WAN) protocols which have not been covered in this blog.
- PAN and WAN differ in their coverage range
- PAN – Connectivity range – 1 – few meters
- WAN – Connectivity range – 1- 40 kilometers
See you !!
Hope this has given a basic idea on existing IoT Protocols and their respective positioning in the TCP/IP stack. In the forthcoming blogs, I shall explain the standards and their specifications in detail.
Next blog will be on RF specifications for ZigBee, BLE and Wi-Fi. Have you ever wondered, how two routers acting in the same building have never interfered ?? It will be explained in the next blog !