{"id":2782,"date":"2018-12-01T18:42:04","date_gmt":"2018-12-01T13:12:04","guid":{"rendered":"http:\/\/navveenbalani.dev\/?p=2782"},"modified":"2019-12-18T19:21:03","modified_gmt":"2019-12-18T13:51:03","slug":"internet-of-things-communication-layer","status":"publish","type":"post","link":"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/","title":{"rendered":"Internet of Things &#8211;  Communication Layer"},"content":{"rendered":"\n<p>In the <a href=\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-architecture-components-and-stack-view\/\">previous article<\/a>, we wet through the devices layer of the architecture. In this article, we would go over the communication layer.<\/p>\n\n\n\n<h3><a>Communication Layer<\/a><\/h3>\n\n\n\n<p>The device layer earlier discussed different types of devices with different networking abilities. Devices will communicate with communication layer to set up network connectivity and send the data to the Internet. This section will feature different communication strategies that one can use based on the available device. We will also discuss different communication protocols. <\/p>\n\n\n\n<h4><a>Communication Strategy<\/a><\/h4>\n\n\n\n<p>The section discusses different\ncommunication strategies that can be used\nwith IoT devices. It will depict how devices will communicate with the Internet\nto transmit or send data. The communication strategy is devised based on the\nnetworking capability of each device. Talking\nabout device networking capability, hosts of IoT devices by itself are\nunable to route data directly to the internet due to protocol incompatibility.\nThough there are some that may be able to connect directly to the Internet. Devices that are unable to connect directly to the\nInternet make use of something called\n\u2018gateway\u2019 or a &#8216;hub.&#8217; We will talk about\ndevice gateway in detail in next section. <\/p>\n\n\n\n<p><strong>Device\nGateway<\/strong><\/p>\n\n\n\n<p>&nbsp;An\nIoT Device gateway is a device that glues or connects incompatible networks or\nprotocols and provides a means to connect devices to the internet. Low powered\ndevices like sensors connect to a gateway through protocols like Z-wave or\nBluetooth LE protocol, which in turn will communicate with the broadband router\nto route the messages to the internet. A broadband router could use WLAN or WI-FI\nto connect to the internet. Protocols\nlike ZigBee or Z-wave by itself are not equipped\nor capable of talking to the internet directly,\nand therefore gateway device is used. The\ngateway will translate the incoming ZigBee data into IP data that can be then routed to the internet. Gateways can\nalso act as a firewall thereby securing\nthe devices from any malicious attack. <\/p>\n\n\n\n<p><strong>Smart Gateway<\/strong> We could also have something called as &#8216;smart&#8217; gateways. Such gateways have their own local storage and embedded application to perform analytics on data streamed directly from the devices. These are also called edge gateways. They are configured right at the edge of the device so that the data need not be sent over the network to the internet and can be analyzed or filtered close to the device in the gateway itself. The concept is also called &#8216;fog computing&#8217; &#8211; a term devised by Cisco. The benefits of edge gateways lie in reduced network traffic and bandwidth, increased  efficiency in\nterms of core data processing and delivering real -time processing.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><em>Tip \u2013\n<\/em><em>Eclipse Kura is an open source\nproject that provides a platform for building IoT edge gateways. It is a smart\napplication container that enables remote management of such gateways and\nprovides a wide range of APIs for allowing you to write and deploy your own IoT application. We would revisit Kura in\nChapter 3.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>Smartphone\nas a gateway<\/strong><\/p>\n\n\n\n<p>Another form of communication could be\nthrough the use of smartphones. Instead of the gateway,\na device can talk to a smartphone through say Bluetooth protocol and the data\ncan be then channelized to the cellular network through a SIM card. This way a Smartphone\ncan act as a gateway and eliminates the need of having a dedicated gateway\ndevice or a broadband router. A limitation to\nthis approach is that smartphone by itself will not automate the process of\ndata communication from the device to the internet. Manual intervention is required to set up the process of\ncommunication, for instance launching the corresponding application on the\nphone.<\/p>\n\n\n\n<p><strong>Direct\nconnectivity<\/strong><\/p>\n\n\n\n<p>Certain devices have the capability to connect directly to the Internet without the need of any gateway. It could be either through Wi-Fi or cellular network. Modern day microcontrollers are equipped with a Wi-Fi capability that enables devices to broadcast itself over the internet. The obvious advantage is that there is no need for any dedicated gateway thereby saving that one extra hop to send the data to the cloud or internet.<\/p>\n\n\n\n<p><strong>Device-to-device<\/strong><\/p>\n\n\n\n<p>Another form is a device-to-device\ncommunication. This form of communication defers the process of relaying data\nto the internet. Devices communicate with each other to form a mesh network.\nDevices communicate to collect information, report their existing states, send\nalerts or perform discovery routines. The communication could be with or\nwithout the human intervention. For example, a home security system may connect\nwith a nearby alarm system to alert if someone approaches a door. The alert\nthen can be sent to the internet so that if you are outside the home, you can\nget the status update.<\/p>\n\n\n\n<p><strong>API\nConnectivity<\/strong><\/p>\n\n\n\n<p>API-based communication is the new talk of the town. In this approach, devices communicate its state to an internet service provider (say A) which then uses an API (often a REST URL) to communicate to another service provider (say B) which then triggers action to another device. This kind of API-based communication eliminates the need of installing a shared gateway. This mode of communication is handy when there are multiple disparate devices associated with a vendor service that needs to shake hands to realize a use case.<\/p>\n\n\n\n<h4><a>Communication protocols<\/a><\/h4>\n\n\n\n<p>Communication protocol is responsible for network connectivity. In the parlance of IoT, we will define two forms of communication protocols, one that provides direct Internet connectivity and another that requires some form of gateway to route the data to the Internet. Let\u2019s first look at the protocols that enable us to connect directly with the Internet. The following diagram shows a typical IoT communication model.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" src=\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2019\/12\/image-70.png\" alt=\"\" class=\"wp-image-2784\" width=\"500\" height=\"350\"\/><\/figure>\n\n\n\n<p><strong>Wi-Fi<\/strong><\/p>\n\n\n\n<p>Wi-Fi protocol needs no introduction; we\ncan\u2019t imagine a world without Wi-Fi. With\nWi-Fi protocol, you can connect any device securely to a Wi-Fi gateway using\nsecurity options supported by the gateway. Wi-Fi devices consume a lot of power and may not be a good\noption when it comes to connecting small constrained devices as it can quickly\nbecome an overhead for these devices. There arises a need to create a standard\nlike Wi-Fi protocol which makes it easier to discover and connect devices seamlessly with the IoT\nnetwork. Hopefully, in future,\nwe would have new standardized protocols like Wi-Fi,\nwhich caters to requirements of\nlow power consumption, longer battery life, etc. for connected products.<\/p>\n\n\n\n<p><strong>Ethernet<\/strong> Ethernet provides a wired option where devices need to be physically connected to communicate over the network. This option might work for connected solutions like home\/office, where devices are generally fixed,  but this is not an option for most of the\nIoT applications, as it makes devices immovable.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><em>Tip &#8211; LoRaWAN<\/em> <em>(Long Range Wide Area Network) is the latest\naddition to the new set of protocols to address the unique requirements for\nIoT. It is optimized for low power consumption and to support large networks\nwith millions and millions of devices. The LoRa\u00ae Alliance @ <\/em><a href=\"https:\/\/www.lora-alliance.org\/\"><em>https:\/\/www.lora-alliance.org\/<\/em><\/a><em> plans to standardize the Low Power Wide\nArea Networks&nbsp;being deployed around the world to enable Internet of Things\napplication.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>Cellular<\/strong><\/p>\n\n\n\n<p>Cellular communication protocols include\nthe connectivity options like 2G, 3G, 4G, LTE, etc. that your phone uses to\nconnect to the cellular network. Similar to phones, this requires a data\nsubscription package from a cellular network provider. From an IoT perspective,\na device should not solely depend on cellular protocol but also allow itself to\nconnect to other protocols like Bluetooth LE or Wi-Fi, so as to use existing\nconnectivity options wherever available.<\/p>\n\n\n\n<p>The second form of communication protocols requires a gateway to translate device specific commands into IP equivalent. Let\u2019s look at some of these protocols:<\/p>\n\n\n\n<p><strong>Bluetooth\nLE<\/strong><\/p>\n\n\n\n<p>Bluetooth Low Energy as the name suggests is a power efficient version of the standard Bluetooth protocol, specifically designed for devices where power consumption is a key requirement. With\nBluetooth LE supported on most of the new generation mobile platforms and\noperating systems, it provides an option for Bluetooth LE devices to connect to\nBluetooth LE mobiles and devices instantly and connect to the cloud platform or\ninteract with the mobile application. Products like\nhealth devices or smart watches can use Bluetooth LE and connect with a Smartphones\nto send data to the cloud for further analysis.<\/p>\n\n\n\n<p><strong>RFID<\/strong><\/p>\n\n\n\n<p>RFID protocol is used to communicate data\nbetween RFID tags and readers. RFID tags\ndescribed earlier in <em>Device Layer<\/em> section\nare primarily used for tracking objects, while RFID readers read the unique tag value, which is then\nfurther processed by the system.&nbsp; A\ntypical example of RFID in the context of\nIoT is to track and trace assets or products, where products are tagged by RFID tags and device gateway is\ninstalled at entry and exit points which also act as a reader. The data (possibly depicting movements\nof assets) is read by the reader and sent over to the cloud platform, which can\ntrigger warnings like an unauthorized movement of a particular asset.<\/p>\n\n\n\n<p><strong>NFC<\/strong><\/p>\n\n\n\n<p>Near Field Communication (NFC) is similar\nto RFID protocol with an exception that the NFC device can act as a tag as well\nas a reader. NFC is also used for peer-to-peer communication between devices like NFC-enabled\nSmartphone, which can share data if the\ndevices are near to each other.<\/p>\n\n\n\n<p>NFC-enabled phones can communicate with other NFC-enabled\ndevices and appliances like washing machine, microwave,\netc. by installing the required application on the phone, which can help\ncontrol the device or appliance remotely.<\/p>\n\n\n\n<p><strong>ZigBee \/ Z-wave<\/strong> ZigBee and Z-wave protocols are used with devices having constrained environment like low processing power, memory and battery life. These protocols are typically used in home automation to create smart homes. They operate on low-frequency radio networks. The frequency can be increased by forming a mesh network topology (connecting similar devices to form a mesh thereby extending communication range). ZigBee and Z-wave cannot directly connect to the internet as they do not support IP networking. You would need a gateway device to route the data to the internet.<\/p>\n\n\n\n<p>In the <a href=\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-application-protocols\/\">next article<\/a>, we will look at some of the communication protocols for IoT.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous article, we wet through the devices layer of the architecture. In this article, we would go over the communication layer. Communication Layer The device layer earlier discussed different types of devices with different networking abilities. Devices will communicate with communication layer to set up network connectivity and send the data to the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2784,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,156],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.0.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Internet of Things - Communication Layer - Current and Future Technology Trends by Navveen Balani<\/title>\n<meta name=\"description\" content=\"Internet of Things - Communication Layer - Articles\" \/>\n<link rel=\"canonical\" href=\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Internet of Things - Communication Layer - Current and Future Technology Trends by Navveen Balani\" \/>\n<meta property=\"og:description\" content=\"Internet of Things - Communication Layer - Articles\" \/>\n<meta property=\"og:url\" content=\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/\" \/>\n<meta property=\"og:site_name\" content=\"Current and Future Technology Trends by Navveen Balani\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-01T13:12:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-18T13:51:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2019\/12\/image-70.png\" \/>\n\t<meta property=\"og:image:width\" content=\"333\" \/>\n\t<meta property=\"og:image:height\" content=\"259\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"8 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/navveenbalani.dev\/#website\",\"url\":\"https:\/\/navveenbalani.dev\/\",\"name\":\"Current and Future Technology Trends by Navveen Balani\",\"description\":\"Current and Future Technology Trends by Navveen Balani\",\"publisher\":{\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/navveenbalani.dev\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2019\/12\/image-70.png\",\"width\":333,\"height\":259},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/#webpage\",\"url\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/\",\"name\":\"Internet of Things - Communication Layer - Current and Future Technology Trends by Navveen Balani\",\"isPartOf\":{\"@id\":\"https:\/\/navveenbalani.dev\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/#primaryimage\"},\"datePublished\":\"2018-12-01T13:12:04+00:00\",\"dateModified\":\"2019-12-18T13:51:03+00:00\",\"description\":\"Internet of Things - Communication Layer - Articles\",\"breadcrumb\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/navveenbalani.dev\/\",\"url\":\"https:\/\/navveenbalani.dev\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/\",\"url\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/\",\"name\":\"Internet of Things &#8211; Communication Layer\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/#webpage\"},\"author\":{\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\"},\"headline\":\"Internet of Things &#8211; Communication Layer\",\"datePublished\":\"2018-12-01T13:12:04+00:00\",\"dateModified\":\"2019-12-18T13:51:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/#webpage\"},\"publisher\":{\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\"},\"image\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/internet-of-things-communication-layer\/#primaryimage\"},\"articleSection\":\"Articles,IOT\",\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\",\"name\":\"Navveen\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/navveenbalani.dev\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2019\/07\/navveen_balani.jpeg\",\"width\":200,\"height\":200,\"caption\":\"Navveen\"},\"logo\":{\"@id\":\"https:\/\/navveenbalani.dev\/#personlogo\"},\"sameAs\":[\"http:\/\/naveenbalani.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts\/2782"}],"collection":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/comments?post=2782"}],"version-history":[{"count":4,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts\/2782\/revisions"}],"predecessor-version":[{"id":2805,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts\/2782\/revisions\/2805"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/media\/2784"}],"wp:attachment":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/media?parent=2782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/categories?post=2782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/tags?post=2782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}