An Intro to Communication Channels

DZone 's Guide to

An Intro to Communication Channels

Let's break down the seven-layer OSI model traditional IoT apps use to communicate. We'll go over each layer and touch on the various IoT protocols out there.

· IoT Zone ·
Free Resource

IoT systems enable Things to communicate with servers as well as other Things. As suggested by the name, the “Internet of Things”, Internet technology provides the foundation for this communication. A communication channel enables IoT system communication by combining IoT-specific Internet protocols and a method for connectivity. Here we will look at some of those Internet protocols.  

Existing Internet protocols, such as Transmission Control Protocol/Internet Protocol (TCP/IP), are often too inefficient and power hungry to apply to emerging IoT applications. So here, we will discuss some alternative Internet protocols developed for use by IoT systems.

Message Queuing Telemetry Transport (MQTT) and Constrained Application Protocol (CoAP) are two alternative Internet protocols. Both seek to improve IoT device operation while maintaining interoperation with the Internet. The main difference between MQTT and CoAP is in their implementation. (We’ll go more in-depth on MQTT and CoAP later.)

Before going further, it is helpful to review existing Internet layers and protocols. The Internet is based on TCP/IP communications and operates using the seven-layer OSI model shown in the following chart.

Each layer performs a specific function. Together, the seven layers enable communication across different connectivity solutions, enabling a wide variety of applications.

iot systems communication channel layers

Layer 1: Application Layer

In the application layer, the user inputs data and data is output to the user. This layer provides services for applications, such as email.

Layer 2: Presentation Layer

This layer converts incoming and outgoing data from one format to another for presentation.

Layer 3: Session Layer

This layer sets up and authenticates, coordinates, maintains, and terminates conversations. IoT sessions are very different from traditional Internet sessions. Because of this, a lot of effort has gone into, and will continue to go into, optimizing this layer for IoT applications. The session layer is where CoAP and MQTT usually operate.

Layer 4: Transport Layer

This layer provides communication session management support. This entails the packetization of data, delivery of the packets, and error checking once the data arrives. On the Internet, Transmission Control Protocol (TCP) and Universal Datagram Protocol (UDP) provide these services for most applications. TCP is used for most applications with human interactions with the Web (such as email, Web browsing, gaming, etc.). It also supports acknowledgment, retransmission, and flow control. (Note: These capabilities increase overhead.) For some applications, TCP can be overkill, making UDP the preferred option. UDP is also better suited for real-time data applications such as voice and video. In these cases, it is unlikely you will need to retransmit a voice or video packet. Additional trade offs are discussed below.

Layer 5: Network Layer

This layer handles the addressing and routing of the data. This is where the Internet Protocol (IP) operates and is where an IP address originates. The traditional Internet operates on IPversion4 (IPv4), which uses 32-bit addresses. However, it is starting to evolve toward IPversion6 (IPv6), which uses 128-bit addresses to accommodate substantially more Internet addresses.

Layer 6: Data Link Layer

The data link layer provides a reliable link between two directly connected nodes. The data link layer is also responsible for detecting and fixing packet errors that may form on the physical layer.

Layer 7: Physical Layer

This layer conveys the bit stream through the network at the electrical, optical, or radio level.

At times, you may see groupings of some layers, presented as a 4-layer model. The physical and data link layers combine to form a link layer. Session, presentation, and application combine to form an application layer. Neither approach is more correct than the other. However, we will reference the four-layer model going forward.

Read more about the IoT Technical Stack in the “A Reference Guide to IoT” eBook.

iot ,osi model ,iot protocols ,iot communication ,tutorial

Published at DZone with permission of Jordan Eller , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}