DigiKey-emag-Wireless Modules-Vol-8

Application layer protocol options for M2M and IoT functionality

that every layer essentially ‘hides’ the detailed workings of a given device or software layer from other devices or algorithms with which it’s communicating. That’s because the layers are defined as containing just enough information for the data exchanges at hand. No matter the model used, all establish an application layer as the highest abstraction layer between devices that communicate with each other on a network. Consider the application layer as a concept of the Open Systems Interconnection (OSI) model – in which it was first defined by the International Organisation for Standardisation (ISO) nearly three decades ago for network communications. This classic seven-layer model is somewhat overcomplicated for describing some of today’s protocols, but is still useful for fully understanding data flow within systems: A protocol’s physical layer allows the transmission of raw data (digital bits) as electrical, radio, or optical signals. This layer specifies the pin layouts, voltage levels, data rates, and line impedances of the physical elements carrying the data. Ethernet is a common physical layer protocol. Read the DigiKey article EtherNet/IP versus PROFINET for more on this. The data-link layer connects network nodes to let devices establish connections and correct errors at the physical layer. Within

receiving connection requests that could allow unauthorized outside access to the network. Here, the WebSocket protocol can establish a full-duplex communication via HTTP. Otherwise, the extensible messaging and presence protocol (XMPP) may be preferred for installations that need to address a large number of devices with good security and real-time data communications. When IoT projects are led by staff with an IT background, these familiar standards (from the human-readable web) may be preferred. However, newer IIoT protocols can in some instances be better suited to M2M and other industrial communications. MQTT for vertical connectivity transport functions Seeing the most rapid adoption in IIoT is the Message Queuing Telemetry Transport (MQTT) protocol – a lightweight protocol initially intended for IoT devices with limited memory. Offering operation on compact processing footprints and requiring minimal bandwidth, MQTT was first developed by IBM to connect sensors on oil pipelines. Unlike the constrained application protocol (CoAP), MQTT is already standardized according to ISO/IEC 20922. MQTT uses the somewhat more resource-intensive TCP transport layer and therefore

communication systems so named for the way in which they relay data between networks (and usually reciprocally) for inter-boundary communications. Their functions are often described with the four- layer model of TCP/IP mentioned above. Here, the physical network or link layer is the same as the OSI model’s physical layer. In contrast, the TCP/IP Internet layer (which roughly approximates a combination of the OSI model’s data-link and network layer functions) handles connections as well as data packets. In IPv6, this layer uses 128-bit IP addresses to identify hosts on the network – and allows more than 1038 unique hosts. The transport layer in TCP/IP generally consists of either the transmission control protocol (TCP) or the user datagram protocol (UDP). TCP is generally used for human interactions such as email and web browsing. It provides logical connections, acknowledgment of packets transmitted, retransmission of lost packets, and flow control. However, embedded systems use UDP to get lower overhead and better real- time performance. UDP works for domain name servers (DNS) and the dynamic host configuration protocol (DHCP) as well as new IoT applications. The application layer is the highest level in the TCP/IP model of networks. Functions include those associated with the OSI model’s

session and presentation layers.

Figure 3: Modern networking protocols (and the application layer) are often described using the classic OSI model of industrial (and commercial) networks. In contrast, three-layer IoT architecture models set the application layer above perception and network layers; four-layer models put it above data processing, network, and sensing layers. Five-layer IoT protocol models are similar but add processing and enterprise layers. Image source: Design World

Generic TCP/IP application- layer protocols Different application-layer protocols have different data bandwidths, real-time capabilities, and hardware requirements. These factors along with plant or OEM-team familiarity with a protocol are often an important selection criterion. Though early Internet protocols including the hypertext transfer protocol (HTTP) and simple mail transfer protocol (SMTP) are largely used for human- driven and human-consumed communications, TCP/IP protocols with an IIoT slant are more focused on machine to machine (M2M) and other industrial communications. Complicating matters somewhat is how many established application- layer protocols used in TCP/IP for web-based human interactions with information also have consumer and industrial IoT uses. That’s certainly true for HTTP and SMTP as well as the secure shell (SSH) and file transfer protocol (FTP). Implementing IoT functions with web technologies is usually feasible if eXtensible Markup Language (XML) and JavaScript Object Notation (JSON) are also used. One caveat is that using HTTP has security implications. That’s why it’s usually best if any IoT devices in such systems only include a client – and not a server. This prevents the device from

the IEEE 802 standard, the data- link layer is divided into a Medium Access Control (MAC) layer (again, to let devices connect) and a Logical Link Control (LLC) layer for identifying the next layer to be used (the network layer) as well as error checking and synchronization. Read more about the functions of the data-link layer in the DigiKey article Implementing Industrial Ethernet with 32-bit MCUs. In contrast, the network layer allows the forwarding of data packets to network addresses. Where Internet protocols refer to the Transmission Control Protocol and Internet Protocol (TCP/IP) model (covered in this article’s next section) there’s an Internet layer between the data link and network layers. In fact, the Internet layer is often considered a part of the network layer.

The first of the next three OSI- model layers is the transport layer, which ensures communication reliability and security during data-sequence transfers. Then the session layer controls when devices connect with each other and whether the connection is one- way (simplex) or in two directions (duplex). Finally, the presentation layer allows data translation so that devices using different syntaxes can communicate. The focus of this article – the application layer – is the highest level of abstraction and the one with which users and system software interact.

Internet protocols in industrial automation

Internet protocols are data-

we get technical

42

43

Powered by