IOT - A brief overview
IOT devices utilize protocols which are efficient and reliable while having low power requirements and can work over low-reliability low-bandwidth networks. The whole IOT architecture depends on use case by use case where one aspect of the architecture is more important to the other, so there is no one solution fit all. Today we will focus on 2 aspects of architecture. The Data transfer layer on how we move the collected data to the processing center, and the communication protocols which details on how we build the IOT field network and which protocol has what features
The Data transfer protocols
These technologies help bring the data collected from the field into the processing centers. Here we have various options on pub-sub, request response, messaging and queuing protocols.
?
MQTT - Message Queuing Telemetry Transport
MQTT is an event driven publish subscribe based lightweight messaging protocol. The devices publish to the broker on topics and the system reads the messages by subscribing to the topics. MQTT has small code footprint and low overheads which can work on limited bandwidth. MQTT uses TCP for message delivery and has 3 levels of Quality of Service for messaging, ensuring reliable messaging in different network environments.
QoS 0: The message is transmitted at most once.
QoS 1: The message is transmitted at least once.
QoS 2: The message is transmitted only once.
CoAP – Constrained Application Protocol
CoAP is a request response model used for networks with low bandwidth and devices with constrained capabilities. It is based on UDP and provides REST interface which is a standard over HTTP between clients and servers.
CoAP has 2 messaging modes
Confirmable – Each request is acknowledged with a Ack message
Non-Confirmable – No acknowledgement of any message
Piggybacking The Ack Message is made part of the response.
XMPP – Extensible Messaging and Presence Protocol
XMPP is an XML based messaging protocol mostly used for Instant messaging, voice and video calls like WebRTC. It uses a decentralized client server architecture. The XMPP project provides multiple modules
Core – This is the base XML streaming layer which supposes TLS
Jingle – This is used for signaling in multimedia for video , voice and file transfer. It uses RTP ( Real time Transport Protocol) as media transport and is compatible with existing multimedia technologies such as the Session Initiation Protocol (SIP) and Session Description Protocol (SDP) so it provides signaling between XMPP and SIP networks.
Multi-User-Chat (MUC) - MUC is an XMPP extension for multi-party information exchange like IRC (Internet Relay Chat) where multiple users can exchange messages in the context of a room. It defines a strong room control model, including the ability to kick and ban users, to name room moderators and administrators, to require membership or passwords in order to join the room.
PubSub – is a event notification model where notification messages are sent over topics to subscribers.
BOSH (Bidirectional-streams Over Synchronous HTTP) – Its two-way communication over HTTP. Its more efficient than other solutions like AJAX.
XMPP does not support QoS and its binary payload must be encoded to base64 before transmission.
?
AMQP – (Advances Message Queuing Protocol)
AMQP is a queue based messaging system where we have producer and consumers, the consumers consumes the messages published on the Queue by the producers. It has 3 components
Exchange – It is the message receiver and router. It filters the messages from producers and route them to right queue.
Queue – Applications listen to specific queues based on business needs.
Bindings – These are rules for who can access which messages.
It supports targeted QoS which ensures delivery guarantee, and delivery of messages to multiple consumers and supports at least once and exactly once delivery models.
??
The Network Protocols
How is the IOT network established, what are our options and what features are provided by each protocol.
IEEE 802.15.4
This is the base for lot of other protocols we will see below. It’s a low data rate WPAN (Wireless Personal Area Network) protocol used for monitoring with devices having low power consumption restrictions. It operates on the ISM (Industrial, Scientific, and Medical – 900,2400 and 5000 MHz) band. It uses the Data and Physical layers. It uses DSSS modulation (Direct sequence spread spectrum) and for low speed it uses BPSK (Binary Phase Shift Keying)?while for high speed version it uses O-QPSK (Offset Quadrature Phase Shift Keying)
This protocol is capable of multiplexing to help interference free access to same channel, and supports Star and mesh topologies. It can operate in 2 modes FFD (Full function device) with full capabilities and RFD (Reduced Function Device) which can only talk to FFD but consumes low power.
It consumes very less power by short packet transfer with low duty cycle transmissions and can be used for upto 75 m range.
The protocol can operate in Slotted CSMA-CA (Carrier-sense multiple access with collision avoidance ) Becon enabled mode with the frames structure managed by a PAN (personal area network ) coordinator.
It can also operate in unSlotted CSMA-CA (with Contention based) non-Beacon enabled mode, Becons get used here only for link layer discovery.
领英推荐
?
6LoWPAN – (Low power Wireless Personal Area Network)
As name suggests, it allows wireless access for small IOT devices. 6LoWPAN is an Internet protocol, It supports IPv6 by compressing and reformatting IPv6 packets to fit to 802.15.4 format. This bridges between IPv6 network and the IEEE 802.15.4 network, two totally different networks.
Their major difference is that the IPv6 network layer packet measures 1,280 bytes, where 802.15.4 data link layer (MAC layer) supports only packet of 127 bytes maximum. 6LoWPAN network consists of one or more stub networks connected to the internet through the Border Router, This Edge Router, routes traffic in and out of the LoWPAN, which is the collection of
6LoWPAN nodes sharing the same address prefix IPv6, with the first 64 bits, it is used with IID (Interface Identifier) to form the IP address. It’s mainly used for SmartGrid usecases where mesh routing is needed. To build out the PAN network it uses LOADng or RPL as routing protocol.
?
LOADng and RPL
LOADng (Lightweight On-demand Ad-hoc Distance-vector Routing Protocol—Next Generation) is a simplified version of AODV (Ad-hoc On-demand Distance Vector). This is primarily ad-hoc network protocol which is reactive routing protocol based on route discovery using messages of route request and route reply. This protocol is efficient in discovering routes to destination by using RREQ (Route requests) and RREPs (Route replies) and incrementing node count for distance calculation like OSPF.
RPL is routing protocol for lossy low power network. Its both proactive and reactive by maintaining topology and resolving inconsistencies by increasing beaconing rates.?Its based on the concept of DAG (Direct Acyclic Graph) to avoid creating loops in the tree constructed by distance vector algorithm
ZigBee
This is the most widely deployed open source enhancement of IEEE 802.15.4. It defines Layer 3 (network) and up, and works with Physical and Data Link layers of 802.15.4. It operates on 912 MHz and 2.4 GHz frequency. There are 2 main components for this
ZDO (ZigBee Device Object) – manages devices, security and policy information.
APS (Application Support Sub-layer) – It acts like a bridge between network and other layers
ZigBee supports star and network topologies, contains a single coordinator in each network, it forms a root and acts like a bridge across networks. There are 2 types of nodes in the topology, ZR (Zigbee router) relays information between nodes connected to it, ZED (Zigbee end device) only talks to parent node and saves power by sleeping. Internally it uses AODV (Ad-hoc On-demand Distance Vector)
?
HART (Highway Addressable Remote Transducer) & Wireless HART
This is mainly used for mobile Smart phone communication. Its derived from IEEE 802.15.4 and operates on 2.4 GHz ISM band. It uses 15 channels to increase reliability. It uses TDMA (Time Division Multiplexing) to avoid collisions whereas ZigBee employs CSMA-CD to avoid collisions. Superframes groups 10ms time slots to control transfer timings for reliable communication.
Wireless version relies on Mesh networking so one device forwards the data from the other.?Whereas Zigbee is mostly tree topology which makes the nodes on trunk critical. The network manager guides each node on when and where to send packet.
?
Z Wave
Zwave is a propriety protocol used for communication among devices used for home automation. It uses Radio Frequency on 908.42 MHz and uses GFSK modulation for communication. It can support 232 nodes in the network and uses mesh topology, for this it needs a central network. The devices can talk to each other, but when they cannot, they can use the central router to route the messages.?It has a much bigger range of 100 ft unlike ZigBee which has 35 ft range. Most home automations use Z-wave for range, non-interference and mesh communication capabilities.
?
Bluetooth
Bluetooth is based on Ad-hoc technology known as Ad-hoc piconets. It also operates in 2.4 GHz ISM band and supports up-to 3Mbps data transfer rate with a range of 100 meters for Class 1 radios. The connection setup is 3 step process with Inquiry (or discovery), Paging (initial connection) and Connection (active participation in transfer or sleep mode). There are 4 modes in which bluetooth works.
Active – actively transmitting data
Sniff – in sleep, but actively listening for connection
Hold – sleeping for defined period and go back to sniff
Park - If a slave wants to remain inactive for some time, it enters into the park mode.
?
RFID (Radio Frequency Identification)
Similar to bar codes, and data encoded in RFID tags can be read by the reader even out of line-of-sight. This is derived from AIDC (Automatic Identification and Data Capture) technology which uses wired communication, RFID uses radio waves for same function. The tag itself contains an antenna and a integrated circuit. The tags can be active or passive. Passive tags have to be powered up by the reader inductively before they can transmit information, whereas the active tags have their own power supply. Its mainly used for inventory management, supply chain, and asset tracking.
?
NFC (Near Field Communication)
NFC is offshoot of RFID and was designed for use by devices in close proximity. Similar to RFID tags, the passive devices here also need reader to power it up using induction and read its data. Active devices like smart phones are able to setup 2 way channel and collect as well as transmit information. The Range for NFC communication is around 20 cms and it uses 13.56 MHz. The transmit rate is upto 424kbs only.
?
ISA 100.11A
International Society of Automation defined protocol for manufacturing and industrial use. It supports QoS levels of Reliable, best effort, real time. The Physical and Data layers are based on IEEE 802.15.4, and network and transport layers support TCP and UDP. It also supports star and mesh topologies. It has similar mesh support to other protocols by supporting Routing and non routing devices and backbone devices act like controller. It is highly secure and keys are managed and distributed by a network security manager.
?
Lot of information above, but each protocol deserves its own post.