We have seen the introduction of numerous devices, catering to different fields, developed by various companies in different parts of the world. This numerous demand and supply of technology called for protocols and standardization. Protocols and standardization assure developers the ability to exchange and use information across different spheres. It ensures that a device made by one company talks to another device made by some other company.
The architecture for the Internet of Things [IoT] has evolved over a period of time. The existing systems of communication over the internet have had its share of influence. Moreover, it was essential to build a system compatible with the existing system and structure. So, in order to understand the existing IoT architectures, let us take a look at its predecessors, the conceptual and existing models of architecture.
OSI is a traditional and conceptual model of architecture. It standardizes the communication protocol into abstract layers. It does not take into account the underlying technology. This model is considered as a concept, over which designing of practical models took place.
These are the different layers of the model. The number of the layer is bottom up. Let us take a look at each of the layers, in brief.
All the layers of the OSI model are not present in the TCP/IP model but most of the functionalities are distributed among the four layers. Thus, the functionality of each layer remains the same as that of OSI model.
Let us take a look at the protocols that are available in each layer.
The functionality of each of the layers remains the same.
The information flows downward through each layer on the host machine. Each layer in the system adds header and footer to the data to carry out its functions. Application layer generates the data that a user wants to send. Transport layer adds information like squence number, source port, destination port etc. to the application layer. As the next layer, network layer adds its own information over the data coming from transport layer. Network layer adds source and destination IP address. Data Link layer adds Media Access Control (MAC) information. The physical layer too adds data such as the preamble. In some cases, the whole data is rewritten, as in the case of encryption. Thus, each layer adds to the bulk.
Now, at the receiver, the same series of interactions happen, but in reverse order. Each layer sheds the information that the counterpart in the transmitter has added. The shed information is used to carry out each layers' duty. At the top of the cycle, the application layer extracts and provides the user information.
Let us take a look at some of the different protocols in each layer.
Let us take a look at each of the layers and protocols.
CoAP (Constrained Application Protocol) is a machine-to-machine (M2M), specialized web transfer protocol for use with constrained nodes and constrained networks in the Internet of Things (IoT). The CoAP is not only designed to work with devices on the same constrained network, but also with ones over different networks, offering interoperability. The CoRE (Constrained RESTful Environments Working Group) group has designed CoAP with the following features in mind:
Like HTTP, CoAP is based on the wildly successful REST protocol model: Servers make resources available under a URL, and clients access these resources using methods such as GET, PUT, POST, and DELETE. The link between CoAP and HTTP are also defined. But the difference is that CoAP uses the UDP protocol. This allows proxies to be built providing access to CoAP resources via HTTP in a uniform way. The code footprint for CoAP is very less and thus finds its way into microcontrollers with as low as 10 KB of RAM and 100 KB of code space. CoAP has a good security feature too. CoAP's default choice of DTLS (Datagram Transport Layer Security) parameters is equivalent to 3072-bit RSA keys.
MQTT (Message Queuing Telemetry Transport) is an extremely lightweight connectivity protocol designed to cater to the Internet of Things. It is a machine-to-machine (M2M) protocol which works on publish/subscribe principle of transport of message. The small code footprint for its implementation and open-endedness makes it an ideal candidate for its application in IoT.
There are two types of devices participating in the protocol - brokers and clients. Brokers are the devices which host and relays data. Clients are the devices which access and modify data by publishing topics and receive other devices' topics by subscribing. Let us take an example of the bulletin board. On the notice board, you might go through the topics which you have interest in. If you have something interesting to put up on the notice board, you are free to do that. To get the attention of the people who are interested in the topic, it is usually done in big bold letters. This is exactly how MQTT works.
The MQTT also gives a provision for three Quality of Service (QoS) - 0, 1 and 2.
As the QoS value increases, the time taken for the transmission and reception increases. Thus it will slow down the process of publishing. But, in case of important and critical information, we have to ensure the delivery of the topic, at the expense of time taken. The protocol also has a property called the Last Will and Testament. When the client gets disconnected abruptly from the network, it sends an SOS call. This is used to find the fault with the connectivity.
XMPP (Extensible Messaging and Presence Protocol) is a real-time communication protocol for message-oriented middleware based upon open XML (Extensible Markup Language) technology. It was developed for near-time instant messaging (IM), presence information and contact list maintenance. The one thing that makes this protocol unique is that it is an open system since its inception, on 1999. To understand the protocol in a better way let us see what the makers have to say:
The developers claim the XMPP to be the most secure messaging standard. "Battle tested. Independent. Privacy-focused."
The protocol uses a client-server architecture. Every user on the network has a unique JID (Jabber IDs, named after the company who developed the XMPP in the first place). XMPP is a decentralized model - the clients cannot talk to each other and anyone can set-up a server. JIDs are similar to email IDs, with a username and a domain name, separated by at sign, e.g.: [email protected] The name of the resource is at times included in the JID, e.g.: [email protected]/resource. The messages without the resource name get the most priority in all resources for the specific ID. But the messages with the resource name get the most priority in the resources specified in the ID.
The AMQP (Advanced Message Queuing Protocol) is an open standard, binary, application layer protocol for message-oriented middleware. Originated in 2003 as co-operative open effort, AMQP focuses on passing business messages between applications or organisations. AMQP doesn't require the systems to be simultaneously available and works reliably over a distance or over poor networks. Like MQTT, AMQP also supports the publish/subscribe protocol of communication. It also has the Quality of Service (QoS) implemented, ensuring the safe passage of important data.
The AMQP specification is defined in several layers:
The basic unit of data in AMQP is a frame. There are nine AMQP frame bodies. These are used to initiate, control and tear down the transfer of messages between two peers. These are:
6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) is the name of a concluded working group in the Internet area of the IETF. The main aim of the protocol is to enable the smallest devices to use the internet protocol. This takes into consideration the low-power working condition and the low bandwidth of the devices. And thus, developing a protocol which acts as a bridge between the bigger and smaller devices was very hard.
IETF (Internet Engineering Task Force) is an organization that defines and promotes standards used on the Internet. 6LoWPAN is a group set up within IEFT to standardize a protocol over the data link layer. The 6LoWPAN group uses the IEEE 802.15.4 standard to provide the lower layer elements of this wireless sensor network. The 6LoWPAN group has then defined the encapsulation and header compression mechanisms that enable the IPv6 data to be carried of the wireless network.
IEEE 802 standards committee is a committee which specifies wireless personal area network (WPAN) standards. Categorized under IEEE 802 standards committee, IEEE 802.15 is a working group under the Institute of Electrical and Electronics Engineers (IEEE). IEEE is a professional association which standardizes protocols for data communication. Task group one of the IEEE 802 standards committee deals with the 802.15.1: WPAN/Bluetooth technology.
IEEE 802.15.1 defines physical layer (PHY) and Media Access Control (MAC) specification for wireless connectivity. It brings under its umbrella fixed, portable and moving devices within or entering personal operating space. IEEE 802.15.1 standards were issued in 2002 and 2005.
IEEE 802.15.4 is a standard developed in 2003 and maintained by the IEEE 802.15 working group. It defines the operation of the physical and media access control (MAC) layer for low-rate wireless devices, which are the typical IoTs. It is the most used IoT standard for MAC. For low powered devices, the frame formats that the traditional networks offer is bulky. This enabled the evolution of IEEE 802.15.4 standard. In 2008, the introduction of IEEE 802.15.4e extended the IEEE 802.15.4 functionality to include the support for low power devices. The introduction of IEEE 802.15.5 defined a mesh networking capability to IEEE 802.15.4.
The operation of IEEE 802.15.4 is in the physical layer, within the unlicensed frequency band. Rest of the layers are undefined and are customized to suit the requirement. The unlicensed frequency bands are:
The Bluetooth low energy is commonly known as BLE or Bluetooth 4.0 and marketed as Bluetooth Smart. Bluetooth Special Interest Group (Bluetooth SIG) designed and marketed this wireless personal area network technology. BLE is an intelligent and low-power version of the classic Bluetooth wireless technology. The use of BLE in today's products have increased drastically because of some important benefits over the classic Bluetooth technology:
BLE is used in battery-powered devices developed for industries like healthcare, fitness, beacons, security, and home industries. The devices usually transmit a small amount of data as bursts at 1 Mbps speed. However, it is not suitable for sending data in real-time. Some of the features of BLE are:
What is the target market of BLE? Let's take a look:
Bluetooth Low Energy Protocol Stack (Source)
X-10 is a protocol for communication among IoT devices, mainly in the home automation sector. It is called as the father of modern home automation. The existing household wiring, which powers the house, acts as the physical layer to transmit and receive data. Signaling and control of devices use small bursts of radio frequency representing digital information. The digital data is modulated using a 120KHz frequency which is superimposed on the relatively quiet, zero crossings of the AC supply. These digital signals can transport any information, from binary values to float values, depending upon the use case. X-10 devices are connected to the plugs in the wall, like a normal electrical appliance.
The x-10 packets consist of 'house code' followed by one or more than one 'unit codes' and terminated by a 'command code'. Each of these is four bit long. The house code is a letter from A to P while a unit code is a number from 1 to 16. One house code, along with one unit code, addresses each device. Each device in the X-10 network responds to a unique address assigned to it. Thus, an X-10 network can have 256 possible addresses (16 house codes × 16 unit codes).
Introduction of an RF protocol made it possible to interface the wireless devices such as wireless keypads, motion sensors and remote switches. This uses an NEC IR for transmission and a bridge to connect the two technology protocols.
Zigbee is a low powered, low cost, standard on a wireless mesh network designed for battery-powered devices. It follows IEEE 802.15.4 protocol for its personal area networking. Zigbee is designed for home automation, energy meters and other Internet of Things (IoT) device applications. Thus, it sports a small, low power digital radio with low bandwidth consumption, ideal for such applications.
Zigbee was developed in 1998 and standardized in 2003. WiFi and Bluetooth are the wireless personal area networks that Zigbee aimed to substitute. Compared to WiFi and Bluetooth, Zigbee is able to transmit data over a longer distance (10-100m line of sight) with lower latency. Supporting low power devices too increases the mileage of Zigbee over its competitors.
The Zigbee system has three different types of devices:
The number of Zigbee coordinators, Zigbee routers and Zigbee end devices depend upon the topology used. The most common topologies Zigbee supports are:
Star, mesh and cluster tree topologies with coordinator, routers and end devices (Source)
Zigbee Protocol Stack
The ZigBee protocol uses the 802.15.4 standard and operates in the 2.4 GHz frequency range with 250 kbps speed. The maximum number of nodes in the network is 65,560 (ZigBee PRO) with a range up to 100 metres. ZigBee can use 128 bit AES encryption.
Z-Wave, developed by Zensys, is a mesh network wireless protocol. It uses low-energy, unlicensed frequency band in the 800-900 MHz range. It allows wireless control of home appliances and other devices, making it apt for home automation. The system has a central control device which acts as both the hub controller and the portal to the outside communication. This device lets the user control the appliances through wireless key fobs, a wall-mounted keypad or through smartphones, tablets or computers.
Z-Wave technology has seen a good market. From six products in 2005, the protocol has powered 2400 interoperable devices, as of mid-April, 2018.
Z-Wave Protocol Stack
LoRa is a proprietary, wireless communication technology. Cycleo of Grenoble, France, developed LoRa and Semtech acquired it later. It uses low-energy, sub-gigahertz, unlicensed frequency bands like 169 MHz, 433 MHz, 868 MHz and 915 MHz. This makes long-distance communication, in the range of more than 10kms, possible for a battery-operated device.
LoRa technology is built in two parts:
LoRa Protocol Stack
Source for the platforms based on LoRaWAN is Wikipedia.
The "Thread Group" alliance developed Thread. The "Thread Group" alliance, announced in 2014, has over 50 companies, including major players such as Samsung, Arm Holdings, Nest Labs, NXP etc.. It is an open, royalty-free, IPv6 based, secure technology, targeting low-power IoT products. All the features are oriented for its application in home automation. It uses It uses 6LoWPAN in the data link layer, which in turn, uses IEEE 802.15.4 in the physical layer. The main competitor for Thread is technologies like ZigBee and Z-wave.
Thread uses IPv6 for the Internet Protocol addressing and each of the devices is IP-addressable. The technology uses secure AES encryption to encrypt the transmitted data.
Thread Protocol Stack
We have a lot of technologies in the market to choose from. How do we choose one?
Well, for a developer, it depends on the application. As a developer, one has to go through these technologies in and out to decide if it fits the mandate. Some product might have battery optimization as its core highlight. Some others have high data-rate as its selling point. It all depends on the use case of the product.
As a customer, most of the technologies promise the same thing, like ZigBee and Z-Wave. So the next thing that is logical is the cost, market availability and support from the company. Buying a high priced product with zero company support will prove to be useless. The next important thing to keep in mind is the compatibility of the standards. Fortunately, many brands of smart-home networking hubs are already compatible with two or more of these standards.
Will there be a single standard for IoT? It takes time to get to a logical conclusion. For a product market to grow, it needs to have global standards. Thus, the developers might come to an agreement on standards, but only time will tell. On the positive note, the developers have a long list of protocols to choose from.