What does the phrase Internet of Things mean? It depends a lot on where you stand in the supply chain. Many have tried to define it, and the definitions are often colored by the needs of their own industries and their own agendas. But as a hardware or software engineer, you already understand the essential element: to build products that are interconnected. And embedded systems will play – and are playing – a crucial role in the development of the IoT. In this article, we will take a look at the Internet and its existing and new protocols supporting the IoT efforts. Before we look at these protocols, let’s define what a thing is because the end device tasks will dictate most of the requirements for the protocols to use.
Industrial Vs. Consumer IoT
The software requirements for industrial and consumer IoT devices can differ quite a bit. Although they might share a common kernel and low-level services, the middleware required by their applications can be radically different. Industrial IoT, i.e. a WSN node represents a software stack for an industrial IoT device, such as a wireless sensor node (WSN). This low-power, low-cost device may run entirely on battery. Such a device might typically use a 32bit processor. It can also use an 8 or 16 bit processor, but with the communications stacks running on an add-on modules. It would use a highly efficient network protocol such as 6LoWPAN to reduce transmission time and save power. It also could communicate over short distances wirelessly using Bluetooth. As an edge node, we need to transfer the data from the wireless network to an IP based network (local or public Internet) and it would use a low-power Wi-Fi or Ethernet.
learly, the software requirements for this device are much greater. It might need a Java VM. It also may well use a vertical market protocol. Unfortunately, the consumer IoT is very fragmented in terms of vertical market protocol (application protocol). Many companies are proposing proprietary solutions. In the home consumer market for example:
There are other examples like power line communication: HomePlug and HomeGrid. In the medical vertical market, organizations like the Continua Alliance, IHE (Integrating the HealthCare Enterprise) or IEEE are also developing and proposing standards.
These protocols are not offered by Micrium. An equipment manufacturer requiring its products to be compatible with one of these consumer IoT protocols need to register with these organizations and then integrate these protocols as part of its product application.
In the Industrial IoT, there is less of this market driven initiative. There is one major activity called the Industrial Internet Consortium (IIC) with AT&T, Cisco, GE, Intel and IBM as founding members. But, outside of IIC, the development of IoT devices and systems is pretty much proprietary. This is why the knowledge of the Internet and the Internet Protocols (IP) are so important now to embedded system developers. Internet Protocol (IP)
The use of IP technology is fundamental to IoT. IP allows for systems interoperability. This feature may not seem important today, but as IoT evolves, systems interoperability will become a major revenue generating capability. Ethernet/Wi-Fi and 6LoWPAN both rely heavily on IPv4 and IPv6.
IP protocols used in IoT
It is certainly possible to build an IoT system with existing Web technologies, even if it is not as efficient as the newer protocols. HTTP(S) and Websockets are common standards, together with XML or JavaScript Object Notation (JSON) in the payload. When using a standard Web browser (HTTP client), JSON provides an abstraction layer for Web developers to create a stateful Web application with a persistent duplex connection to a Web server (HTTP server) by holding two HTTP connections open.
HTTP
HTTP is the foundation of the client-server model used for the Web. The safest method to implement HTTP in your IoT device is to include only a client, not a server. In other words, it is safer when the IoT device can initiate connections to a Web server, but is not able to receive connection requests. After all, we don’t want to allow outside machines to have access to the local network where the IoT devices are installed.
WebSocket
WebSocket is a protocol that provides full-duplex communication over a single TCP connection over which messages can be sent between client and server. It is part of the HTML 5 specification. The WebSocket standard simplifies much of the complexity around bi-directional Web communication and connection management. Using Websockets in conjunction with HTTP is a good solution for IoT devices if the devices can afford the HTTP payloads.
XMPP
XMPP (Extensible Messaging and Presence Protocol) is a good example of an existing Web technology finding new use in the IoT space.
XMPP has its roots in instant messaging and presence information, and has expanded into voice and video calls, collaboration, lightweight middleware, content syndication, and generalized routing of XML data. It is a contender for mass scale management of consumer white goods such as washers, dryers, refrigerators, and so on.
XMPP strengths are its addressing, security, and scalability. This makes it ideal for consumer-oriented IoT applications.
HTTP, Websocket, and XMPP are just examples of technologies being pressed into service for IoT. Other groups are also working furiously to develop solutions for the new challenges IoT is presenting us.
IoT dedicated Protocols
Many IoT experts refer to IoT devices as constrained systems because they believe IoT devices should be as inexpensive as possible and use the smallest MCUs available, while still running a communication stack.
Currently, adapting the Internet for the IoT is one of the main priorities for many of the global standardization bodies.
If your system does not require the features of TCP, and can function with the more limited UDP capabilities, removing the TCP module entirely, greatly helps to reduce the size of the total code footprint of your product. This is what 6LoWPAN (for WSN) and CoAP (light Internet protocol) bring to the IoT universe. CoAPAlthough the Web infrastructure is available and usable for IoT devices, it is too heavy for the majority of IoT applications. In July 2013, IETF released the Constrained Application Protocol (CoAP) for use with low-power and lossy (constrained) nodes and networks (LLNs). CoAP, like HTTP, is a RESTful protocol. CoAP is semantically aligned with HTTP, and even has a one-to-one mapping to and from HTTP. Network devices are constrained by smaller microcontrollers with small quantities of flash memory and RAM, while the constraints on local networks such as 6LoWPAN are due to high packet error rates and a low throughput (tens of kilobits per second). CoAP can be a good protocol for devices operating on battery or energy harvesting. Features of CoAP: CoAP uses UDP Because CoAP uses UDP, some of the TCP functionalities are replicated directly in CoAP. For example, CoAP distinguishes between confirmable (requiring an acknowledgement) and non-confirmable messages.
|