Today we want to continue the topic of IoT for you. Today, we will talk about the more technical aspects of how IoT devices work, the protocol stacks, and the challenges that engineers have to overcome. If you're curious, we invite you to read on!

 

Network Stack

Computer networks are built in a layered manner and are presented based on a specific network model, such as OSI. Dividing various responsibilities, such as IP addresses or port numbers, into different layers allows protocols to be developed independently of each other. This, in turn, allows different organizations to focus on different issues at each layer. The two most well-known models are the OSI reference model, which precisely divides various protocols into layers, and the TCP/IP model that operates on today's Internet, which is a simplification of the OSI model.

Figure 1 - Comparison of OSI and TCP/IP models, source: geeksforgeeks.com



How does IoT relate to the network stack?

Answering this question requires us to point out that IoT devices operate within networks and must transport data to systems that aggregate them. Additionally, in the previous post, we mentioned the diversity of technologies used to deliver data in the initial stages of communication (e.g., the communication between a sensor and a local data aggregation system). The most significant elements that differentiate standard computer communication with the Internet from IoT device communication are the protocols found in the application layer and the data link layer.


Figure 2: Protocols used in IoT, TCP/IP model, source: fb.com/IoTResearch

 

We can observe that in addition to the widely known HTTP protocol used, among other things, in web applications, there are also specific protocols such as CoAP, MQTT, XMPP, DDS, and AMQP. In the data link layer, specific protocols are found for different types of communication, such as Ethernet or WiFi, which can be used when the end device has access to the Internet via a cable or wireless connection. If this is not the case, cellular access or even WiMax remains an option.


Figure 3: Diagram depicting IoT device communication with a cellular network, source: EMnify

 

Communication Models

Before diving into specific protocols, it's worth discussing the general model of server-client communication and what a server actually is. A server can be any device operating on a network that offers certain services. In the context of IoT, a server typically refers to the same as a broker or a device with software that aggregates data from clients (IoT devices with sensors). The following communication models are distinguished in IoT:

  • Request-Response - An example of this model is a smart thermostat that sends a request to a cloud server to fetch weather data and adjust optimal temperature settings in a user's home. The smart thermostat acts as the client, and the cloud server provides weather data in response to the request. In this context, protocols like HTTP and REST APIs are commonly used.

Figure 4: Request-response communication model, source: InterviewBit


  • Publish-Subscribe - In this model, environmental sensors (temperature, humidity, air pollution) installed in a city's public transportation system can be considered. These sensors publish real-time data about various parameters. Various applications and services, such as weather apps, traffic management systems, and pollution monitoring systems, subscribe to this data to provide information to users and make informed decisions. This model is related to a common design pattern often used by developers (Publish-Subscribe/Observer).

Figure 5: Publish-Subscribe communication model, source: geeksforgeeks.com


  • Push-Pull - An example of this model could be an agricultural IoT system in which soil moisture sensors send data about soil conditions to a central data repository. Farmers use their smartphones to retrieve this data to monitor moisture levels in their fields. Sensors push data as it becomes available, and farmers pull the data when needed. The use of separate queues ensures decoupling between message publishers and consumers.

Figure 6: Push-pull communication model, source: geeksforgeeks.com



  • Exclusive Pair - An example in this case could be a home security system that uses WebSocket-based communication (take another look at Figure 2). The security system control panel maintains a continuous open connection with a cloud server, enabling real-time updates and remote control. The server tracks the open connection, ensuring immediate communication between the IoT home security system and the central server. This model allows for instant notifications and remote control of the security system through a mobile app.

Figure 7: Exclusive Pair communication model, source: geeksforgeeks.com

 

As we can see from the examples above, the choice of a specific protocol in the application layer guides us toward a particular communication model. For instance, selecting MQTT leads to the use of the publish-subscribe model, HTTP corresponds to the client-server model, and WebSockets are associated with the Exclusive Pair model.

 

IoT Applications

Due to the reduction in the cost of hardware components and technological advancements, including the development of artificial intelligence (we recommend our previous articles on this topic), sensors will soon be integrated into every aspect of the industry. If a company does not embrace modern solutions in its field, it may become less competitive in the market. Some of the key markets currently employing IoT solutions include:

  • Smart Environment - This involves the control and monitoring of environmental factors such as pollution, natural disasters, waste management, and the planning of green areas. IoT applications in this domain include weather monitoring, air pollution monitoring, noise pollution monitoring, forest fire detection, and river flood detection.
  • Smart Energy - In the realm of IoT, this system can involve the management of electrical energy supply using smart meters and remotely controlled electrical equipment. Potential applications of IoT systems in this area also encompass active demand response, renewable energy systems, energy consumption reporting, and CO2 emission forecasting.
  • Smart Retail - IoT systems in this sector encompass inventory management (smart shelves), convenient payments, and the optimization and automation of supply chain management.
  • Smart Farming - This field involves the use of technologies such as sensors, weather monitoring applications, automation in fertilization, and efficient management of natural resources, all of which are crucial for the agriculture industry. Thanks to new technologies such as drones, sensor networks, and cloud-based data management platforms, IoT supports farmers in making better decisions, ultimately increasing efficiency.
  • Smart Healthcare - IoT systems in healthcare can consist of patient-worn sensors, body area sensors, and systems for pervasive healthcare, combined with big data analytics. Potential applications include remote health monitoring, fitness monitoring, and wearable electronics, ranging from smartwatches to electronic skin.

Summary

Today, we've provided you with basic technical information about IoT systems, communication models, and real-world applications across various market sectors. We'll continue the IoT topic next week, so if you're interested, stay tuned!

 

Sources: