0% found this document useful (0 votes)
35 views53 pages

Introduction to Internet of Things (IoT)

The document provides an overview of the Internet of Things (IoT), defining it as a network of interconnected devices that communicate over the Internet. It discusses the technologies involved in IoT, including hardware, software, protocols, and cloud platforms, as well as examples of IoT applications in smart homes and cities. Additionally, it covers design principles for connected devices and the role of various application layer protocols like HTTP and HTTPS in IoT communication.

Uploaded by

saikiransandeep1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views53 pages

Introduction to Internet of Things (IoT)

The document provides an overview of the Internet of Things (IoT), defining it as a network of interconnected devices that communicate over the Internet. It discusses the technologies involved in IoT, including hardware, software, protocols, and cloud platforms, as well as examples of IoT applications in smart homes and cities. Additionally, it covers design principles for connected devices and the role of various application layer protocols like HTTP and HTTPS in IoT communication.

Uploaded by

saikiransandeep1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY

(AUTONOMOUS)
Unit -1

An Overview of Internet of Things:

Definition- The Internet is a vast global network of connected servers, computers, tablets
and mobiles that is governed by standard protocols for connected systems. It enables sending,
receiving, or communication of information, connectivity with remote servers, cloud and
analytics platforms.

Internet of Things (IoT) is a concept which enables communication between


internetworking devices and applications, whereby physical objects or ‘things’ communicate
through the Internet. The concept of IoT began with things classified as identity communication
devices. Radio Frequency Identification Device (RFID) is an example of an identity
communication device. Things are tagged to these devices for their identification in future and
can be tracked, controlled and monitored using remote computers connected through the Internet.
The concept of IoT enables, for example, GPS-based tracking, controlling and monitoring of
devices; machine-to-machine (M2M) communication; connected cars; communication between
wearable and personal devices and Industry 4.0. The IoT concept has made smart cities a reality
and is also expected to make self-driving cars functional very soon.

Technology Behind IoT:

The following entities provide a diverse technologyenvironment and are examples of


technologies, which are involved in IoT.

 Hardware (Arduino Raspberry Pi, Intel Galileo, Intel Edison, ARM mBed, Bosch
XDK110, Beagle Bone Black and Wireless SoC)
 Integrated Development Environment (IDE) for developing device software, firmware
and APIs
 Protocols [RPL, CoAP, RESTful HTTP, MQTT, XMPP (Extensible Messaging and
Presence Protocol)].
 Communication ( Powerline Ethernet, RFID, NFC, 6LowPAN, UWB, ZigBee, Bluetooth,
WiFi, WiMax, 2G/3G/4G).
 Network backbone (IPv4, IPv6, UDP and 6LowPAN) ● Software (RIOT OS, Contiki OS,
Thingsquare Mist firmware, Eclipse IoT).
 Internetwork Cloud Platforms/Data Centre (Sense, ThingWorx, Nimbits, Xively,
openHAB, AWS IoT, IBM BlueMix, CISCO IoT, IOx and Fog, EvryThng, Azure, TCS
CUP).
 Machine learning algorithms and software. An example of machine-learning software is
GROK from Numenta Inc. that uses machine intelligence to analyse the streaming data
from clouds and uncover anomalies, has the ability to learn continuously from data and
ability to drive action from the output of GROK’s data models and perform high level of
automation for analysing streaming data.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
The following five entities can be considered for the five levels behind an IoT system

 Device platform consisting of device hardware and software using a microcontroller (or
SoC or custom chip), and software for the device APIs and web applications.
 Connecting and networking (connectivity protocols and circuits) enabling
internetworking of devices and physical objects called things and enabling the internet
connectivity to remote servers.
 Server and web programming enabling web applications and web services.
 Cloud platform enabling storage, computing prototype and product development
platforms.
 Online transactions processing, online analytics processing, data analytics, predictive
analytics and knowledge discovery enabling wider applications of an IoT system.

Sources of IOT:

Examples of hardware sources for IoT prototype development are Arduino Yún,
Microduino, Beagle Board and RasWIK. Hardware prototype needs an IDE for developing
device software, firmware and APIs.

Popular IoT Development Boards:

Arduino Yún- Arduino Yún board uses microcontroller ATmega32u4 that supports
Arduino and includes Wi-Fi, Ethernet, USB port, micro-SD card slot and three reset buttons. The
board also combines with Atheros AR9331 that runs Linux.

Microduino- Microduino is a small board compatible with Arduino that can be stacked
with the other boards. All the hardware designs are open source.

Intel Galileo- Intel Galileo is a line of Arduino-certified development boards. Galileo is


based on Intel x86 architecture. It is open-source hardware that features the Intel SOC X1000
Quark based Soc.

Galileo is pin-compatible with Arduino. It has 20 digital I/O (12 GPIOs fully native), 12-
bit PWM for more precise control, six analog inputs and supports power over Ethernet (PoE).

Intel Edison- Intel Edison19 is a compute module. It enables creation of prototypes and
fast development of prototyping projects and rapidly produces IoT and wearable computing
devices. It enables seamless device internetworking and device-to-cloud communication. It
includes foundational tools. The tools collect, store and process data in the cloud, and process
rules on the data stream. It generates triggers and alerts based on advanced analytics.

Beagle Board- Beagle Bone based board has very low power requirement. It is a card-
like computer which can run Android and Linux. Both the hardware designs and the software for
the IoT devices are open source.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Raspberry Pi Wireless Inventors Kit (RasWIK)- RasWIK enables Raspberry Pi Wi-Fi
connected devices. It includes documentation for 29 different projects or you can come up with
one of your own. There is a fee for the devices but all of the included code is open source, and
you can use it to build commercial products as well.

Examples of IOT:

Examples of IoT usages are wearable devices such as watches, fitness trackers, sleep
monitors and heart monitors etc. Fitbit (for example, Fitbit Alta fitness tracker), Garmin and
other companies manufacture many such devices. Microsoft (Microsoft band might soon be
discontinued), Xiaomi and other manufacturers make tracking bands. A fitness tracker wearable
band has the following functions:

 Track steps, distance, calories burned and active minutes.


 See stats and time with a bright OLED tap display.
 Automatically track how long and how well you sleep and set a silent, vibrating
alarm.
 Personalize with interchangeable metal, leather and classic bands.
 Get calls, texts and calendar notifications at a glance when the phone is in a
defined range.

Wearable Smart Watch:

Smart Home:

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Sensors and actuators manage a smart home with an Internet connection. Wired and wireless
sensors are incorporated into the security sensors, cameras, thermostats, smart plugs, lights and
entertainment systems. Do-it-Yourself (DIY) sensors and actuators, include smart plug, motion
detector, door/window detector, smoke detector, energy meter interface (electric, gas, water),
remote control (built-in authentication), smart relay, surveillance camera, Wireless Hi-Fi
speakers, HUE LED lights, electric utility meter etc.

A connected home has the following applications deployed in a smart home:

 Mobile, tablets, IP-TV, VOIP telephony, video-conferencing, video-on-demand,


videosurveillance, Wi-Fi and internet .
 Home security: Access control and security alerts .Lighting control.
 Home healthcare.
 Fire detection or Leak detection.
 Energy efficiency.
 Solar panel monitoring and control.
 Temperature monitoring and HVAC control.
 Refrigerator network with maintenance and service centres.
 Automated meter reading.

Smart Cities:

The IoT concept extends to Internet of Everything (IoE) for developing smart cities. A four-layer
architectural framework developed at CISCO for a city is as follows:

 Layer 1 consists of sensors, sensor networks and devices network in parking spaces,
hospitals, streets, vehicles, banks, water supply, roads, bridges and railroads. Bluetooth,
ZigBee, NFC, WiFi are the protocols used at this layer.
 Layer 2 captures data at distributed computing points where data is processed, stored and
analysed.
 Layer 3 is meant for central collection services, connected data centres, cloud and
enterprise servers for data analytics applications.
 Layer 4 consists of new innovative applications, such as waste containers’ monitoring,
WSNs for power loss monitoring, bike sharing management and smart parking. Smart
parking refers to services for motorists that informs them about the nearby parking
services with vacant spaces in advance.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

Design Principles for Connected Devices:

IoT or M2M device data refers to the data meant for communication to an application,
service or process. Data also refers to data received by a device for its monitoring or for
actions at actuator in it.

Data stack - denotes the data received after the actions at various in-between layers (or
levels or domains). Layers in Open Systems Interconnection (OSI) model are Application,
Presentation, Session, Transport, Network, Data-link and Physical.

Actions at the data-adaptation or other layers can be related to data privacy, data security,
data consolidation, aggregation, compaction and fusion. An action can be a

gateway action—using one protocol for reception and another one for transmission.

Following are the key terms which need to be understood to learn the design principles of
connected devices for IoTs:

Layer- refers to a stage during a set of actions at which the action is taken as per a specific
protocol or method, and then the result passes to the next layer until the set of actions
complete. A layer may consist of various sublayers.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Physical layer -refers to a layer at transmitting-node or at the receiving node for the data
bits. The transfer uses physical systems and refers to wireless or wired transmission. This
layer is the lowest layer.

Application layer - refers to a layer for transmitting or receiving the data bits of an
application. Data bits route across the network and transfer takes place as follows:
application data from the application layer transfers after passing through several in-between
layers to the physical layer, and from there it transmits to the receiving-end physical layer.
Then, the data at the receiving node transfers from the physical layer to the application layer
after passing through several in-between layers.

Level- refers to a stage from the lowest to the highest. For example, acquiring device data
and actions that may be considered at the lowest level and actions in business processes at the
highest level.

Domain- refers to a set of software, layers or levels having specific applications and
capabilities. For example, CoRE network, access network, service capabilities and
applications can be considered as one domain, say, network domain. A domain generally has
limited interactions with other domains or outside the domain.

Gateway- refers to software for connecting two application layers, one at the sender and the
other at the receiver [application layer gateway (ALG)]. A gateway may be of different types.
A communication gateway at device and gateway domain has capabilities as protocol-
conversion during communication between two ends when each end uses distinct protocols.
An Internet gateway may have capabilities besides protocol conversion, transcoding data,
device management and data-enrichment before the data communicate over the Internet.

IP stands for Internet Protocol version 6 (IPv6) or Internet Protocol version 4 (IPv4) for the
network layer (v6 means version 6, v4 version 4).

Header- means a set of octets containing information about the data being sent. Header
packs the data of a layer before transmission to the next layer during communication between
two end-points. The size of a header and its fields are according to the protocol used for
creating data stack at a layer. For example, IPv4 header has fields as per IP network layer,
Universal Datagram Protocol (UDP) header as per UDP at the transport layer and so on. Each
header field has distinct meanings. The field size can be between 1 and 32-bit in a packet. A
field helps in processing the packet when transferring it from one layer to the next one.

Internet Connectivity:

Internet connectivity is through a set of routers in a global network of routers which carry
data packets as per IP protocol from a source end to another and vice versa. A source sends
data packets to a destination using IETF standardised formats.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

Application Layer Protocols: HTTP,HTTPS,FTP,TELNET:

TCP/IP suite consists of a number application layer protocols. For example, HTTP, HTTPS,
FTP, Telnet and others. A port uses a protocol for sending and receiving messages. A TCP/IP
message must be sent from the right port at the transmission end and to the right port at the
receiver end, else the receiver port does not listen.

HTTP and HTTPS Ports:

 Hyper Text Transfer Protocol (HTTP) port number is 80. A web HTTP server listens
to port 80 only and responds to port 80 only. An HTTP port sends application data
stack at the output to the lower layer using the HTTP protocol.
 An HTTP port uses a URL like [Link] [Link]/. The default port is
taken as 80. The port number can be specified after the TLD. For example, after
‘.com’ in URL [Link] [Link]/.
 HTTPS (HTTP over Secure Socket Layer or TLS) port number is 443. An HTTPS
port sends a URL; for example,
[Link] numbers. Here, TLD
is .org, domain name is [Link] and Subdomain name is en. Resource URL is at
/wiki/List_of_TCP_and_UDP_port_numbers.
 The port receives the data stack at the input at the receiver end. Each port at the
application layer uses a distinct protocol. A port is assigned a number according to
protocol used for transmission and reception.

Features of HTTP:

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
 HTTP is the standard protocol for· requesting a URL defined web-page resource, and for
sending a response to the web server. An HTTP client requests an HTTP server on the
Internet and the server responds by sending a response. The response may be with or
without applying a process.
 HTTP is a stateless protocol. This is because for an HTTP request, the protocol assumes a
fresh request. It means there is no session or sequence number field or no field that is
retained in the next exchange. This makes a current exchange by an HTTP request
independent of the previous exchanges. The later exchanges do not depend on the current
one. E-commerce like application needs a state management mechanism. The stateless
feature of HTTP is compensated by a method as: A cookie is a text file which creates
during a particular pair of exchanges of HTTP request and response. The creation is
either at a CGI or processing program. For example, JavaScript or script or at a client. A
prior exchange may then depend on this cookie. The cookie thus provides an HTTP state
management mechanism.
 Basically, HTTP is a file transfer-like protocol. We use it more efficiently than the FTP
(a protocol for a file transfer on the Internet) because in FTP, we have to give a certain
command. Then, a communication establishes between two systems just to retrieve a
specified file. On the other hand, HTTP is simple. There are no command line overheads.
This makes it easy to explore a website URL. A request (from a client) and reply (from a
server) is the paradigm.
 The HTTP protocol is very light (a small format) and thus speedy as compared to other
protocols, such as FTP. HTTP is able to transfer any type of data to a client provided it is
capable of handling that data.
 HTTP is flexible. Assume during a client web connection, the connection breaks. The
client can start by re-connecting. Being a stateless protocol, HTTP does not keep track of
the state as FTP does. Each time a connection establishes between the web server and the
client, both these interpret this connection as a new connection. Simplicity is a must
because a webpage has the URL resources distributed over a number of servers.
 HTTP protocol is based on Object Oriented Programming System (OOPS). Methods are
applied to objects identified by a URL. It means as in the normal case of an Object
Oriented Program, various methods apply on an object.
 Following features have been included from HTTP 1.0 and 1.1 version onwards: (a)
Multimedia file access is feasible due to provision for the MIME (Multipurpose Internet
Mail Extension) type file definition.
 Eight HTTP specific specified methods and extension methods included from HTTP 1.1
version onwards. The HTTP specific methods are as follows. 1. GET. 2. POST. 3.
HEAD. 4. CONNECT. 5. PUT. 6. DELETE. 7. TRACE. 8. OPTIONS. (Last four from
1.1.)
 Earlier versions, GET follows a space and then the document name. The server returns
the documents and closes the connection. The POST method permits form processing as
using it the client transmits the form data or other information to the server from 1.1.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Also, the server does not close the connection after response and thus response can be
processed before it is sent.
 A provision of user authentication exits besides the basic authentication.
 Digest Access Authentication prevents the transmission of username and password as
HTML or text from HTTP 1.1 version onwards.
 A host header field adds to support those ports and virtual hosts that do not accept or
send IP packets. An Error report to Client when an HTTP request is without a Host
header field from HTTP 1.1 version onwards.

Note and Important shortcut points to remember

 HTTP, HTTPS, FTP, Telnet, SMTP, DNS, DHCP, PoP3, SNMP, LDAP, XMPP, XMPP-
SSL, CoAP, LWM2M and IPSec are protocols for the application layer/application-
support layer ports.
 A URL specifies the protocol when sending a request for a resource. For example, [Link]
coap://, https:// and ws:// before a domain name.
 HTTP is stateless communication. A method is used to save states during communication
in web applications.
 An HTTP client is used for a web server for requesting a webpage as response from an
HTTP server.
 An HTTPS port is for an HTTP message over a secure socket layer or TLS.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
 A port sends a TCP/IP message to a receiver port. IANA assigns a port number for each
protocol. A receiver port listens only if the sender port is using the right port and sends to
the right port.
 A port number associates a protocol at the application/application-support layer. For
example, port number 80 associates HTTP.

UNIT-II

Business Models for Business Processes in the IOT:

Business is driving force for growth of industry and technologies. This chapter focuses on
design of business models, need of innovation in a model, value propositions in a model and
value creation using a model with reference to IoT and IIoT.

Following are the lessons learnt earlier and new key terms, which require understanding
for learning business model design, innovation and value creation in business processes.

 Application or App -means software for application, such as software for creating
and sending an SMS, measuring and sending the measured data, or receiving message
from a specified sender. Application means application software. App is the
abbreviation popular for application in the device whenever only one specific task is
executed following user interaction(s).
 Service -means a mechanism, which enables the provisioning of access to one or
more capabilities. An interface for a service provides the access to the capabilities.
The access to each capability is consistent with the constraints and policies, specified
by a service description.
 Business intelligence -(BI) is a process that enables a business service to extract new
facts and knowledge, and then undertake better decisions. The new facts and
knowledge follow from the earlier results of data processing, aggregation and then
analysing those results.
 Business process -(BP) is an activity or series of activities or a collection of inter-
related structured activities, tasks or processes. A BP serves a particular goal or
specific result or service or product. The BP is a representation or process matrix or
flowchart of a sequence of activities with interleaving decision points.
 Distributed BP- (DBP) is a collection of logically interrelated business processes.
DBP reduces the complexity and communication costs, and enables faster responses
and smaller processing load at the central BP system. DBP is similar to the

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
distribution of control processes for each group of lights at the gateway itself with
reduced complexity, communication costs, faster responses and smaller processing
load at the central system of lighting control. DBP management is management of
DBPs in an enterprise network.

IOT/M2M Systems,Layers and Designs Standardization:

A number of international organisations have taken action for IoT design standardisation.
Following are the examples:

Internet Engineering Task Force (IETF), an international body initiated actions for
addressing and working on the recommendations for the engineering specifications for the
Internet of Things. IETF suggests the specifications for the layers, and the engineering aspects
for the IoT communication, networks and applications.

International Telecommunication Union for Telecommunication (ITU-T) suggested a


reference model for IoT domain, network and transport capabilities for the IoT services and the
applications at the application and application-support layers.

European Telecommunication Standards Institute (ETSI) initiated the development of a


set of standards for the network, and devices and gateway domains for the communication
between machines (M2M). ETSI proposed high-level architecture for applications and service
capabilities.

Open Geospatial Consortium (OGC), an International Industry Consortium, has also


suggested open standards for sensors’ discovery, capabilities, quality and other aspects with
support to geographical information web support. Following subsections describe these
standardization efforts.

Modified OSI model for IOT and IETF:

OSI protocols mean a family of information exchange standards developed jointly by the
ISO and the ITU-T. The seven-layer OSI model is a standard model. It gives the basic outline for
designing a communication network. Various models for data interchanges consider the layers
specified by the OSI model, and modify it for simplicity according to the requirement. Similarly,
IETF suggests modifications in the OSI model for the IoT/M2M.

Classical seven-layer OSI model has shown in below and the modifications in that model
proposed by IETF (in the middle). Data communicates from device end to application end. Each
layer processes the received data and creates a new data stack which transfers it to the next layer.
The processing takes place at the in-between layers, i.e. between the bottom functional-layer to
the top layer. Device end also receives data from an application/service after processing at the in-
between layers.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Gather + Enrich + Stream + (Manage + Acquire + Organise +Analyse) = IoT
Applications and Services.

New applications and services are present at the application layer 6. A modification to
this is that the application-support layer 5 uses protocols, such as CoAP. IoT applications and
services commonly use them for network communication. The CoAP protocol at the layer is
used for the request/response interactions between the client and server at the network. Similarly,
the application-support layer may include processes for data managing, acquiring, organising and
analysing which are mostly used by applications and services.

Modifications are also at the data-link layer 2 (L2) and physical layer 1 (L1). The new
layers are data-adaptation (new L2) and physical cum data-link (new L1). The dataadaptation
layer includes a gateway. The gateway enables communication between the devices network and
the web. A physical IoT/M2M device hardware may integrate a wireless transceiver using a
communication protocol as well as a data-link protocol for linking the data stacks of L1 and L2.

Example of IETF for Internet of Streetlights:

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

ETSI M2M Domains and High-Level Capabilities:

A domain specifies the functional areas. High-level architecture means architecture for
functional and structural views. Figure 2.3 shows ETSI M2M domains and architecture, and the
high-level capabilities of each domain. It also shows that the architecture correspondences with
the six-layer modified OSI model as well as the four layers of the ITU-T reference model.

The ETSI network domain has six capabilities and functions:

 M2M applications
 M2M service capabilities
 M2M management functions
 Network management functions
 CoRE network (for example, 3G and IP networks, network control functions,
interconnections among networks)
 Access network (for example, LPWAN (low power wide area network), WLAN (Wi-Fi)
and WiMax networks)

The ETSI device and gateway domain has the following functional units:

 Gateway between M2M area network, and CoRE and access network, possessing M2M
service capabilities and applications
 M2M area network (for example, Bluetooth, ZigBee NFC, PAN, LAN)
 M2M devices

Example of M2M ETSI domains and high level architecture for applications and services
ATMs-to-bank servers:

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

Communication Technologies:

Physical cum data-link layer in the model consists of a local area network/personal area
network. A local network of IoT or M2M device deploys one of the two types of technologies—
wireless or wired communication technologies. Figure 2.4 shows connected devices (1st to ith)
connectivity using different technologies for communication of data from and to devices to the
local network connectivity to a gateway.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Above shows number of devices present in an IoT or M2M devices network. The figure
shows the local area network of devices. The connectivity between the devices (left-hand side) is
by using RF, Bluetooth Smart Energy, ZigBee IP, ZigBee NAN (neighbourhood area network),
NFC or 6LoWPAN or mobile. Tens of bytes communicate at an instance between the device and
local devices network. Following subsections describe the technologies and standards
recommended for the communication.

Wireless Communication Technology:

Near-Field Communication (NFC)

Near-Field communication (NFC) is an enhancement of ISO/IEC2 14443 standard for


contact-less proximity-card.

NFC is a short distance (20 cm) wireless communication technology. It enables data
exchange between cards in proximity and other devices. Examples of applications of NFC are
proximity-card reader/RFID/IoT/M2M/mobile device, mobile payment wallet, electronic keys
for car, house, office entry keys and biometric passport readers.

NFC devices transmit and receive data at the same instance and the setup time (time
taken to start the communication) is 0.1 s. The device or its reader can generate RF fields for the
nearby passive devices such as passive RFID. An NFC device can check RF field and detect
collision of transmitted signals. The device can check collision when the received signal bits do
not match with the transmitted signal bits. Features of an NFC device are:

Range of functioning is within 10 to 20 cm. The device can also communicate with
Bluetooth and Wi-Fi devices in order to extend the distance from 10 cm to 30 m or higher. The
device is able to receive and pass the data to a Bluetooth connection or standardized LAN or Wi-
Fi using information handover functions. Device data transfer rates are 106 kbps, 212 kbps, 424
kbps and 848 kbps (bps stands for bit per second, kbps for kilo bit per second). Three modes of
communication are:

 Point-to-point (P2P) mode: Both devices use the active devices in which RF
fields alternately generate when communicating.
 Card-emulation mode: Communication without interruption for the read and
write as required in a smart card and smart card reader. FeliCa™ and Mifare™
standards are protocols for reading and writing data on the card device and reader,
and then the reader can transfer information to Bluetooth or LAN.
 Reader mode: Using NFC the device reads passive RFID device. The RF field is
generated by an active NFC device. This enables the passive device to
communicate.

RFID:

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Radio Frequency Identification (RFID) is an automatic identification method. RFIDs use
the Internet. RFID usage is, therefore, in remote storage and retrieval of data is done at the RFID
tags. An RFID device functions as a tag or label, which may be placed on an object. The object
can then be tracked for the movements. The object may be a parcel, person, bird or an animal.
IoT applications of RFID are in business processes, such as parcels tracking and inventory
control, sales log-ins and supply-chain management. Section 7.5.1 describes the details of the
technology.

Bluetooth BR/EDR and Bluetooth Low Energy:

Bluetooth devices follow IEEE 802.15.1 standard protocol for L1 (physical cum data-link
layer). BT devices form a WPAN devices network. Two types of modes for the devices are
Bluetooth BR/EDR (Basic Rate 1 Mbps/Enhanced Data Rate 2 Mbps and 3 Mbps) and Bluetooth
low energy (BT LE 1Mbps). A latest version is Bluetooth v4.2. BT LE is also called Bluetooth
Smart. Bluetooth v4.2 (December 2014) provides the LE data packet length extension, link layer
privacy and secure connections, extended scanner and filter link layer policies and IPSP. BT LE
range is 150 m at 10 mW power output, data transfer rate is 1 Mbps and setup time is less than 6
s.

Bluetooth v5, released in June 2016, has increased the broadcast capacity by 800%,
quadrupled the range and doubled the speed.

ZigBee IP/ZigBee SE 2.0:

 ZigBee devices follow the IEEE 802.15.4 standard protocol L1 (physical cum data-link layer).
ZigBee devices form a WPAN devices network.
 ZigBee end-point devices form a WPAN of embedded sensors, actuators, appliances, controllers
or medical data systems which connect to the Internet for IoT applications, services and
business processes.
 ZigBee Neighbourhood Area Network (NAN) is a version for a smart grid. ZigBee smart energy
version 2.0 has energy management and energy efficiency capabilities using an IP network.

The features of ZigBee IP are:

 L1 layer PDU = 127 B


 Used for low-power, short-range WPAN
 The device can function in six modes—end point, ZigBee-ZigBee devices router, ZigBee network
coordinator, ZigBee-IP coordinator, ZigBee-IP router and IP host.
 ZigBee IP enhancement provisions the IPv6 connectivity. A ZigBee IP device is a Reduced
Function Device (RFD). RFD means one that functions for the ‘sleepy’/ battery-operated device.
Sleepy means one that wakes up infrequently, sends data and then goes back to sleep. ZigBee IP
supports IPv6 network with 6LoWPAN header compression, connection for Internet
communication and control of low power devices, TCP/UDP transport layer and TLSv1.2 public

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
key (RSA and ECC) and PSK cipher suite for end-to-end security protocol, end-to-end means
application layer to physical layer.
 The ZigBee router uses reactive and proactive protocols for routing mode, which enable
applications in big-scale automation and remote controls.
 A self-configuring and self-healing dynamic pairing mesh network, supports both multicast and
unicast options.
 Multicast forwarding to support multicast Domain Name System (mDNS) based service
discovery (SD)
 Support to development of discovery mechanism with full application confirmation
 Support to pairing of coordinator with end-point devices and routers in star topology
 Provides bigger network using multiple star topology and inter-PAN communications
 Support to sensor nodes and sensor (or appliances) network integration, sensor and appliances
devices configured as router or end-devices
 Low latency (< 10 ms) link layer connection
 Range is 10–200 m, data transfer rate is 250 kbps, low power operation
 ISM band frequencies direct sequence spread spectrum 16-channel radio, and provide link level
security using AES-CCM-128 (Example 2.4)
 Includes RFD in ZigBee SE 2.0

Comparison of all communication technologies:

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

Note and Important shortcut points to remember

 IoT/M2M devices, RFIDs, sensors, actuators and controllers send mostly 10s of bytes
of data.
 NFC, BT low energy, ZigBee IP, ZigBee NAN, RF transceivers and modules and
mobile GPRS/GSM are protocols which can be used for physical transmission of bits
from the devices (sensors/actuators/RF devices/IEEE 802.15.4
devices/controllers/nodes) or reception at them. The devices communicate mostly
100s of bytes of data at an instance.
 NFC device range is 10 to 20 cm with data transfer rates as 106 kbps, 212 kbps, 424
kbps and 848 kbps
 NFC device is able to receive and pass data to Bluetooth connection and WLAN
802.11 for information handover functions
 RFID is a device which an access point identifies by charging the RFID circuit
 BT LE communicates using 802.15.1 protocol with low power dissipation and short
frames in peerto-peer star topology network and data transfer rates is 1 Mbps.
 ZigBee IP communicates using 802.15.4 protocol in low power dissipation and 127 B
data frames, and communicates on Internet using 6LoWPAN, IPv6, RPL/ND and
TLSv1.2. ZigBee data transfer rates are 250 kbps, 40 kbps and 20 kbps.
 Wi-Fi network uses WLAN IEEE 802.11 protocol. 802.11 a, b, g and n are popularly
used.
 Wi-Fi network functions with high data transfer rates, mobility, flexible, reliability
and scalable network. Interoperability with wireless as well as wired infrastructure
ensures compatibility, enables easier access and hides complexity when enabling the
wireless access to data, media and streams, applications and services.
 Wireless USB uses UWB (ultra wide band) 5.1 GHz to 10.6 GHz frequencies for
short-range personal area network (high speed 480 Mbps 3 m or 110 Mbps 10 m
channel USB protocol for wireless communication).
 UART, SPI, I2C, Ethernet and USB are bus-topology-based serial communication
protocols and use wired communication.

Data Enrichment and Consolidation:

A gateway at a data-adaptation layer has several functions. These are data privacy, data
security, data enrichment, data consolidation, transformation and device management. Below
figure shows IoT or M2M gateway consisting of data enrichment, consolidation and device
management, and communication frameworks.

Recall ITU-T reference model. The model’s lowest layer is the device layer. This layer
has device and gateway capabilities. Also, recall device and gateway domain in ETSI IoT

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
architecture. The domain consists of a gateway between M2M area network and CoRE and
access network. A gateway consists of the data enrichment, consolidation and IoT
communication frameworks. The communication gateway enables the devices to communicate
and network with the web. The communication gateway uses message transport protocols and
web communication protocols for the Internet. Chapter 3 describes these protocols. The gateway
includes two functions viz. data management and consolidation, and connected device
management.

Data Management and Consolidation Gateway:

Gateway includes the provisions for one or more of the following functions: transcoding
and data management. Following are data management and consolidation functions:

 Transcoding
 Privacy, security
 Integration
 Compaction and fusion

Transcoding:

Transcoding means data adaptation, conversion and change of protocol, format or code
using software. The gateway renders the web response and messages in formats and
representations required and acceptable at an IoT device. Similarly, the IoT device requests are
adapted, converted and changed into required formats acceptable at the server by the transcoding
software.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
For example, use of transcoding enables the message request characters to be in ASCII
format at the device and in Unicode at the server. It also enables the use of XML format database
at the device, while the server has a DB2, Oracle or any other database. Transcoding involves
formats, data and code conversion from one end to another when the multimedia data is
transferred from a server to the mobile TV, Internet TV, VoIP phone or smartphone as the client
devices. Transcoding applications also involve filtering, compression or decompression.

A transcoding proxy can execute itself on the client system or the application server. A
transcoding proxy has conversion, computational and analysing capabilities, while a gateway has
conversion and computational capabilities only.

Privacy:

Data such as patient medical data, data for supplying goods in a company from and to
different locations, and changes in inventories, may need privacy and protection from conscious
or unconscious transfer to untrustworthy destinations using the Internet.

Privacy is an aspect of data management and must be remembered while designing an


application. The design should ensure privacy by ensuring that the data at the receiving end is
considered anonymous from an individual or company.

Following are the components of the privacy model:

 Devices and applications identity-management


 Authentication
 Authorization
 Trust
 Reputation

Secure Data Access:

Access to data needs to be secure. The design ensures the authentication of a request for
data and authorisation for accessing a response or service. It may also include auditing of
requests and accesses of the responses for accountability in future.

Example described how a layer provides the confidentiality and authorisation using
AES-128 and CCM. End-to-end security is another aspect while implies using a security protocol
at each layer, physical, logical link and transport layers during communication at both ends in a
network.

Data Gathering and Enrichment:

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
IoT/M2M applications involve actions such as data-gathering (acquisition), validation,
storage, processing, reminiscence (retention) and analysis.

Data Dissemination:

Consider the following three steps for data enrichment before the data disseminates to the
network as aggregation, compaction and fusion.

Aggregation refers to the process of joining together present and previously received data
frames after removing redundant or duplicate data.

Compaction means making information short without changing the meaning or context;
for example, transmitting only the incremental data so that the information sent is short.

Fusion means formatting the information received in parts through various data frames
and several types of data (or data from several sources), removing redundancy in the received
data and presenting the formatted information created from the information parts. Data fusion is
used in cases when the individual records are not required and/or are not retrievable later.

Device Management at Gateway:

Device Management (DM) means provisioning for the device ID or address which is
distinct from other resources, device activating, configuring (managing device parameters and
settings), registering, deregistering, attaching and detaching.

Device management also means accepting subscription for its resources. Device fault
management means course of actions and guidelines to be followed in case if a fault develops in
the device.

Open Mobile Alliance (OMA)-DM and several standards are used for device
management. OMA-DM model suggests the use of a DM server which interacts with devices
through a gateway in case of IoT/M2M applications. A DM server is a server for assigning the
device ID or address, activating, configuring (managing device parameters and settings),
subscribing to device services or opting out of device services and configuring device modes. A
device instead of a DM server, communicates to a gateway in case of low-power loss
environment.

Gateway functions for device management are:

 Does forwarding function when the DM server and device can interact without
reformatting or structuring
 Does protocol conversion when the device and DM server use distinct protocols
 Does proxy function in case an intermediate pre-fetch is required in a lossy
environment or network environment needs.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Note and Important shortcut points to remember:

 Data communication between personal/local area network of devices and a gateway for
communicating via Internet.
 Gateway enables data enrichment and consolidation and device management.
 Data management functions at the gateway are transcoding, data privacy, data security,
data enrichment, data consolidation, transformation and device management.
 Transcoding means adaptations, conversions, changes of protocol or format using
software which renders the web response/messages in formats/representations as required
and acceptable at the IoT device and rendering requests for messages in
formats/representations as required and acceptable at the server.
 Data acquires and transfers to other end at scheduled intervals, on an event, or on polling.
 Data aggregation, compaction and fusion save energy during data dissemination.
 Data destinations may use the 48-bit MAC address, 32-bit IPv4 address, 48-bit IPv6
address or port number during communication at the data-link or network layers.
 Each device and application has an ID or address of communication source and each
destination has an ID or address. Communication between the end points and between the
layers is secure when using the authentication and authorization processes.
 Device management functions are the device ID or address, activation, configuring
(managing device parameters and settings), registering, deregistering, attaching,
detaching and fault management.
 Gateway functions for device management are—forwarding function between DM server
and device; protocol conversion when device and DM server use distinct protocols and
proxy function.
 Communication gateway enables protocol conversion between two ends.

Ease of Designing and Affordability:

Design for connected devices for IoT applications, services and business processes
considers the ease in designing the devices’ physical, data-link, adaption and gateway layer.

It means availability of SDKs (software development kits), prototype development


boards with smart sensors, actuators, controllers and IoT devices which are low in cost and
hardware which embeds and are preferably open source software components and protocols.
Hardware which includes the device should embed minimum number of components and use
ready solutions for ease in designing local devices personal area network and secure connectivity
with the Internet.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Designing also considers ease as well as affordances for example, RFID or card. The card
has an embedded microcontroller, memory, OS, NFC peripheral interfaces, access point-based
device activation, RF module and transceiver at low cost.

A wireless sensor uses, for example, a mobile terminal (Mote) which is a low cost device
with an open-source OS (tiny OS) and software components. Usages of Motes provide ease and
affordance in a WSN network.

Devices of smart homes and cities use ZigBee IP or BT LE 4.2 (dual mode or single
mode) due to their affordability, ease of designing, usage and low cost.

A design may add to the complexity. For example, consider the umbrella, How will the
umbrella be programmed to schedule the SMSes for a user? The need to use an instruction
manual adds to the complexity of designing Internet of umbrellas. Connected devices may add
complexity in the form ensuring data transfer to trusted destinations using encryption tools.

UNIT-III

Design Principles for Web Connectivity:

An IoT/M2M device network gateway needs connectivity to web servers. A


communication gateway enables web connectivity, while IoT/M2M specific protocols and
methods enable web connectivity for a connected devices network. A server enables IoT device
data accumulation (storage). Application (reporting, analysis and control), collaboration, service
and processes (involving peoples and business processes) use this data.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Following are some key terms, which need to be understood for learning web
connectivity and communication between the connected devices network and the web for IoT:

Application or App -refers to a software for applications such as creating and sending an SMS,
measuring and sending the measured data, receiving a message from a specific sender etc.

Application Programming Interface (API)- refers to a software component, which receives messages
from one end; for example, from an application or client or input. An API may consist of GUIs (button,
check box, text box, dialog box). An API may get input to or from a server or a user. It then initiates
actions and may send the messages, for example, to application software, server or a client at the other
end etc.

Web service -refers to a servicing software which uses web protocols, web objects or Web Sockets; for
example, weather reports service, traffic density reports, streetlights monitoring and controlling service.

Object -refers to a collection of resources; for example, collection of data and methods (or functions or
procedures) to operate on that data. Take for instance, Time_Date object with second, minutes, hour,
day, month and year fields and update methods.

An object instance can be just one or more than one for an object. An example of an object
instance is birth_date. Multiple object instances, abc_birth_date, pqr_birth_date, xyz_birth_date and
many instances can be created from birth_date object in JavaScript. An example of object instance is
weather report object for reporting the rains.

Object model -is defined as the usage of objects for values, messages, data or resource transfer, and
creation of one or more object-instances.

Class: Java uses concept of class, which creates one or more object instances.

Communication gateway is one that functions as communication protocol translator (convertor) for
provisioning communication capabilities. For example, the gateway for communication between ZigBee
and IP networks.

Client- refers to a software object which makes request (or an API associated with it makes request) for
data, messages, resources or objects. A client can have one or more object instances. A client may also
have an API or many APIs for enabling the communication to the server. A client can be at a device or
application on a network or Internet connected web, enterprise server or cloud.

Server- is defined as a software which sends a response on a request. The server also sends messages,
alerts or notifications. The server has access to resources, databases and objects. A server can be on a
device or can be on a separate computer system, not necessarily on Internet connected web.

Web object- is the one that retrieves a resource from the web object at other end using a web protocol.

Broker- denotes an object, which arranges the communication between two ends; for example,
between the message publisher and subscriber or for example taking the request from a source and

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
sending the response received back for that source after arranging the response from another object,
such as a server.

Proxy- refers to an application which receives a response from the server for usage of a client or
application and which also receives requests from the client for the responses retrieved or saved at
proxy.

Communication protocol- defines the rules and conventions for communication between networked
devices and between systems. The protocol includes mechanisms for devices or systems to identify and
make connections with each other. The protocol also includes formatting rules that specify how data is
packaged into sent and received messages,1 and header, its field and their meanings.

Web protocol- is a protocol that defines the rules and conventions for communication between the web
server and web clients. It is a protocol for web connectivity of web objects, clients, servers and
intermediate servers or firewalls. It includes mechanisms for a web object to identify and make
connections with other objects. The protocol also includes web object formatting rules that specify how
that object packs into it the sent and received messages.

Universal Resource Identifier- is generally used for saved resources, such as contacts or address book.
Example of a URI is /Contacts/First_Character_R/ for a set of resource directory contacts having
resource repository First_Character_R for contacts with first character R and resources giving
information about a contact. Another example is URI sensorNetwork_J/sensorID_N/temperature for a
temperature value. The value is at a resource directory sensorNetwork_J for a sensor network, which
stores sensor data for a sensor of id sensorID_N.

Universal Resource Locator- is generally used for retrieving a resource(s) by a client. The saved
resources may be at a document or at a remote server accessed using Internet protocols. An example of
a URL is [Link] for a set of resource directories, resource repositories and resources on
the McGraw Hill Higher Education server.

Datagram -refers to a limited size data (216 byte). It is used for stateless connectionless transfer from a
web object. Stateless means each single datagram transfer is independent of previous data interchanges
and connectionless means there is no need of pre-establishing the connection for resource exchanges
between the web objects and no connection closing after finishing the resource exchanges.

Representational State Transfer (REST)- is a software architecture referring to ways of defining the
identifiers for the resources, methods, access methods and data transfer during interactions. REST is a
software architecture which also specifies the practices, constraints, characteristics and guidelines for
creating scalable web services. Scalable means can be used as per the size. The architecture is used
during the design of web software components, clients and web APIs .

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
REST -also refers to usage of defined resource types when transferring the objects between two ends—
URIs or URLs for representations of the resources. REST also refers to the usage of use verbs
(commands), POST, GET, PUT and DELETE (Section 3.4.4) and files of MIME types.

Web Communication Protocols for Connected Devices:

Data of connected devices routes over the web in two types of communication
environments. The environments are:

 Constrained RESTful Environment (CoRE):


IoT devices or M2M devices communicate between themselves in a Local Area
Network. A device typically sends or receives 10s of bytes. The data gathered after
enriching and consolidating from a number of devices consists of 100s of bytes. A
gateway in the communication framework enables the data of networked devices that
communicate over the Internet using the REST software architecture.
 Devices have the constraint in the sense that their data is limited in
size compared to when data interchange between web clients and
web servers takes place using HTTP, Transmission Control
Protocol (TCP) and Internet Protocol (IP).
 Another constraint is data-routing when Routing Over a network of
Low power and (data) Loss (ROLL). ROLL network is a wireless
network with low power transceiver. Another constraint is that the
devices may sleep most of the time in low power environment and
awaken on an event or when required (on client initiative).
Devices’ connectivity may also break for long periods, have
limited up intervals in loss environment, and have limited data
size.
 Unconstrained Environment: Web applications use HTTP and RESTful HTTP for web
client and web server communication. A web object consists of 1000s of bytes. Data
routes over IP networks for the Internet. Web applications and services use the IP and
TCP protocols for Internet network and transport layers. Below figure shows device’s
local area network connectivity, web connectivity in constrained and unconstrained
RESTful environments and the protocols for communication.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

Assume that a web object refers to a web client or web server. The web object
communicates a request of the client or a response of the server. Communication is over the
ROLL network or Internet.

 Assume i-devices (1, 2, … i th) connected devices network, and local network having
connectivity between the devices at physical/data-link and adaptation layer (left-hand
side).
 Communication between web objects (right-hand side)
 IETF CoRE specifications, which include CoAP and UDP
 Web objects’ protocols for sending a request or response; for example, RESTful CoAP,
CoAP client and CoAP server communication over the network and transport layers to
other end CoAP client and server. Client/server use the URIs coap://… in place of
[Link] .
 Transport layer protocols used are Datagram Transport Layer Security (DTLS) and UDP.
Data between web objects route using ROLL network specifications of IETF.
 100s of bytes communicate between the IoT web objects
 Web objects HTTP client and HTTP server communication over the Internet using the IP
and client/server use the URLs [Link] .
 1000s of bytes communicate between HTTP web objects using certain protocols for
sending a request or response; for example, RESTful HTTP. IPv6 or IP is the network
layer protocol used. The transport layer protocols used are TLS and TCP.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Constrained Application Protocol:

IETF recommends Constrained Application Protocol (CoAP) which is for CoRE using
ROLL data network. Features of CoAP are:

 An IETF defined application-support layer protocol


 CoAP web-objects communicate using request/response interaction model.
 A specialised web-transfer protocol which is used for CoRE using ROLL network.
 It uses object-model for the resources and each object can have single or multiple
instances.
 Each resource can have single or multiple instances.
 An object or resource use CoAP, DTLS (security binding with PSK, RPK and
Certificate) and UDP protocols for sending a request or response.
 Supports the resource directory and resource-discovery functions
 The resource identifiers use the URIs as follow coap://… .
 Has small message header, 4 bytes are for ver (version), T (message type) [Types are
confirmable, non-confirmable, acknowledgement and reset], TKL (token length),
code (request method or response code), message ID 16-bit identifier, token (optional
response matching token). Confirmable means server must send an
acknowledgement, while non-confirmable means no acknowledgement is required.
 CoRE communication is asynchronous communication over the ROLL.
 Integrates easily with the web using CoAP application cross-protocol proxies. This is
facilitated because HTTP and CoAP, both share the REST model. A web client may
not even be aware that it just accessed an IoT device sensor resource or sent data to
an IoT device actuator resource.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

CoAP Client Web Connectivity:

A proxy is an intermediate server, which accepts a request from a client and sends the
response to the client using a protocol. It also passes the request to the server and accepts a
response from the server using the same or another protocol. HTTP-CoAP proxy accepts
requests from HTTP client using HTTP protocol and sends the request to the server using CoAP
protocol. CoAP-HTTP proxy accepts requests from CoAP client using CoAP protocol and sends
the request to the server using HTTP protocol.

The above figure shows CoAP client and server access using proxies. Transport Layer Security
(TLS), earlier known as Secure Socket Layer (SSL) is the protocol used for securing the TCP-based
Internet data interchanges. DTLS is the TLS for datagram. The features of DTLS are:

 DTLS provisions for three types of security services—integrity, authentication and


confidentiality.
 DTLS protocol derives from TLS protocol and binds UDP for secured datagram transport.
 DTLS is well suited for securing applications; for example, tunneling applications (VPN),
applications that tend to run out of file descriptors or socket buffers or applications which are
delay sensitive (and thus use UDP).
 A part of DTLS is OpenSSL repository openssl-0.9.8 security based on PSK, RPK and certificate.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Lightweight Machine-to-Machine Communication Protocol:

Lightweight Machine-to-Machine Communication (LWM2M) protocol is an application


layer protocol specified by Open Mobile Alliance (OMA) for transfer of service data/messages.
It finds applications in M2M. It enables functionalities for device management in cellular or
sensor networks. Communication protocol ‘light weight’ means that it does not depend on call to
the system resources during execution. Example of call to a system resource is calling an API for
display menu or network function in the system software (OS). Lightweight presently means data
transfer formats between client and server are binary and has Tag Length Value (TLV) or Java
Script Object Notation (JSON) batches of object arrays or resource arrays and transfers up to
100s of bytes unlike the webpages of 1000s of bytes.

The protocol enables communication between LWM2M client at IoT device and an
LWM2M server at the M2M application and service capability layer. The protocol is a compact
one, meaning small header. It has an efficient data model. It is generally used in conjunction with
CoAP.

The below figure shows M2M devices LAN connectivity. It shows constrained devices
network connectivity with M2M applications and services using LWM2M OMA standard
specifications of LWM2M.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Assume i number of M2M devices. Above shows the following:

 Local M2M constrained devices use, for example, the Bluetooth low energy, 6LowPAN
(IPv6 over low power WPAN), CoRE, ROLL, NFC, ZigBee PAN, cellular, Wi-Fi or
ZigBee IP (left-hand side) network technologies. M2M area network functions as PAN
for connectivity between devices and the M2M gateway.
 10s of bytes communicate between a device and the PAN.
 Communication between LWM2M objects (right-hand side). LWM2M client refers to
object instances as per the OMA standard LWM2M protocol. A client object sends a
request or receives a response of the LWM2M server over the access and CoRE
networks.
 CoRE network, for example, 3GPP or other networks for the IP connectivity
 Communication from an object instance using interface functions. The functions are
bootstrapping; registration, deregister or update a client and its objects; reporting the
notifications with new resource values; and service and management access through the
server.
 Use of the CoAP, DTLS, and UDP protocols by the object or resource.
 100s of bytes communicate between objects at the client or server for plain text or JSON
or binary TLV format data transfer. LWM2M specifications and features are as follows:
 An object or resource use CoAP, DTLS, and UDP or SMS protocols for sending a
request or response.
 Use of plain text for a resource or use of JSON during a single data transfer or binary
TLV format data transfer for a package for a batch of resource representations in a single
data transfer.
 An object or its resource access using an URI.
 Interface functions are for—bootstrapping; registration, deregister or updating a client
and its objects; reporting the notifications with new resource values; and service and
management access through the server.
 Use of object model for resources and each object can have single or multiple instances.
Each resource can have single or multiple instances.
 OMA or other standard specifying organisation defines the LWM2M objects for usages
in M2M communication. An LWM2M client has object instances as per OMA standards.
LWM2M client-server interactions are over the access and CoRE networks which
generally use CoAP over ROLL. LWM2M device client and server, generally use CoAP
client server interactions for data interchanges. Wi-Fi and WiMax are examples of access
networks. Examples of CoRE network are GSM, GPRS, 3GPP and 4G LTE or other
networks for IP connectivity as well as roaming.
 Organisations can register the other LWM2M objects and resources with OMA or other
standards organisations.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
 M2M management functions can be M2M Service Bootstrap Function (MSBF) for
credentials of the devices and gateway, and M2M authentication server (MAS) for
security, root key data store and device and data authentication.

Message Communication Protocols for Connected Devices:

A device/node/end-point/client/server sends and receives message(s). A communication


module includes a protocol handler, message queue and message cache. The protocol handler
functions during transmission and reception of messages according to the communication
protocols for these actions. Message queue forms to keep a message until it is transmitted
towards its destination. Message cache keeps an incoming message until it is saved into the
module. A device message-queue inserts (writes) the message into the queue and deletes
(reads) the message from the queue. Device message-cache stores the received messages.
The following section explains the terms used by messagecommunication protocols.

Request/Response (Client/Server):

A request/response message exchange refers to an object (client) requesting for


resource(s) and an object (server) sending the response(s). The objects, for example, HTTP
objects may use the REST functions. When sending a request, a protocol adds the header
words. Each header has fields. Each field interprets the request at the receiver object.

Publish/Subscribe (pubsub):

Publish/subscribe or PubSub message exchanges differ from request/response. A service


publishes the messages; for example, a weather information service publishes the messages
of weather reports for the potential receivers. A group controller publishes the messages; for
example, measured values of ambient light conditions, traffic density or traffic presence.

A service can be availed by one or more clients or brokers. When a client subscribes to
the service, it receives messages from that service. A publish/subscribe messaging protocol
provisions for publication of messages and reception on subscription (PUT and GET
methods) by the registered or authenticated devices.

Publication may be for measured values, for state information or resources of one or
more types. Subscription is for a resource-type (or for a topic). A separate subscription is
required for each resource-type or topic.

An example of resource type is measured values of ambient light condition in the smart
streetlights example. Another resource type is traffic presence or absence on the street.
Another resource type is lighting function report; functioning is proper or fault exists in the
light.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Resource Directory:

Resource directory (RD) maintains information and values for each resource type. A resource of
a resource type accesses from the RD using URI for the resource.

Resource Discovery:

Resource discovery service may advertise (publish) at regular intervals, the availability of the
resources or types of the resources available and their states. A client discovers the resource type and
registers for the RD service.

Registration/Registration Update:

Registration means a receiver registers with a service, such as an a RD service. When one
or more endpoints or devices or nodes registers, then that device gets the access to the resources
and receives published messages. Security considerations may require authentication of both
ends (service provider and receiver) before registration. A separate registration is required for
each endpoint (client or server).

Registration updates means updating for one or more endpoints or devices or nodes. It
also includes unregistering for one or more endpoints.

Pull (Subscribe/Notify) Data:

Pull means pulling a resource, value, message or data of a resource-type by registering


and subscribing. Pull may be using GET or on initiating OBSERVE. The server maintains state
information for a resource and notifies on change of state. Client pulls again the resource on the
change.

Polling or Observing:

Polling means finding from where new messages would be available or whether new
messages are available or updates are available or whether the information needs to be refreshed
or finding the status if the state information has changed or not. When messages store at a
database-server, then polling can be done by a client who uses the REST architecture GET
method and server uses the POST.

A state may refer to a connection or disconnection, sleep, awake, created, alive (not
deleted), old values persisting or updated with new values (GET + OBSERVE). Observing
means looking for change, if any, of a state at periodic intervals (OBSERVE).

Push (Publish/Subscribe) Data: Push means a service that pushes the messages or information
regularly. Interested device or endpoint or potential receiver receives these pushes. For example,
a mobile service provider pushes the temperature and location information regularly for the
potential receivers (registered mobile services subscribers) (PUT).

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Push is efficient compared to polling, particularly when notifying or sending alerts. This
is because there can be many instances when polling returns no data. Pull is efficient compared
to polling or PUSH when certainty exists that within a reasonable time interval the server returns
no data.

Message Cache:

Cache means storing when available and can be used later on when required. Messages
cache is useful in an environment of short or prolonged disconnections of a service. A message
can be accessed once or more times from a cache.

Message Queue :

Message queuing means storing the messages (data) in sequence from devices or endpoints so
that when connection state changes then messages can be forwarded. Forwarding is done using the
first-in first-out method for a resource type. A message forwards only once from a queue.

Separate queues are formed for each resource type. The messages are forwarded to the
registered devices or endpoints and to the subscribed devices or endpoints. A separate registered device
or endpoint list and a separate subscription list is maintained and used for each resource type.
Forwarding takes place only after matching the subscription from a list.

Information/Query:

The method is that an object (client) requests information using a query while another end-
object (server) responds by replying to the query. The responding application processes the query using
the query optimiser and retrieval plan. The query processing uses a database or resource directory
resources.

Communication protocols for message Communication:

 CoAP-SMS :
CoAP-SMS is a protocol when CoAP object uses IP as well as cellular networks
and uses SMS. It is an alternative to UDP-DTLS over ROLL for CoAP object messages
and when using cellular communication.
SMS is used instead of UDP + DTLS by a CoAP client or server. A CoAP client
communicates to a mobile terminal (MT) endpoint over the General Packet Radio Service
(GPRS), High Speed Packet Access (HSPA) or Long Term Evolution (LTE) networks
using CoAP-SMS protocol.

Figure (a) shows a CoAP request or response communication to a machine, IoT


device or MT. A CoAP client sends request to SMS-C which transmits the request to an
MT. A CoAP server sends response to SMS-C which transmits the response to the client.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Figure (b) shows a computer or machine interface using IP for sending request or
receiving the CoAP data or HTTP request (REQ) to a mobile service provider using
SMPP or CIMD for data interchange. The service provider communicates using SS7 or
CIMD or SMPP with machine or IoT device or MT with an in-between node SMS-C.
The terminal sends response to the origin using SMS-C and CoAP-MQ Broker. Figure (c)
shows a CoAP request or response communication from a machine, IoT device or MO. A
CoAP client sends request to SMS-C which transmits the request. A CoAP server sends
the response to SMS-C which transmits it to the client. Figure (d) shows a computer or
machine interface using IP for receiving request or sending response (RES) as CoAP data
or HTTP REQ mobile service provider using SMPP or CIMD for data interchange. The
SMS-C communicates that to CoAP-MQ BROKER using SS7 or CIMP or SMPP. SMS-
SP receives request or sends response to machine or IoT device or mobile origin.

Features of CoAP SMS:


 An URI used as coap+[Link] in place of coap://. For example, URI may be coap+[Link]
telNum/carLocatiobObject/latitude for latitude of location of a car after LocationObject
measures location parameters using the GPS. URI is used when sending the SMS to the
specified telephone number—telNum.
 A CoAP message encodes with alphabets for SMS communication. An SMS message
consists of 160 characters in 7-bit encoding of a character. Maximum length for a CoAP
message is thus 140 B (= 160 × 7 bits/8 bits) when an SMS-C supports 8-bit encoding. A
CoAP message is thus 70 (= 160 × 7 bits/16 bits) when an SMS-C supports 16-bit

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
encoding and multilingual alphabets. Concatenated short messages can be up to 255B,
provided the SMS-C supports this.
 CoAP endpoints have to work with a Subscriber Identity Module (SIM) card for SMS in
cellular networks. The points are addressed by using Mobile Station ISDN (MSISDN)
number. A TP-DATA-Coding-Scheme inclusion enables the CoAP client to find that the
short message contains a CoAP message.
 Does not support multi-casting
 Two additional options are Response-to-URI-Host (RUH) and Response-to-URI-Port
(RUP) which make initiating CoAP client aware of the presence of the alternative
interface CIMD and SMPP and UCP/UMI. RUH is string of size 0 to 255B. RUP is of 2B
with default port number 5683. IANA (Internet Assigned Number Authority) registered
TBD as CoAP Option Numbers for registry.
 Data interchange sequences are as follows: An MS/CoAP client sends a SMS request
(SMS-SUBMIT) to SMS-C; SMS-C reports using SMS-SUBMIT-REPORT; SMS-C
sends SMS (SMS-DELIVER) to MS/CoAP server; the server reports using SMS-
DELIVERREPORT; and SMS-C sends SMS-STATUS-REPORT to the client.
 Authentication of a client by the server provides the security. MSISDN of the MS and
SIM based security is used during SMS data exchanges.

CoAP-MQ:

CoAP-MQ is a message queue protocol using a broker and RD. Roles of CoAP endpoints have
roles as a client and server. Below figure shows data interchanges between CoAP-MQ endpoints, CoAP-
MQ clients, CoAP-MQ servers through CoAP-MQ broker and its services.

The below figure shows CoAP-MQ server provisioning for the resource-subscription, store from
the publisher. The server also provisions for forwarding to the subscriber and proxy services. The figure
also shows that RD services are resource discovery, directory and object registration services. The device
objects communicate using the CoAP client and server protocols and CoAP web objects using DTLS as
security protocol and UDP for CoAP APIs.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

MQTT Protocol:

Message Queuing Telemetry Transport (MQTT) is an open-source protocol for machine-


tomachine (M2M)/IoT connectivity. Word ‘telemetry’, in English dictionary, means measuring
and sending values or messages to far off places by radio or other mechanism.

IBM first created it and then donated it to M2M ‘Paho’ project of Eclipse. A version is
MQTT v3.1.1. MQTT has been accepted (2014) as OASIS (Organization for the Advancement
of Structured Information Standards) standard6 MQTT protocol is used for connectivity in
M2M/IoT communication.

A version is MQTT-SN v1.2. Sensor networks and non-TCP/IP networks, such as ZigBee
can use the MQTT-SN. MQTT-SN is also a publish/subscribe messaging protocol. It enables
extension of the MQTT protocol for WSNs, the sensor and actuator devices and their networks.

IBM conceptual framework for the IoT, which showed MQTT applications for one of the
communication management functions. Figure 3.6 shows messages interchange between

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
M2M/IoT device objects (publisher and subscriber) and web objects (publisher and subscriber)
using an MQTT broker.

Figure shows MQTT-broker subscription, subscription match, store and forward, last
good message retention and keep message alive services. The figure also shows that device
objects use MQTT Java, C or JavaScript library functions. The objects communicate using the
connected devices network protocols such as ZigBee. Web objects also use MQTT library
functions and communicate using IP network and SSL and TLS security protocols for
subscribing and publishing web APIs.

MQTT Broker (also referred simply as MQ) does the following:

 Functions as a server node capable of storing messages from publishers and forwarding
them to the subscribing clients.
 Receives topics from the publishers. Examples of topics are measured information of
ambient light conditions, traffic density, nearby parking space availability and waste
container status.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
 Performs a store-and-forward function, stores topics from publishers and forwards to
subscribers.
 Receives subscriptions from clients on the topics, matches subscriptions and
publications in order to route messages to right endpoints.
 Recovers subscriptions on reconnect after a disconnection, unless the client explicitly
disconnected.
 Acts as a broker between the publisher of the topics and their subscribers.
 Finds client disconnection until DISCONNET message receives, keeps message alive till
explicit disconnection.
 Retains the last-received message from a publisher for a new connected subscriber on
the same topic, when retain field in the header is set.
 Authentication by Username/Password in connect message and client security is
through SSL/TLS. Security considerations are same as of CoAP, web-linking and CoRE
resource directory.
 Support from Intelligent and business analyst server and other servers through a MQTT
server with a gateway.

XMPP (Extensible Messaging and Presence Protocol):

XMPP is an XML-based specification for messaging and presence protocols. XMPP is also an
open-source protocol recommended specification which is accepted by IETF. RFC is an international
organisation and stands for ’Recommended for Comments’. RFC 6120 document specifies the XMPP for
CoRE. Another recommendation, RFC 6121 XMPP specifies the instant messaging (IM) and presence, and
RFC 6122 XMPP specifies the (message) address format.

Messages notify presence for the IMs to one or many at the same time. It enables chatting and
Multi-User Chat (MUC) after creation of a chat room, where different users can do the IMs. XMPP
enables interoperable communication: for example, Google Talk. XMPP enables IMs between many
users as it uses presence-notifications and chat features.

Chat room is an application, in which all those who have subscribed (meaning persons and
objects initiating chatting and messaging to one another at the same time) are provided a room-like
view and use the IMs among themselves.

XMPP is extensible—XSF (XMPP standards foundation) develops and publishes the xeps (XMPP
extension protocols). The xeps enable the addition of features and new applications. List of XMPP xeps
for web objects is quite long.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)

Web Connectivity for Connected Devices:

Communication gateway connects two application layers, one at sender and the
other at receiver. The gateway also enables use of two different protocols, one at sender and the
other at receiver ends. The gateway facilitates the communication between web server using the
TCP/IP protocol conversion gateway and IoT devices. It also facilitates communication between
the devices using CoAP client and server using HTTP.

The gateway provisions for one or more of the following functions:

Connects the sender and receiver ends using two different protocols. For example, IoT
devices network maybe ZigBee network for connecting the devices. The network then connects
to the web server through a gateway. The server posts and gets the data using HTTP. A gateway
facilitates the communication between IoT devices and web server. For example, (i) ZigBee to
SOAP and IP or (ii) CoAP protocol conversion gateway for RESTful HTTP.

HTTP Request and Response Method:

An application uses a protocol. The application layer in TCP/IP suite of protocols


for Internet uses HTTP, FTP, SMTP, POP3, TELNET and a number of other protocols. HTTP is
most widely used application layer protocol for communication over TCP/IP. An HTTP client

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
connects to an HTTP server using TCP and then the client sends a resource after establishing an
HTTP connection.

An HTTP transfer is stateless which means each data transfer is an independent


request. Therefore, header overhead information and meta-data of previous state need to be
present with each HTTP request. Metadata is data which describes the data for interpretation in
future. Therefore, each data interchange needs large headers over 100s of byte, and thus greater
latency in request-response exchanges.

REST and RESTful HTTP Web Applications:

When all interactions used in the applications conform fully to the REST
constraints then these are called RESTful. RESTful APIs comply with these constraints and thus
conform to the REST architectural style. Web services with RESTful APIs adhere to the REST
architectural constraints. REST architectural style can be used for HTTP access by GET, POST,
PUT and DELETE methods for resources and building web services.

Standard HTTP methods are GET, PUT, POST and DELETE. HTTP based
RESTful APIs use the following:

 URIs/URLs, such as [Link] and hypertext


links to reference state and reference related resources, and JSON, TLV or an
Internet media type (MIME type) hypertext links
 REST-based web objects communicate typically, but not always, over the HTTP.
The World Wide Web itself represents the largest implementation of a system
conforming to the REST architectural style. RESTful HTTP system feature is that
communication is over the HTTP and use verbs (commands) same as in HTTP,
namely GET, POST, PUT and DELETE.

Note and Important shortcut points to remember:

 A communication gateway connects the sender and receiver ends using two different
protocols. The gateway can function as a proxy between two ends, such as HTTP-CoAP
proxy.
 Web objects communicate using HTTP methods, such as POST, GET, PUT, DELETE,
SOAP and WebSockets.
 REST is a software architecture specifying practices and constraints which are used
during design of software components in a distributed hypermedia. Designing based on
REST depends on the characteristics of stateless, client-server, cacheable communication
using a protocol.
 RESTful means components designed with constraints specified in REST. For example,
separation of concerns, use of layered system, defining cache ability or not between
client, server and intermediate.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
 Web objects communicate using WebSockets. Instant messaging and many applications
need the bidirectional, very low latency, real time data exchanges over the same (without
initiating new) connection. WebSocket enables bidirectional communication over a single
TCP connection.

UNIT-IV

DATA ACQUIRING AND STORAGE:

Data Generation:

Data generates at devices that later on, transfers to the Internet through a gateway.
Data generates as follows:
 Passive devices data: Data generate at the device or system, following the result
of interactions. A passive device does not have its own power source. An external
source helps such a device to generate and send data. Examples are an RFID
(Example) or an ATM debit card. The device may or may not have an associated
microcontroller, memory and transceiver. A contactless card is an example of the
former and a label or barcode is the example of the latter.
 Active devices data: Data generates at the device or system or following the
result of interactions. An active device has its own power source. Examples are
active RFID, streetlight sensor (Example ) or wireless sensor node. An active
device also has an associated microcontroller, memory and transceiver.
 Event data: A device can generate data on an event only once. For example, on
detection of the traffic or on dark ambient conditions, which signals the event?
The event on darkness communicates a need for lighting up a group of street
lights. A system consisting of security cameras can generate data on an event of
security breach or on detection of an intrusion. A waste container with associate
circuit can generate data in the event of getting it filled up 90% or above. The
components and devices in an automobile generate data of their performance and
functioning. For example, on wearing out of a brake lining, a play in steering
wheel and reduced air-conditioning is felt. The data communicates to the Internet.
The communication takes place as and when the automobile reaches near a Wi-Fi
access point.
 Device real-time data: An ATM generates data and communicates it to the
server instantaneously through the Internet. This initiates and enables Online
Transactions Processing (OLTP) in real time.
 Event-driven device data: A device data can generate on an event only once.
Examples are: (i) a device receives command from Controller or Monitor, and
then performs action(s) using an actuator. When the action completes, then the

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
device sends an acknowledgement; (ii) When an application seeks the status of a
device, then the device communicates the status.

Data Acquisition:

Data acquisition means acquiring data from IoT or M2M devices. The data
communicates after the interactions with a data acquisition system (application). The application
interacts and communicates with a number of devices for acquiring the needed data. The devices
send data on demand or at programmed intervals. Data of devices communicate using the
network, transport and security layers.

An application can configure the devices for the data when devices have configuration
capability. For example, the system can configure devices to send data at defined periodic
intervals. Each device configuration controls the frequency of data generation. For example,
system can configure an umbrella device to acquire weather data from the Internet weather
service, once each working day in a week (Example 1.1). An ACVM can be configured to
communicate the sales data of machine and other information, every hour. The ACVM system
can be configured to communicate instantaneously in event of fault or in case requirement of a
specific chocolate flavour needs the Fill service.

Application can configure sending of data after filtering or enriching at the gateway at the
data-adaptation layer. The gateway in-between application and the devices can provision for one
or more of the following functions—transcoding, data management and device management.
Data management may be provisioning of the privacy and security, and data integration,
compaction and fusion.

Device-management software provisions for device ID or address, activation, configuring


(managing device parameters and settings), registering, deregistering, attaching, and detaching.

Data Validation:

Data acquired from the devices does not mean that data are correct, meaningful or
consistent. Data consistency means within expected range data or as per pattern or data not
corrupted during transmission. Therefore, data needs validation checks. Data validation software
do the validation checks on the acquired data. Validation software applies logic, rules and
semantic annotations. The applications or services depend on valid data. Then only the analytics,
predictions, prescriptions, diagnosis and decisions can be acceptable.

Large magnitude of data is acquired from a large number of devices, especially, from
machines in industrial plants or embedded components data from large number of automobiles or
health devices in ICUs or wireless sensor networks, and so on. Validation software, therefore,
consumes significant resources. An appropriate strategy needs to be adopted. For example, the

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
adopted strategy may be filtering out the invalid data at the gateway or at device itself or
controlling the frequency of acquiring or cyclically scheduling the set of devices in industrial
systems. Data enriches, aggregates, fuses or compacts at the adaptation layer.

Data Categorization for Storage:

Services, business processes and business intelligence use data. Valid, useful and relevant
data can be categorised into three categories for storage—data alone, data as well as results of
processing, only the results of data analytics are stored. Following are three cases for storage:

 Data which needs to be repeatedly processed, referenced or audited in future,


and therefore, data alone needs to be stored.
 Data which needs processing only once, and the results are used at a later time
using the analytics, and both the data and results of processing and analytics
are stored. Advantages of this case are quick visualisation and reports
generation without reprocessing. Also the data is available for reference or
auditing in future.
 Online, real-time or streaming data need to be processed and the results of this
processing and analysis need storage. Data from large number of devices and
sources categorises into a fourth category called Big data. Data is stored in
databases at a server or in a data warehouse or on a Cloud as Big data.

Data Store

A data store is a data repository of a set of objects which integrate into the store. Features
of data store are:

 Objects in a data-store are modeled using Classes which are defined by the database
schemas.
 A data store is a general concept. It includes data repositories such as database, relational
database, flat file, spreadsheet, mail server, web server, directory services and VMware
 A data store may be distributed over multiple nodes. Apache Cassandra is an example of
distributed data store.
 A data store may consist of multiple schemas or may consist of data in only one scheme.
Example of only one scheme data store is a relational database. Repository in English
means a group, which can be related upon to look for required things, for special
information or knowledge. For example, a repository of paintings of artists. A database is
a repository of data which can be relied upon for reporting, analytics, process, knowledge
discovery and intelligence. A flat file is another repository. Flat file means a file in which
the records have no structural interrelationship (Section 5.3). Section 5.5.1 explains the

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
spreadsheet concept. VMware uses data store to refer to a file that stores a virtual
machine.

Organising the Data:

Data can be organised in a number of ways. For example, objects, files, data store,
database, relational database and object oriented database. Following subsections describe
these ways of organising and querying methods.

Database:

One popular method of organising data is a database, which is a collection of data. This
collection is organised into tables. A table provides a systematic way for access, management
and update. A single table file is called flat file database. Each record is listed in separate
row, unrelated to each other.

Relational Database:

A relational database is a collection of data into multiple tables which relate to each other
through special fields, called keys (primary key, foreign key and unique key). Relational
databases provide flexibility. Examples of relational database are MySQL, PostGreSQL,
Oracle database created using PL/SQL and Microsoft SQL server using T-SQL.

Object Oriented Database (OODB) is a collection of objects, which save the objects in
objected oriented design. Examples are ConceptBase or Cache. Example 5.3 shows the
advantages of using relational databases.

Problem: (Example)

Show the advantages of relational databases taking the example of Internet of ACVMs.

A Manager application receives ACVMs information. It send requests to ACVMs for the
chocolates sold, and number required. The request is sent each hour from Manager to Fill
service. A Fill service executes on receipt of the requests from ACVMs for chocolate
requirement every hour. Application, service and process use the common relational database
RDBACVM tables. Table 5.1 is for ACVMs information, and pending service requests Num1,
Num 2, Num2, Num 3 and Num 4 for the five flavours available at an ACVM. Table 5.2 is for
ACVMs Fill Request Information, and Table 5.3 for chocolates Fill service actions Common key
fields between A, B and C are machine id or service request number. The relationships between
fields of A, B and C are maintained by RDBMS. For example, when number of each flavour
requested equals the number sent to a machine after processing a service request, then
corresponding Num in A becomes 0. Assume three flat-file databases maintained separately—A’
for ACVMs information, B’ for ACVMs Fill Service Request Information and database and C’
for Fill Service Process. Then every time a service request raises or service request processes,

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
corresponding fields of A’, B’ and C’ in three flat file separate databases require update for
maintenance of consistency of database in each application, service and process. Further, each
one needs all fields due to no system for the maintenance of the relationships between A’, B’ and
C’.

Database Management System:

Database Management System (DBMS) is a software system, which contains a set of


programs specially designed for creation and management of data stored in a database. Database
transactions can be performed on a database or relational database.

Atomicity, Data Consistency, Data Isolation and Durability (ACID) Rules.

The database transactions must maintain the atomicity, data consistency, data isolation
and durability during transactions. Let us explain these rules using Example 5.3 as follows:

Atomicity- means a transaction must complete in full, treating it as indivisible. When a


service request completes, then the pending request field should also be made zero.

Consistency- means that data after the transactions should remain consistent. For
example, sum of chocolates sent should equal the sums of sold and unsold chocolates for each
flavour after the transactions on the database.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Isolation- means transactions between tables 5.1 and 5.2, 5.2 and 5.3 and 5.3 and 5.1 are
isolated from each other.

Durability -means after completion of transactions, the previous transaction cannot be


recalled. Only a new transaction can affect any change.

Distributed Database:

Distributed Database (DDB) is a collection of logically interrelated databases over a


computer network. Distributed DBMS means a software system that manages a distributed
database. The features of a distributed database system are:

 DDB is a collection of databases which are logically related to each other.


 Cooperation exists between the databases in a transparent manner. Transparent means
that each user within the system may access all of the data within all of the databases as if
they were a single database.
 DDB should be ‘location independent’, which means the user is unaware of where the
data is located, and it is possible to move the data from one physical location to another
without affecting the user.

Consistency, Availability and Partition-Tolerance Theorem

Consistency, Availability and Partition-Tolerance Theorem (CAP theorem) is a theorem


for distributed computing systems. The theorem states that it is impossible for a distributed
computer system to simultaneously provide all three of the Consistency, Availability, Partition
tolerance (CAP) guarantees.5 This is due to the fact that a network failure can occur during
communication among the distributed computing nodes. Partitioning of a network therefore
needs to be tolerated. Hence, at all times either there will be consistency or availability.

Consistency -means ‘Every read receives the most recent write or an error’. When a
message or data is sought the network generally issues notification of time-out or read error.
During an interval of a network failure, the notification may not reach the requesting node(s).

Availability- means ‘Every request receives a response, without guarantee that it


contains the most recent version of the information’. Due to the interval of network failure, it
may happen that most recent version of message or data requested may not be available.

Partition tolerance- means ‘The system continues to operate despite an arbitrary number
of messages being dropped by the network between the nodes’. During the interval of a network
failure, the network will have two separate set of networked nodes. Since failure can always
occur therefore, the partitioning needs to be tolerated.

Query Processing:

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Query processing means using a process and getting the results of the query made from a
database. The process should use a correct as well as efficient execution strategy. Five steps in
processing are:

 Parsing and translation: This step translates the query into an internal form, into a
relational algebraic expression and then a Parser, which checks the syntax and verifies the
relations.
 Decomposition to complete the query process into micro-operations using the analysis
(for the number of micro-operations required for the operations), conjunctive and
disjunctive normalisation and semantic analysis.
 Optimisation which means optimising the cost of processing. The cost means number of
micro-operations generated in processing which is evaluated by calculating the costs of
the sets of equivalent expressions.
 Evaluation plan: A query-execution engine (software) takes a query-evaluation plan and
executes that plan.
 Returning the results of the query.

The process can also be based on a heuristic approach, by performing the selection and
projection steps as early as possible and eliminating duplicate operations.

Distributed Query Processing:

Distributed Query Processing means query processing operations in distributed databases


on the same system or networked systems. The distributed database system has the ability to
access remote sites and transmit the queries to other systems.

Business models for business processes in the IOT:

Sensors, M2M, sensor networks data and the data using web APIs for multiple
information sources data, open data, mobile services network information data, corporate
database and knowledge database are at the input stages. The data from multiple sources and
services are part of the key resources in business model scenarios for IoT.

Real-time monitoring applications are used in maintenance scheduling, predictive


maintenance, or in fault or anomaly detection. Real-time M2M, IoT sensors and sensors network
data can be used to generate events and monitor the systems. Real-time anomalies and fault
detection are possible during the service, production or maintenance. Event analytics enables
insight into business processes and distributed processes. This enables efficient processes and
streamlines existing business processes.

IIoT deploys connectivity to all parts of the production process: machines, products,
systems, and people using the cloud and big data technology. The machines and products
communicate, and thus manage themselves and each other. Software-based systems and service

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
platforms, data analytics and visualisation, will, therefore, play a major role in tomorrow’s
manufacturing.

Transactions:

A transaction is a collection of operations that form a single logical unit. For example, a
database connect, insertion, append, deletion or modification transactions. Business transactions
are transactions related in some way to a business activity.

Online Transactions and Processing:

OLTP means process as soon as data or events generate in real time. OLTP is used when
requirements are availability, speed, concurrency and recoverability in databases for real-time
data or events. Example 5.4 gives the uses of OLTP in the application and network domain in
Internet of ATMs (ATM of a bank) connected to a bank server.

I. Batch Transactions Processing:

Batch transactions processing means the execution of a series of transactions without user
interactions. Transaction jobs are set up so they can be run to completion. Scripts, command-line
arguments, control files, or job control language predefine all input parameters.

Batch processing means a transaction process in batches and in an non-interactive way.


When one set of transactions finish, the results are stored and a next batch is taken up. A good
example is credit card transactions where the final results at the end of the month are used.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Another example is chocolate purchase transactions. The final results of sell figures from
ACVMs can communicate on the Internet at the end of an hour or day.

II. Streaming Transactions Processing:

Examples of the streams are log streams, event streams and twitter streams. Query and
transactions processing on streaming data need specialised frameworks. Storm from Twitter, S4
from Yahoo, SPARK streaming, HStreaming and flume are examples of frameworks for real-
time streaming computation frameworks.

III. Interactive Transactions Processing:

Interactive transactions processing means the transactions which involve continual exchange
of information between the computer and a user. For example, user interactions during e-
shopping and e-banking. The processing is just the opposite of batch processing.

IV. Real-time Transactions Processing:

Real-time transaction processing means that transactions process at the same time as the data
arrives from the data sources and data store. An example is ATM machine transactions. In-
memory, row-format records enable real-time transaction processing. Row format means few
rows and more columns. The CPU accesses all columns in single accesses in SIMD (single
instruction multiple data) streams processing.

V. Event Stream Processing and Complex Event Processing:

Event Stream Processing (ESP) is a set of technologies, event processing languages,


Complex Event Processing (CEP), event visualisation, event databases and event-driven
middleware. Apache S4 and Twitter Storm are examples of ESPs. SAP Sybase ESP and
EsperTechEsper are examples of CEPs. ESP and CEP does the following:

 Processes tasks on receiving streams of event data


 Identifies the meaningful pattern from the streams
 Detects relationships between multiple events
 Correlates the events data
 Detects event hierarchies
 Detects aspects such as timing, causality, subscription membership
 Builds and manages the event-driven information systems.
VI. Complex Event Processing:

CEP has many applications. For example, IoT event processing applications, stocks
algorithmic-based trading and location-based services. A CEP application in Eclipse are used for
capturing a combination of data, timing conditions and efficiently recognise the corresponding
events over data streams.

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Business Processes:

A business process consists of a series of activities which serves a particular specific


result. It is used when an enterprise has a number of interrelated processes which serve a
particular result or goal. The results enable sales, planning and production. The BP is a
representation or process matrix or flowchart of a sequence of activities with interleaving
decision points.

Internet of RFIDs enables a business process called tracking of RFID labelled goods
(Example 2.2) which also enables inventory control process.

IoT/M2M enables the devices’ data in databases for business processes. The data
supports the process. For example, consider a process, streetlights control and management. Each
group of streetlights sends data in real time through the gateways. The gateways connect to the
Internet. The control and management processes streetlights real time databases and group
databases.

Distributed Business Process:

Several times, business processes need to be distributed. Distribution of processes


reduces the complexity, communication costs, enables faster responses and smaller processing
load at the central system. For example, recall Example 1.2, distribution of control process for
each group of lights at the gateway itself reduces complexity, communication costs, faster
responses and smaller processing load at the central system.

Distributed Business Process System (DBPS) is a collection of logically interrelated


business processes in an Enterprise network. DBPS means a software system that manages the
distributed BPs. DBPS features are:

DBPS is a collection of logically related BPs like DDBS. DBPS exists as cooperation
between the BPs in a transparent manner. Transparent means that each user within the system
may access all of the process decisions within all of the processes as if they were a single
business process.

DBPS should possess ‘location independence’ which means the enterprise BI is unaware
of where the BPs are located. It is possible to move the results of analytics and knowledge from
one physical location to another without affecting the user.

Integration and Enterprise Systems:

Below figure shows complex applications integration architecture and SOA of cloud-
based IoT services, web services, cloud services and services.

Process orchestration means a number of business processes running in parallel and a


number of processes running in sequence. The process matrix provides the decision points which

Introduction to IOT Lecture notes


AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
indicate which processes should run in parallel and which in sequence. An SOA models the
number of services and interrelationships. Each service initiates on receipt of messages from a
process or service.

The service discovery and selection software components select the services for
application integration. Service orchestration software coordinates the execution of the number
of services, cloud services, cloud IoT services and web services. Services run in parallel and a
number of processes in sequences.

Introduction to IOT Lecture notes

You might also like