SlideShare a Scribd company logo
LECTURE NOTES
ON
INTERNET OF THINGS
Compiled by
Mr. Abhaya Kumar Panda
Lecturer, Department of Computer Science & Engineering,
KIIT Polytechnic, Bhubaneswar
KIIT POLYTECHNIC
KIIT POLYTECHNIC
Internet of Things Abhaya Kumar Panda
CONTENTS
S.NO CHAPTER NAME PAGE NO
1 Introduction to Internet of Things 1-9
2 IoT Networking 10-21
3 Connectivity Technologies 22-31
4 Wireless Sensor Networks 32-38
5 M2M Communication 39-43
6 Programming with Arduino 44-49
7 Programming with Raspberry Pi 50-55
8 Software defined Networking 56-60
9 Smart Homes 61-63
10 Smart Cities 64-69
11 Industrial IoT 79-73
KIIT POLYTECHNIC
Internet of Things 1 Abhaya Kumar Panda
UNIT-1
Introduction to Internet of Things
Internet of things (IoT)
The Internet of things (IoT) is the inter-networking of physical devices, vehicles (also
referred to as “connected devices” and “smart devices”), buildings, and other items embedded
with electronics, software, sensors, actuators, and network connectivity which enable these
objects to collect and exchange data.
Characteristics:
Things-related services: The IoT is capable of providing thing-related services within the
constraints of things, such as privacy protection and semantic consistency between physical
things and their associated virtual things
Connectivity: Things in I.O.T. should be connected to the infrastructure, without connection
nothing makes sense.
Intelligence: Extraction of knowledge from the generated data is important, sensor generate
data and this data and this data should be interpreted properly.
Scalability: The no. of things getting connected to the I.O.T. infrastructure is increased day
by day. Hence, an IOT setup shall be able to handle the massive expansion.
Unique Identity: Each IOT device has an I.P. address. This identity is helpful in tracking the
equipment and at times to query its status.
Dynamic and Self-Adapting: The IOT device must dynamically adopt itself to the
changing context. Assume a camera meant for surveillance, it may have to work in different
conditions and at different light situations (morning, afternoon, night).
Heterogeneity: The devices in the IoT are heterogeneous as based on different hardware
platforms and networks. They can interact with other devices different networks.
Safety: Having got all the things connected with the Internet possess a major threat, as our
personal data is also there and it can be tampered with, if proper safety measures are not
taken.
Application areas of IoT:
Smart Home: The smart home is one of the most popular applications of IoT. The cost of
owning a house is the biggest expense in a homeowner’s life. Smart homes are promised to
save the time, money and energy.
Smart cities: The smart city is another powerful application of IoT. It includes smart
surveillance, environment monitoring, automated transformation, urban security, smart traffic
management, water distribution, smart healthcare etc.
Wearables: Wearables are devices that have sensors and software installed which can collect
data about the user which can be later used to get the insights about the user. They must be
energy efficient and small sized.
KIIT POLYTECHNIC
Internet of Things 2 Abhaya Kumar Panda
Connected cars: A connected car is able to optimize its own operation, maintenance as well
as passenger’s comfort using sensors and internet connectivity.
Smart retail: Retailers can enhance the in-store experience of the customers using IoT. The
shopkeeper can also know which items are frequently bought together using IoT devices.
Smart healthcare: People can wear the IoT devices which will collect data about user's
health. This will help users to analyze themselves and follow tailor-made techniques to
combat illness. The doctor also doesn't have to visit the patients in order to treat them.
IoT Categories
IOT can be classified into two categories:
1. Consumer IoT(CIOT): The Consumer IoT refers to the billions of physical personal
devices, such as smartphones, wearables, fashion items and the growing number of smart
home appliances, that are now connected to the internet, collecting and sharing data.
A Consumer IoT network typically entails few consumer devices, each of which has a
limited lifetime of several years.
The common connectivity used in this kind of solutions are Bluetooth, WiFi, and ZigBee.
These technologies offer short-range communication, suitable for applications deployed in
limited spaces such as houses, or small offices.
2. industrial internet of things (IIoT): It refers to interconnected sensors, instruments, and
other devices networked together with computers' industrial applications, including
manufacturing and energy management. This connectivity allows for data collection,
exchange, and analysis, potentially facilitating improvements in productivity and efficiency
as well as another economic ben.
BASELINE TECHNOLOGIES
There are various baseline technologies that are very closely related to IOT, They include:
Machine-to-Machine (M2M), Cyber-Physical Systems (CPS), Web Of Things (WOT)
a) Machine-to-Machine (M2M):
• Machine-to-Machine (M2M) refers to networking of machines (or devices) for the
purpose of remote monitoring and control and data exchange.
• An M2M area network comprises of machines (or M2M nodes) which have
embedded network modules for sensing, actuation and communicating various
communication protocols can be used for M2M LAN such as ZigBee, Bluetooth, M-
bus, Wireless M-Bus etc., These protocols provide connectivity between M2M nodes
within an M2M area network.
• The communication network provides connectivity to remote M2M area networks.
The communication network provides connectivity to remote M2M area network.
• The communication network can use either wired or wireless network (IP based).
While the M2M are networks use either proprietary or non-IP based communication
protocols, the communication network uses IP-based network. Since non-IP based
KIIT POLYTECHNIC
Internet of Things 3 Abhaya Kumar Panda
protocols are used within M2M area network, the M2M nodes within one network
cannot communicate with nodes in an external network.
• To enable the communication between remote M2M are network, M2M gateways
are used
b) Cyber-Physical systems:
Cyber-Physical Systems (CPS) are integrations of computation, networking, and physical
processes. Embedded computers and networks monitor and control the physical processes,
with feedback loops where physical processes affect computations and vice versa.
In cyber-physical systems, physical and software components are deeply intertwined, able to
operate on different spatial and temporal scales, exhibit multiple and distinct behavioural
modalities, and interact with each other in ways that change with context.
c) Web of Things: web of things is a term used to describe approaches, software architectural
style of programming patterns that allow real world objects to be part of WWW. The major
portion of the WoT specification is the Thing Description. Thing is an abstract representation
of a physical or virtual entity. A Thing Description includes the metadata and interfaces of a
Thing in a standardized way, with the aim to make the Thing able to communicate with other
Things in a heterogeneous world.
SENSOR
Sensor is a device used for the conversion of physical events or characteristics into the
electrical signals. This is a hardware device that takes the input from environment and gives
to the system by converting it.
For example, a thermometer takes the temperature as physical characteristic and then
converts it into electrical signals for the system.
Characteristics of Sensors
1. Range: It is the minimum and maximum value of physical variable that the sensor can
sense or measure. For example, a Resistance Temperature Detector (RTD) for the
measurement of temperature has a range of -200 to 800o
C.
2. Span: It is the difference between the maximum and minimum values of input. In above
example, the span of RTD is 800 – (-200) = 1000o
C.
3. Accuracy: The error in measurement is specified in terms of accuracy. It is defined as the
difference between measured value and true value. It is defined in terms of % of full scale or
% of reading.
4. Precision: It is defined as the closeness among a set of values. It is different from
accuracy.
KIIT POLYTECHNIC
Internet of Things 4 Abhaya Kumar Panda
5.Linearity: Linearity is the maximum deviation between the measured values of a sensor
from ideal curve.
6.Hysteresis: It is the difference in output when input is varied in two ways- increasing and
decreasing.
7. Resolution: It is the minimum change in input that can be sensed by the sensor.
8. Reproducibility: It is defined as the ability of sensor to produce the same output when
same input is applied.
9. Repeatability: It is defined as the ability of sensor to produce the same output every time
when the same input is applied and all the physical and measurement conditions kept the
same including the operator, instrument, ambient conditions etc.
10. Response Time: It is generally expressed as the time at which the output reaches a
certain percentage (for instance, 95%) of its final value, in response to a step change of the
input.
Classification of sensors:
Sensors based on the power requirement sensor is classified into two types: Active Sensors,
Passive Sensors.
Active Sensors: Does not need any external energy source but directly generates an electric
signal in response to the external.
Example: Thermocouple, Photodiode, Piezoelectric sensor.
Passive Sensors: The sensors require external power called excitation signal. Sensors modify
the excitation signal to provide output.
Example: Strain gauge.
Sensors based on output sensor is classified into two types: Analog Sensors, Digital Sensors.
Analog Sensors
• Analog Sensors produces a continuous output signal or voltage which is generally
proportional to the quantity being measured.
• Physical quantities such as Temperature, speed, Pressure, Displacement, Strain etc.
are all analog quantities as they tend to be continuous in nature.
• For example, the temperature of a liquid can be measured using a thermometer or
thermocouple (e.g. in geysers) which continuously responds to temperature changes
as the liquid is heated up or cooled down.
Digital Sensors
• Digital Sensors produce discrete output voltages that are a digital representation of the
quantity being measured.
• Digital sensors produce a binary output signal in the form of a logic "1" or a logic "0"
, ("ON" or "OFF).
KIIT POLYTECHNIC
Internet of Things 5 Abhaya Kumar Panda
• Digital signal only produces discrete (non-continuous) values, which may be output as
a signal "bit" (serial transmission), or by combing the bits to produce a signal "byte"
output (parallel transmission).
Based on type of data measured sensor is classified into two types: Scalar Sensors and
Vector Sensors.
Scalar Sensors
• Scalar Sensors produce output signal or voltage which generally proportional to the
magnitude of the quantity being measured.
• Physical quantities such as temperature, color, pressure, strain, etc. are all scalar
quantities as only their magnitude is sufficient to convey an information.
• For example, the temperature of a room can be measured using thermometer or
thermocouple, which responds to temperature changes irrespective of the orientation
of the sensor or its direction.
Vector Sensors
• Vector Sensors produce output signal or voltage which generally proportional to the
magnitude, direction, as well as the orientation of the quantity being measured.
• Physical quantities such as sound, image, velocity, acceleration, orientation, etc. are
all vector quantities, as only their magnitude is not sufficient to convey the complete
information.
• For example, the acceleration of a body can be measured using an accelerometer,
which gives the components of acceleration of the body with respect to the x,y,z
coordinate axes.
ACTUATOR
Actuator is a device that converts the electrical signals into the physical events or
characteristics. It takes the input from the system and gives output to the environment. For
example, motors and heaters are some of the commonly used actuators.
Types of Actuators
1. Hydraulic Actuators: Hydraulic actuators operate by the use of a fluid-filled cylinder
with a piston suspended at the centre. Commonly, hydraulic actuators produce linear
movements, and a spring is attached to one end as a part of the return motion. These actuators
are widely seen in exercise equipment such as steppers or car transport carriers.
2. Pneumatic Actuators: Pneumatic actuators are one of the most reliable options for
machine motion. They use pressurized gases to create mechanical movement. Many
companies prefer pneumatic-powered actuators because they can make very precise motions,
especially when starting and stopping a machine. Examples of equipment that uses pneumatic
actuators include: Bus brakes, Exercise machines, Vane motors, Pressure sensors
3.Electric Actuators: Electrical actuators, as you may have guessed, require electricity to
work. Well-known examples include electric cars, manufacturing machinery, and robotics
KIIT POLYTECHNIC
Internet of Things 6 Abhaya Kumar Panda
equipment. Similar to pneumatic actuators, they also create precise motion as the flow of
electrical power is constant.
4.Thermal and Magnetic Actuators: Thermal and magnetic actuators usually consist of
shape memory alloys that can be heated to produce movement. The motion of thermal or
magnetic actuators often comes from the Joule effect, but it can also occur when a coil is
placed in a static magnetic field. The magnetic field causes constant motion called the
Laplace-Lorentz force. Most thermal and magnetic actuators can produce a wide and
powerful range of motion while remaining lightweight.
5.Mechanical Actuators: Some actuators are mostly mechanical, such as pulleys or rack and
pinion systems. Another mechanical force is applied, such as pulling or pushing, and the
actuator will leverage that single movement to produce the desired results. For instance,
turning a single gear on a set of rack and pinions can mobilize an object from point A to point
B. The tugging movement applied on the pulley can bring the other side upwards or towards
the desired location.
6. Soft Actuators: Soft actuators (e.g., polymer based) are designed to handle fragile objects
like fruit harvesting in agriculture or manipulating the internal organs in biomedicine.
They typically address challenging tasks in robotics. Soft actuators produce flexible motion
due to the integration of microscopic changes at the molecular level into a macroscopic
deformation of the actuator materials.
IOT COMPONENTS
Four fundamental components of IoT system, which tells us how IoT works.
i. Sensors/Devices
First, sensors or devices help in collecting very minute data from the surrounding
environment. All of this collected data can have various degrees of complexities ranging from
a simple temperature monitoring sensor or a complex full video feed.
A device can have multiple sensors that can bundle together to do more than just sense
things. For example, our phone is a device that has multiple sensors such as GPS,
accelerometer, camera but our phone does not simply sense things.
ii. Connectivity
Next, that collected data is sent to a cloud infrastructure but it needs a medium for transport.
The sensors can be connected to the cloud through various mediums of communication and
transports such as cellular networks, satellite networks, Wi-Fi, Bluetooth, wide-area networks
(WAN), low power wide area network and many more.
KIIT POLYTECHNIC
Internet of Things 7 Abhaya Kumar Panda
iii. Data Processing
Once the data is collected and it gets to the cloud, the software performs processing on the
acquired data.
This can range from something very simple, such as checking that the temperature reading on
devices such as AC or heaters is within an acceptable range. It can sometimes also be very
complex, such as identifying objects (such as intruders in your house) using computer vision
on video.
iv. User Interface
Next, the information made available to the end-user in some way. This can achieve by
triggering alarms on their phones or notifying through texts or emails.
Also, a user sometimes might also have an interface through which they can actively check in
on their IOT system. For example, a user has a camera installed in his house, he might want
to check the video recordings and all the feeds through a web server.
Service Oriented Architecture of IoT
SOA can also use to support IoT as a main contributing technology in devices or
heterogeneous systems.
KIIT POLYTECHNIC
Internet of Things 8 Abhaya Kumar Panda
1.Sensing Layer: IoT can be defined as a worldwide interconnected network, where things
or devises are controlled remotely. Interconnected things or devices are become easier, as
more and more things are furnished with sensors and RFID technologies.
2.Networking Layer: Networking Layer is responsible to connect all device or things
together so that they can able to share the information with each other over the Internet.
Moreover, network layer also collects data and information from the present IT infrastructure
for example ICT systems, power grids, business systems, healthcare systems, and
transportation systems.
3. Service Layer: This layer depends upon the technology used on the middleware layer
which is responsible for functionalities incorporate between applications and services in IoT.
This middleware technology also provides a cost-effective and efficient platform for IoT and
this platform including software and hardware components which can be reused when
needed.
KIIT POLYTECHNIC
Internet of Things 9 Abhaya Kumar Panda
4. Interface Layer: The core responsibility of the interface layer has also simplified the
interconnection and management of things. Interface specific profile can be defined as the
subset of services that support interaction with the application used in a network
Challenges for IoT
1. Security: Security is the most significant challenge for the IoT. Increasing the number of
connected devices increases the opportunity to exploit security vulnerabilities, as do poorly
designed devices, which can expose user data to theft by leaving data streams inadequately
protected and in some cases people’s health and safety can be put at risk.
2. Privacy: The IoT creates unique challenges to privacy, many that go beyond the data
privacy issues that currently exist. Much of this stems from integrating devices into our
environments without us consciously using them. This is becoming more prevalent in
consumer devices, such as tracking devices for phones and cars as well as smart televisions.
3. Scalability: Billions of internet-enabled devices get connected in a huge network, large
volumes of data are needed to be processed. The system that stores, analyses the data from
these IoT devices needs to be scalable.
4. Interoperability: Technological standards in most areas are still fragmented. These
technologies need to be converged. Which would help us in establishing a common
framework and the standard for the IoT devices. As the standardization process is still
lacking, interoperability of IoT with legacy devices should be considered critical. This lack of
interoperability is preventing us to move towards the vision of truly connected everyday
interoperable smart objects.
5. Bandwidth: Connectivity is a bigger challenge to the IoT than you might expect. As the
size of the IoT market grows exponentially, some experts are concerned that bandwidth-
intensive IoT applications such as video streaming will soon struggle for space on the IoT’s
current server-client model.
6. Standards: Lack of standards and documented best practices have a greater impact than
just limiting the potential of IoT devices. Without standards to guide manufacturers,
developers sometimes design products that operate in disruptive ways on the Internet without
much regard to their impact. If poorly designed and configured, such devices can have
negative consequences for the networking resources they connect to and the broader Internet.
7. Regulation: The lack of strong IoT regulations is a big part of why the IoT remains a
severe security risk, and the problem is likely to get worse as the potential attack surface
expands to include ever more crucial devices. When medical devices, cars and children’s toys
are all connected to the Internet, it’s not hard to imagine many potential disaster scenarios
unfolding in the absence of sufficient regulation
KIIT POLYTECHNIC
Internet of Things 10 Abhaya Kumar Panda
UNIT-2
IOT Networking
Connectivity Terminologies
IoT Node: These are machines, things or computers Connected to other nodes inside a LAN
via the IoT LAN, May be sometimes connected to the internet through a WAN directly
IoT LAN: It is Local, Short range Comm, May or may not connect to Internet, Building or
Organization wide
IoT WAN: Connection of various network segments, Organizationally and geographically
wide, Connects to the internet
IoT Gateway: A router connecting the IoT LAN to a WAN to the Internet, can implement
several LAN and WAN, Forwards packets between LAN and WAN on the IP layer
IoT Proxy: Performs active application layer functions between IoT nodes and other entities
Gateway Prefix Allotment:
• One of the strategies of address conservation in IoT is to use local addresses which
exist uniquely within the domain of the gateway. These are represented by the circles
in this slide.
• The network connected to the internet has routers with their set of addresses and
ranges.
• These routers have multiple gateways connected to them which can forward packets
from the nodes, to the Internet, only via these routers. These routers assign prefixes to
gateways under them, so that the gateways can be identified with them.
Impact of Mobility on Addressing
• The network prefix changes from 1 to 2 due to movement, making the IoT LAN safe
from changes due to movements.
• IoT gateway WAN address changes without change in LAN address. This is achieved
using ULA.
• The gateways assigned with prefixes, which are attached to a remote anchor point by
using various protocols such as Mobile IPv6, and are immune to changes of network
prefixes.
• This is achieved using LU. The address of the nodes within the gateways remains
unchanged as the gateways provide them with locally unique address and the change
in gateway’s network prefix doesn’t affect them.
• Sometimes, there is a need for the nodes to communicate directly to the internet. This
is achieved by tunnelling, where the nodes communicate to a remote anchor point
instead of channelling their packets through the router which is achieved by using
tunnelling protocols such as IKEv2:internet key exchange version 2
KIIT POLYTECHNIC
Internet of Things 11 Abhaya Kumar Panda
Multihoming
Multihoming is the practice of connecting a host or a computer network to more than one
network. This can be done in order to increase reliability or performance or to reduce cost.
There are several different ways to perform multihoming.
Host multihoming
A single host may be connected to multiple networks. For example, a mobile phone might be
simultaneously connected to a WiFi network and a 3G network, and a desktop computer
might be connected to both a home network and a VPN. A multihomed host usually is
assigned multiple addresses, one per connected network.
Classical multihoming
In classical multihoming a network is connected to multiple providers, and uses its own range
of addresses (typically from a Provider Independent (PI) range). The network's edge routers
communicate with the providers using a dynamic routing protocol, typically BGP, which
announces the network's address range to all providers. If one of the links fails, the dynamic
routing protocol recognizes the failure within seconds or minutes, and reconfigures its routing
tables to use the remaining links, transparently to the hosts.
Multihoming with multiple addresses
In this approach, the network is connected to multiple providers, and assigned multiple
address ranges, one for each provider. Hosts are assigned multiple addresses, one for each
provider.
Deviation from regular Web
KIIT POLYTECHNIC
Internet of Things 12 Abhaya Kumar Panda
Features IoT Stack Web Stack
Function or
application
It is used in constrained network having low power,
low bandwidth and low memory requirements.
It is used in non-constrained
network having no limits on
power/BW/memory.
Size of data to
be transported tens of bytes hundreds or thousands of bytes
Data format
It uses CBOR (Concise Binary Object
Representation) format as IoT is used for tiny
messages. CBOR is based on JSON though CBOR
uses binary encoding while JSON uses text encoding.
It uses HTML, XML and JSON
formats.
Application
Layer It uses CoAP protocol at application layer.
It uses HTTP protocol at
application layer.
Transport layer
It uses UDP which is faster due to smaller header size
compare to TCP. It is lighter protocol compare to
TCP.
It uses TCP which is connection
oriented and slower compare to
UDP.
Security layer
It uses DTLS (Datagram Transport Layer Security)
protocol for security.
It uses TLS/SSL protocols for the
same.
Internet layer
It uses 6LoWPAN to convert large IPv6 packets into
small size packets to be carried on wireless medium
as per bluetooth, zigbee etc. standards. It does
fragmentation and reassembly. It also does header
compression to reduce packet size.
It does not require protocols like
6LoWPAN. Fragmentation and
reassembly is taken care by
transport layer (i.e. TCP) itself.
Datalink or
MAC layer
It will have MAC layer as per IoT wireless
technology used viz. bluetooth, zigbee, zwave etc. It
takes care of medium access control and resource
allocation and management.
It will have MAC layer as per
LAN or WLAN or DSL or ISDN
technologies.
Physical layer
and Radio
Frequency (RF)
layer
It will have physical layer (baseband) as per IoT
wireless technologies viz. bluetooth, zigbee, zwave
etc. It uses frequencies as per cellular or indoor
wireless technologies and country wide allocations
for the same.
It will have PHY layer as per
LAN or WLAN or DSL or ISDN
technologies.
KIIT POLYTECHNIC
Internet of Things 13 Abhaya Kumar Panda
IoT identification and Data protocols
IPv4:
IP version four addresses are 32-bit integers which will be expressed in dotted decimal
notation.
Example- 192.0.2.126 could be an IPv4 address.
Characteristics of IPv4
• IPv4 could be a 32-Bit IP Address.
• IPv4 could be a numeric address, and its bits are separated by a dot.
• The number of header fields is twelve and the length of the header field is twenty.
• It has Unicast, broadcast, and multicast style of addresses.
• IPv4 supports VLSM (Virtual Length Subnet Mask).
• IPv4 uses the Post Address Resolution Protocol to map to the MAC address.
• RIP may be a routing protocol supported by the routed daemon.
• Networks ought to be designed either manually or with DHCP.
• Packet fragmentation permits from routers and causing host.
IPv4 Datagram Header
Version:
This field indicates the version number of the IP packet so that the revised version can be
distinguished from the previous version. The current IP version is 4.
Internet Header Length (IIHL):
It specifies the length of the IP header in unit 32 bits. In case of no option present in the IP
header, IHL will have a value of 5. So, if the value of IHL is more than 5 then the length of
the option field can be easily calculated.
KIIT POLYTECHNIC
Internet of Things 14 Abhaya Kumar Panda
Type of Service: This field specifies the priority of the packets based on delay, throughput,
reliability and cost requirements. Three bits are assigned for priority level and four bits for
specific requirements (delay, throughput, reliability and cost).
Total Length:
This field specifies the number of bytes of the IP packet including header and data. As 16 bits
are assigned to this field, the maximum length of the packet is 65635 bytes.
Identification:
The identification field is used to identify which packet a particular fragment belongs to so
that fragments for different packets don’t get mixed up.
Flags:
The flag field has three bits:
1. Unused bit
2. Don’t fragment (DF) bit
3. More fragment (MF) bit
Fragment Offset:
The fragment offset field identifies the location of the fragment in a packet. The value
measures the offset in a unit of 8 bytes, between the beginning of the packet to be fragmented
and the beginning of the fragment.
Time to live (TTL):
This field is used to indicate the amount of time in seconds a packet is allowed to remain in
the network.
Protocol:
This field specifies the protocol that is to receive the IP data at the destination host.
Header Checksum:
This field verifies the integrity of the header of the IP packet. The integrity of the data part is
left to the upper layer protocols. The checksum is generated by the source and it is sent along
with the frame header to the next router.
Source IP address & Destination IP address:
These two fields contain the IP addresses of the source and destination hosts respectively.
Options:
Options fields are rarely used to include special features such as security level, the route to be
taken and time stamp at each router. It is used in RSVP.
Padding:
This field is used to make the header a multiple of 32-bit words.
KIIT POLYTECHNIC
Internet of Things 15 Abhaya Kumar Panda
IPv6
Internet Protocol version 6 (IPv6) is also known as Internet Protocol next
generation (IPng). It also accommodates more feature to meet the global requirement of
growing Internet.
To allocate a sufficient number of network address, IPv6 allows 128 bits of IP address
separated into 8 sections of 2 bytes each. Unlike IPv4 where the address is represented as
dotted-decimal notation, IPv6 uses hexadecimal numbers and colon (“:”) is used as a
delimiter between the sections.
Example: IPv6 address may be like this:
FA20:B120: 6230:0000:0000: CE12:0006: ABDF
Version: This field is 4 bits long and it defines the version of the IP packet. The value of it
for IPv6 is 6 and IPv4 its value is 4. During the transition period from IPv4 to IPv6, the
routers will be able to distinguish the two versions of the IP packets.
Traffic Class: This field is 20 bits long and it is used to distinguish between the different
requirements for real-time delivery services.
Flow Label: This field is 20 bits long and it is used to allow the source and destination nodes
to set up a pseudo connection with particular properties and requirements. It is designed to
provide special handling of a particular flow of data.
Payload Length: It is of 2 bytes length and signifies the number of bytes that follow the 40
bytes base header. It is the length of the IP datagram excluding the base header.
Next Header: This field is of 1 bye length and it defines one of the extension headers that
follow the base header. The extension headers also contain this field to indicate the next
header. if this is the last IP header then Next header field tells which of the transport
protocols (TCP or UDP) the packet is to be passed.
Hop Limit: This field contains 1 byte and it signifies the maximum number of hops a packet
can travel. The time to live field in the IPv4 header did the same task, except that in IPv4 it
was counted in time and in IPv6 it is counted in terms of the number of routers.
Source Address: It is 16 bytes long and contains the IP address of the source machine to the
network interface.
KIIT POLYTECHNIC
Internet of Things 16 Abhaya Kumar Panda
Destination Address: It is 16 bytes long and usually contains the IP address of the ultimate
destination machine to the network interface. In case of specific routing, it may contain the IP
address of the next router.
Extension Header: Some of the fields Ipv4 that are missing in IPv6 is necessary in some of
the cases. To handle this problem, IPv6 has introduced the concept of the extension header.
There are be one or more of the six possible extension headers. These headers appear directly
after the base header.
MQTT
• It is a publish‐subscribe‐based lightweight messaging protocol for use in conjunction
with the TCP/IP protocol.
• Designed to provide connectivity (mostly embedded) between applications and
middle‐wares on one side and networks and communications on the other side.
• A message broker controls the publish‐subscribe messaging pattern.
• A topic to which a client is subscribed is updated in the form of messages and
distributed by the message broker.
• Designed for: Remote connections, Limited bandwidth, Small‐code footprint.
MQTT Components
• Publishers: Lightweight sensors
• Subscribers: Applications interested in sensor data
• Brokers: Connect publishers and subscribers and Classify sensor data into topics
Communication:
• The protocol uses a publish/subscribe architecture (HTTP uses a request/response
paradigm).
• Publish/subscribe is event‐driven and enables messages to be pushed to clients.
• The central communication point is the MQTT broker, which is in charge of
dispatching all messages between the senders and the rightful receivers.
KIIT POLYTECHNIC
Internet of Things 17 Abhaya Kumar Panda
• Each client that publishes a message to the broker, includes a topic into the message.
The topic is the routing information for the broker.
• Each client that wants to receive messages subscribes to a certain topic and the broker
delivers all messages with the matching topic to the client.
• Therefore, the clients don’t have to know each other. They only communicate over
the topic.
• This architecture enables highly scalable solutions without dependencies between the
data producers and the data consumers.
Applications
• Facebook Messenger uses MQTT for online chat.
• Amazon Web Services use Amazon IoT with MQTT.
• Microsoft Azure IoT Hub uses MQTT as its main protocol for telemetry messages.
• The EVRYTHNG IoT platform uses MQTT as an M2M protocol for millions of
connected products.
• Adafruit launched a free MQTT cloud service for IoT experimenters called Adafruit
IO.
SMQTT
• Secure MQTT is an extension of MQTT which uses encryption based on lightweight
attribute-based encryption.
• The main advantage of using such encryption is the broadcast encryption feature, in
which one message is encrypted and delivered to multiple other nodes, which is quite
common in IoT applications.
• In general, the algorithm consists of four main stages: setup, encryption, publish and
decryption.
CoAP
• CoAP – Constrained Application Protocol.
• Web transfer protocol for use with constrained nodes and networks.
• Designed for Machine to Machine (M2M) applications such as smart energy and
building automation and Based on Request‐Response model between end‐points
• Client‐Server interaction is asynchronous over a datagram-oriented transport protocol
such as UDP
• The Constrained Application Protocol (CoAP) is a session layer protocol designed by
IETF Constrained RESTful Environment (CoRE) working group to provide
lightweight RESTful (HTTP) interface.
KIIT POLYTECHNIC
Internet of Things 18 Abhaya Kumar Panda
• Representational State Transfer (REST) is the standard interface between HTTP client
and servers.
• Lightweight applications such as those in IoT, could result in significant overhead and
power consumption by REST.
• CoAP is designed to enable low‐power sensors to use RESTful services while
meeting their power constraints
• Built over UDP, instead of TCP (which is commonly used with HTTP) and has a light
mechanism to provide reliability.
• CoAP architecture is divided into two main sub‐layers:
• Messaging
• Request/response.
• The messaging sub‐layer is responsible for reliability and duplication of messages,
while the request/response sub‐layer is responsible for communication.
• CoAP has four messaging modes:
• Confirmable
• Non‐confirmable
• Piggyback
• Separate
CoAP Request-Response Model
• Confirmable and non‐confirmable modes represent the reliable and unreliable
transmissions, respectively, while the other modes are used for request/response.
• Piggyback is used for client/server direct communication where the server sends its
response directly after receiving the message, i.e., within the acknowledgment
message.
• On the other hand, the separate mode is used when the server response comes in a
message separate from the acknowledgment, and may take some time to be sent by
the server.
KIIT POLYTECHNIC
Internet of Things 19 Abhaya Kumar Panda
• Similar to HTTP, CoAP utilizes GET, PUT, PUSH, DELETE messages requests to
retrieve, create, update, and delete, respectively.
XMPP
• XMPP – Extensible Messaging and Presence Protocol.
• A communication protocol for message‐oriented middleware based on XML
(Extensible Markup Language).
• Real‐time exchange of structured data.
• It is an open standard protocol
• XMPP uses a client‐server architecture.
• As the model is decentralized, no central server is required.
• XMPP provides for the discovery of services residing locally or across a network,
and the availability information of these services.
• Well‐suited for cloud computing where virtual machines, networks, and firewalls
would otherwise present obstacles to alternative service discovery and presence‐
based solutions.
• Open means to support machine‐to‐machine or peer‐to‐peer communications
across a diverse set of networks.
Applications:
• Publish‐subscribe systems.
• Signaling for VoIP.
• Video.
• File transfer.
• Gaming.
• Internet of Things applications: Smart grid and Social networking services.
AMQP
• Advanced Message Queuing Protocol.
• Open standard for passing business messages between applications or organizations.
• Connects between systems and business processes.
• It is a binary application layer protocol.
• Basic unit of data is a frame.
KIIT POLYTECHNIC
Internet of Things 20 Abhaya Kumar Panda
Components
Exchange:
• Part of Broker.
• Receives messages and routes them to Queues.
Queue:
• Separate queues for separate business processes.
• Consumers receive messages from queues.
Bindings:
Rules for distributing messages (who can access what message, destination of the
message)
AMQP Features
• Targeted QoS (Selectively offering QoS to links).
• Persistence (Message delivery guarantees).
• Delivery of messages to multiple consumers.
• Possibility of ensuring multiple consumption.
• Possibility of preventing multiple consumption.
• High speed protocol.
KIIT POLYTECHNIC
Internet of Things 21 Abhaya Kumar Panda
Applications
• Monitoring and global update sharing.
• Connecting different systems and processes to talk to each other.
• Allowing servers to respond to immediate requests quickly and delegate time
consuming tasks for later processing.
• Distributing a message to multiple recipients for consumption.
• Enabling offline clients to fetch data at a later time.
• Introducing fully asynchronous functionality for systems.
• Increasing reliability and uptime of application deployments.
KIIT POLYTECHNIC
Internet of Things 22 Abhaya Kumar Panda
UNIT-3
Connectivity Technologies
• Communication Protocols: The following communication protocols have immediate
importance to consumer and industrial IoTs:
• IEEE 802.15.4
• Zigbee
• 6LoWPAN
• Wireless HART
• Z‐Wave
• ISA 100
• Bluetooth
• NFC
• RFID
IEEE 802.15.4
Features of IEEE 802.15.4:
• Well‐known standard for low data‐rate WPAN.
• Developed for low‐data‐rate monitoring and control applications and extended‐life
low‐power‐consumption uses.
• This standard uses only the first two layers (PHY, MAC) plus the logical link control
(LLC) and service specific convergence sub‐layer (SSCS) additions to communicate
with all upper layers.
• Uses direct sequence spread spectrum (DSSS) modulation.
• Highly tolerant of noise and interference and offers link reliability improvement
mechanisms.
• Low‐speed versions use Binary Phase Shift Keying (BPSK).
• High data‐rate versions use offset‐quadrature phase‐shift keying (O‐QPSK).
• Uses carrier sense multiple access with collision avoidance (CSMA‐CA) for channel
access.
• Multiplexing allows multiple users or nodes interference‐free access to the same
channel at different times.
• Networking topologies defined are ‐‐ Star, and Mesh.
KIIT POLYTECHNIC
Internet of Things 23 Abhaya Kumar Panda
IEEE 802.15.4 supports two types of network node:
1. Full Function Device (FFD)
• Can talk to all types of devices.
• Supports full protocol.
2. Reduced Function Device (RFD)
• Can only talk to an FFD.
• Lower power consumption.
• Minimal CPU/RAM required.
IEEE 802.15.4 Types:
1. Beacon Enabled Networks
• Periodic transmission of beacon messages.
• Data‐frames sent via Slotted CSMA/CA with a super frame structure managed by
PAN coordinator. Beacons used for synchronization & association of other nodes with
the coordinator.
• Scope of operation spans the whole network.
2. Non-Beacon Enabled Networks
• Data‐frames sent via un‐slotted CSMA/CA (Contention Based).
• Beacons used only for link layer discovery.
• Requires both source and destination IDs.
• As 802.15.4 is primarily, a mesh protocol, all protocol addressing must adhere to
mesh configurations.
• De‐centralized communication amongst nodes.
ZigBee
Features of ZigBee
• Most widely deployed enhancement of
IEEE 802.15.4.
• The ZigBee protocol is defined by layer
3 and above. It works with the 802.15.4
layers 1 and 2.
• The standard uses layers 3 and 4 to
define additional communication
enhancements.
• These enhancements include
authentication with valid nodes,
KIIT POLYTECHNIC
Internet of Things 24 Abhaya Kumar Panda
encryption for security, and a data routing and forwarding capability that enables
mesh networking.
• The most popular use of ZigBee is wireless sensor networks using the mesh topology.
ZigBee has two important components:
• ZigBee Device Object (ZDO): ZDO responsible for Device management,
Security, Policies.
• Application Support Sub‐layer (APS): APS responsible for Interfacing and
control services, bridge between network and other layers
ZigBee Types
1.ZigBee Coordinator (ZC):
▪ The coordinator forms the root of the ZigBee network tree and might act as a
bridge between networks.
▪ There is a single ZigBee Coordinator in each network, which originally
initiates the network.
▪ It stores information about the network under it and outside it.
▪ It acts as a Trust Centre & repository for security keys.
2. ZigBee Router (ZR): Capable of running applications, as well as relaying
information between nodes connected to it.
3. ZigBee End Device (ZED):
• It contains just enough functionality to talk to the parent node, and it cannot
relay data from other devices.
• This allows the node to be asleep a significant amount of the time thereby
enhancing battery life.
• Memory requirements and cost of ZEDs are quite low, as compared to ZR or
ZC.
Applications:
• Building automation
• Remote control (RF4CE or RF for consumer electronics)
• Smart energy for home energy monitoring
• Health care for medical and fitness monitoring
• Home automation for control of smart homes
• Light Link for control of LED lighting
• Telecom services.
KIIT POLYTECHNIC
Internet of Things 25 Abhaya Kumar Panda
6LoWPAN
• Low‐power Wireless Personal Area Networks over IPv6.
• Allows for the smallest devices with limited processing ability to transmit information
wirelessly using an Internet protocol.
• Allows low‐power devices to connect to the Internet.
• Created by the Internet Engineering Task Force (IETF) ‐ RFC 5933 and RFC 4919.
Features of 6LoWPANs
• Allows IEEE 802.15.4 radios to carry 128‐bit addresses of Internet Protocol version 6
(IPv6).
• Header compression and address translation techniques allow the IEEE 802.15.4
radios to access the Internet.
• IPv6 packets compressed and reformatted to fit the IEEE 802.15.4 packet format.
• Uses include IoT, Smart grid, and M2M applications.
Addressing in 6LoWPAN
• 64‐bit addresses: globally unique.
• 16-bit addresses: PAN specific; assigned by PAN coordinator
6LoWPAN Routing
• Mesh routing within the PAN space.
• Routing between IPv6 and the PAN domain
• Routing protocols in use:
▪ LOADng
▪ RPL
LOADng Routing
Basic operations of LOADng include:
▪ Generation of Route Requests (RREQs) by a LOADng Router (originator) for
discovering a route to a destination,
▪ Forwarding of such RREQs until they reach the destination LOADng Router,
▪ Generation of Route Replies (RREPs) upon receipt of an RREQ by the
indicated destination, and unicast hop‐by‐hop forwarding of these RREPs
towards the originator.
▪ If a route is detected to be broken, a Route Error (RERR) message is returned
to the originator of that data packet to inform the originator about the route
breakage.
KIIT POLYTECHNIC
Internet of Things 26 Abhaya Kumar Panda
RPL Routing
• Distance Vector IPv6 routing protocol for lossy and low power networks.
• Maintains routing topology using low-rate beaconing.
• Beaconing rate increases on detecting inconsistencies (e.g. node/link in a route is
down).
• Routing information included in the datagram itself.
• Proactive: Maintaining routing topology.
• Reactive: Resolving routing inconsistencies.
RFID
• RFID is an acronym for “radio‐frequency identification”.
• Data digitally encoded in RFID tags, which can be read by a reader.
• Somewhat similar to barcodes.
• Data read from tags are stored in a database by the reader.
• As compared to traditional barcodes and QR codes, RFID tag data can be read outside
the line‐of‐sight.
RFID Features
• RFID tag consists of an integrated circuit and an antenna.
• The tag is covered by a protective material which also acts as a shield against various
environmental effects.
• Tags may be passive or active.
• Passive RFID tags are the most widely used.
• Passive tags have to be powered by a reader inductively before they can transmit
information, whereas active tags have their own power supply.
Working Principle
• Derived from Automatic Identification and Data Capture (AIDC) technology.
• AIDC performs object identification, object data collection and mapping of the
collected data to computer systems with little or no human intervention.
• AIDC uses wired communication.
• RFID uses radio waves to perform AIDC functions.
KIIT POLYTECHNIC
Internet of Things 27 Abhaya Kumar Panda
• The main components of an RFID system include an RFID tag or smart label, an
RFID reader, and an antenna.
Applications
1. Inventory management 2. Asset tracking 3. Personnel tracking 4. Controlling
access to restricted areas 5. ID badging 6. Supply chain management 7. Counterfeit
prevention (e.g. in the pharmaceutical industry)
HART & Wireless HART
• WirelessHART is the latest release of Highway Addressable Remote Transducer
(HART) Protocol.
• HART standard was developed for networked smart field devices.
• The wireless protocol makes the implementation of HART cheaper and easier.
• HART encompasses the greatest number of field devices incorporated in any field
network.
• Wireless HART enables device placements more accessible and cheaper– such as
the top of a reaction tank, inside a pipe, or at widely separated warehouses.
• Main difference between wired and unwired versions is in the physical, data link
and network layers. Wired HART lacks a network layer.
HART Physic al Layer
• Derived from IEEE 802.15.4 protocol.
• It operates only in the 2.4 GHz ISM band.
• Employs and exploits 15 channels of the band to increase reliability.
HART Data Link Layer
• Collision free and deterministic communication achieved by means of super‐frames
and TDMA. Super‐frames consist of grouped 10ms wide timeslots.
• Super‐frames control the timing of transmission to ensure collision free and reliable
communication.
KIIT POLYTECHNIC
Internet of Things 28 Abhaya Kumar Panda
• This layer incorporates channel hopping and channel blacklisting to increase
reliability and security. Channel blacklisting identifies channels consistently affected
by interference and removes them from use.
HART Network & Transport Layers
• Cooperatively handle various types of traffic, routing, session creation, and security.
• Wireless HART relies on Mesh networking for its communication, and each device is
primed to forward packets from every other device. Each device is armed with an
updated network graph (i.e., updated topology) to handle routing.
• Network layer (HART)=Network + Transport + Session layers (OSI).
HART Application Layer
• Handles communication between gateways and devices via a series of command and
response messages.
• Responsible for extracting commands from a message,
o executing it and generating responses.
• This layer is seamless and does not differentiate between wireless and wired versions
of HART.
NFC
• Near field communication, or NFC for short, is an offshoot of radio‐frequency
identification (RFID).
• NFC is designed for use by devices within close proximity to each other.
• All NFC types are similar but communicate in slightly different ways.
NFC Types
• Passive devices contain information which is readable by other devices, however it
cannot read information itself.
• NFC tags found in supermarket products are examples of passive NFC.
• Active devices are able to collect as well as transmit information.
• Smartphones are a good example of active devices.
Working Principle
• Works on the principle of magnetic induction.
• A reader emits a small electric current which creates a magnetic field that in turn
bridges the physical space between the devices.
• The generated field is received by a similar coil in the client device where it is turned
back into electrical impulses to communicate data such as identification number status
information or any other information.
KIIT POLYTECHNIC
Internet of Things 29 Abhaya Kumar Panda
• ‘Passive’ NFC tags use the energy from the reader to encode their response while
‘active’ or ‘peer‐to‐peer’ tags have their own power source.
NFC Applications
• Smartphone based payments.
• Parcel tracking.
• Information tags in posters and advertisements.
• Computer game synchronized toys.
• Low‐power home automation systems.
Bluetooth
• Bluetooth wireless technology is a short-range communications technology.
• Intended for replacing cables connecting portable units
• Maintains high levels of security.
• Bluetooth technology is based on Ad‐hoc technology also known as Ad‐hoc Piconets
Features
• Bluetooth technology operates in the unlicensed industrial, scientific and medical
(ISM) band at 2.4 to 2.485 GHZ.
• Uses spread spectrum hopping, full‐duplex signal at a nominal rate of 1600 hops/sec.
• Bluetooth supports 1Mbps data rate for version 1.2 and 3Mbps data rate for Version
2.0 combined with Error Data Rate.
• Bluetooth operating range depends on the device:
o Class 3 radios have a range of up to 1 meter or 3 feet
o Class 2 radios are most commonly found in mobile devices have a range of 10
meters or 30 feet
o Class 1 radios are used primarily in industrial use cases have a range of 100 meters
or 300 feet.
Connection Establishment
KIIT POLYTECHNIC
Internet of Things 30 Abhaya Kumar Panda
• Inquiry: Inquiry run by one Bluetooth device to try to discover other devices near it.
• Paging: Process of forming a connection between two Bluetooth devices.
• Connection: A device either actively participates in the network or enters a low‐
power sleep mode
Piconets:
• Bluetooth enabled electronic devices connect and communicate wirelessly through
short range networks known as Piconets.
• Bluetooth devices exist in small ad‐hoc configurations with the ability to act either
as master or slave. Provisions are in place, which allow for a master and a slave
to switch their roles.
• The simplest configuration is a point-to-point configuration with one master and
one slave.
• Devices in adjacent Piconets provide a bridge to support inner‐Piconet
connections, allowing assemblies of linked Piconets to form a physically
extensible communication infrastructure known as Scatternet.
Applications
• Audio players
• Home automation
• Smartphones
• Toys
• Hands free headphones
• Sensor networks
Z Wave
• Zwave is a protocol for communication among devices used for home automation.
• It uses RF for signalling and control.
• Operating frequency is 908.42 MHz in the US & 868.42 MHz in Europe.
• Mesh network topology is the main mode of operation, and can support 232 nodes in
a network.
• Zwave utilizes GFSK modulation and Manchester channel encoding.
• A central network controller device sets‐up and manages a Zwave network.
• Each logical Zwave network has 1 Home (Network) ID and multiple node IDs for the
devices in it.
KIIT POLYTECHNIC
Internet of Things 31 Abhaya Kumar Panda
• Nodes with different Home IDs cannot communicate with each other.
• Network ID length=4 Bytes, Node ID length=1 Byte.
ISA 100.11A
• ISA is acronym International Society of Automation.
• Designed mainly for large scale industrial complexes and plants.
• More than 1 billion devices use ISA 100.11A
• ISA 100.11A is designed to support native and tunnelled application layers.
• Various transport services, including ‘reliable,’ ‘best effort,’ ‘real‐time’ are offered.
• Network and transport layers are based on TCP or UDP / IPv6.
• Data link layer supports mesh routing and Frequency hopping.
• Physical and MAC layers are based on IEEE 802.15.4
• Topologies allowed are:
• Star/tree
• Mesh
• Permitted networks include:
• Radio link
• ISA over Ethernet
• Field buses
KIIT POLYTECHNIC
Internet of Things 32 Abhaya Kumar Panda
UNIT-4
Wireless Sensor Networks
Wireless Sensor Networks (WSNs):
• WSN Consists of a large number of sensor nodes, densely deployed over an area.
• Sensor nodes are capable of collaborating with one another and measuring the
condition of their surrounding environments (i.e., Light, temperature, sound,
vibration).
• The sensed measurements are then transformed into digital signals and processed to
reveal some properties of the phenomena around sensors.
Components of a Sensor Node:
In any wireless sensor network, sensor node consists of four basic components, a sensing
unit, a processing unit, a transceiver unit, and a power unit. They may also have additional
application dependent components such as a location finding system, power generator and
mobilize
Challenges in WSN:
Energy: Power consumption can be allocated to three functional domains: sensing,
communication, and data processing, each of which requires optimization. The sensor node
lifetime typically exhibits a strong dependency on battery life. The constraint most often
associated with sensor network design is that sensor nodes operate with limited energy
budgets.
Limited bandwidth: Bandwidth limitation directly affects message exchanges among
sensors, and synchronization is impossible without message exchanges. Sensor networks
often operate in a bandwidth and performance constrained multi-hop wireless
communications medium. These wireless communications links operate in the radio, infrared,
or optical range.
Node Costs: A sensor network consists of a large set of sensor nodes. It follows that the cost
of an individual node is critical to the overall financial metric of the sensor network. Clearly,
the cost of each sensor node has to be kept low for the global metrics to be acceptable.
Deployment Node: A proper node deployment scheme can reduce the complexity of
problems. Deploying and managing a high number of nodes in a relatively bounded
environment requires special techniques. Hundreds to thousands of sensors may be deployed
in a sensor region.
Security: One of the challenges in WSNs is to provide high security requirements with
constrained resources. Many wireless sensor networks collect sensitive information. The
remote and unattended operation of sensor nodes increases their exposure to malicious
intrusions and attacks. The security requirements in WSNs are comprised of node
authentication and data confidentiality. To identify both trustworthy and unreliable nodes
from a security stand points, the deployment sensors must pass a node authentication
KIIT POLYTECHNIC
Internet of Things 33 Abhaya Kumar Panda
examination by their corresponding manager nodes or cluster heads and unauthorized nodes
can be isolated from WSNs during the node authentication procedure.
SENSOR WEB
the sensor web is a type of sensor network that is especially well suited for environmental
monitoring. The sensor web is also associated with a sensing system which heavily utilizes
the World Wide Web.
Sensor Web Enablement (SWE)
Sensor Web Enablement (SWE) is a suite of standards developed and maintained by Open
Geospatial Consortium. SWE standards enable developers to make all types of sensors,
transducers and sensor data repositories discoverable, accessible and usable via the Web.
SWE Standards include:
• Sensor Observation Service
• Sensor Planning Service
• Observations and Measurements
• Sensor Model Language
• Sensor Things API
Cooperation in Wireless Ad Hoc and Sensor Networks
• Nodes communicate with other nodes with the help of intermediate nodes.
• The intermediate nodes act as relays.
• Wireless nodes are energy-constrained.
• Nodes may or may not cooperate.
• Two extremities for Cooperation:
o Total cooperation: if all relay requests are accepted, nodes will quickly
exhaust limited energy.
o Total non‐cooperation: if no relay requests are accepted, the network
throughput will go down rapidly.
Node Behaviour in WSNs:
KIIT POLYTECHNIC
Internet of Things 34 Abhaya Kumar Panda
▪ Normal nodes work perfectly in ideal environmental conditions.
▪ Failed nodes are simply those that are unable to perform an operation; this could be
because of power failure and environmental events.
▪ Badly failed nodes exhibit features of failed nodes but they can also send false routing
messages which are a threat to the integrity of the network.
▪ Selfish nodes are typified by their unwillingness to cooperate, as the protocol requires
whenever there is a personal cost involved. Packet dropping is the main attack by
selfish nodes.
▪ Malicious nodes aim to deliberately disrupt the correct operation of the routing
protocol, denying network service if possible.
Dynamic Misbehaviour (Dumb behaviour):
• Detection of such temporary misbehaviour in order to preserve normal functioning of
the network – coinage and discovery of dumb behaviour.
• In the presence of adverse environmental conditions (high temperature, rainfall, and
fog) the communication range shrinks.
• A sensor node can sense its surroundings but is unable to transmit the sensed data
• With the resumption of favourable environmental conditions, dumb nodes work
normally.
• Dumb behaviour is temporal in nature (as it is dependent on the effects of
environmental conditions).
Self-Management of Wireless Sensor Networks:
▪ A WSN is deployed with the intention of acquiring information.
▪ The sensed information is transmitted in the form of packets.
▪ Information theoretic self‐management (INTSEM) controls the transmission rate of a
node by adjusting a node’s sleep time.
▪ Benefits:
▪ Reduce consumption of transmission energy of transmitters.
▪ Reduce consumption of receiving energy of relay nodes.
Social sensing WSN
• Social Sensing‐based Duty Cycle Management for Monitoring Rare Events in
Wireless Sensor Networks.
WSNs are energy‐constrained Scenario:
• Event monitoring using WSNs.
• WSNs suffer from ineffective sensing for rare events.
• Event monitoring or sensing, even if there is no event to monitor or sense.
• Example: Submarine monitoring in underwater surveillance.
KIIT POLYTECHNIC
Internet of Things 35 Abhaya Kumar Panda
• Challenges:
• Distinguish rare events and regular events.
• Adapt the duty‐cycle with the event occurrence probability.
• Contribution:
• Probabilistic duty cycle (PDC) in WSNs.
• Accumulates information from the social media to identify the occurrence
possibility of rare events.
• Adjusts the duty cycles of sensor nodes using weak estimation learning
automata.
Applications of WSNs:
1. Mines
• Fire Monitoring and Alarm System for Underground Coal Mines Bord‐and‐Pillar
Panel Using Wireless Sensor Networks.
▪ WSN‐based simulation model for building a fire monitoring and alarm (FMA)
system for Bord & Pillar coal mine.
▪ The fire monitoring system has been designed specifically for Bord & Pillar
based mines.
▪ It is not only capable of providing real‐time monitoring and alarm in case of a
fire, but also capable of providing the exact fire location and spreading
direction by continuously gathering, analysing, and storing real time
information.
2. Healthcare
• Wireless Body Area Networks
▪ Wireless body area networks (WBANs) have recently gained popularity due to
their ability in providing innovative, cost‐effective, and user‐friendly solution
for continuous monitoring of vital physiological parameters of patients.
▪ Monitoring chronic and serious diseases such as cardiovascular diseases and
diabetes.
▪ Could be deployed in elderly persons for monitoring their daily activities.
3.Internet of Things (IOT)
4. Surveillance and Monitoring for security, threat detection
5. Environmental temperature, humidity, and air pressure
6. Noise Level of the surrounding
7. Landslide Detection
KIIT POLYTECHNIC
Internet of Things 36 Abhaya Kumar Panda
Wireless Multimedia Sensor Networks (WMSNs)
• Incorporation of low-cost camera (typically CMOS) to wireless sensor nodes
• Camera sensor (CS) nodes: capture multimedia (video, audio, and the scalar) data,
expensive and resource hungry, directional sensing range
• Scalar sensor (SS) nodes: sense scalar data (temperature, light, vibration, and so on),
omni‐ directional sensing range, and low cost
• WMSNs consist of a smaller number of CS nodes and large number of SS nodes
WMSNs Application
• In security surveillance, wild‐habitat monitoring, environmental monitoring, SS nodes
cannot provide precise information
• CS nodes replace SS nodes to get precise information
• Deployment of both CS and SS nodes can provide better sensing and prolong network
lifetime
Nanonetworks:
▪ Nanodevice has components of sizes in the order nano‐meters.
▪ Communication options among nanodevices
o Electromagnetic
o Molecular
Molecular Communication:
▪ Molecule used as information
▪ Information packed into vesicles
▪ Gap junction works as mediator between cells and vesicles
▪ Information exchange between communication entities using molecules
Electromagnetic-based Communication
▪ Surface Plasmonic Polariton (SPP) generated upon electromagnetic beam
▪ EM communication for Nanonetworks centres around 0.1‐10 Terahertz channel
Underwater Acoustic Sensor Networks
• In a layered shallow oceanic region, the inclusion of the effect of internal solitons on
the performance of the network is important.
• Based on various observations, it is proved that non-linear internal waves, i.e.,
Solitons are one of the major scatters of underwater sound.
• If sensor nodes are deployed in such type of environment, inter-node communication
is affected due to the interaction of wireless acoustic signal with these solitons, as a
result of which network performance is greatly affected.
KIIT POLYTECHNIC
Internet of Things 37 Abhaya Kumar Panda
• The performance analysis of UWASNs renders meaningful insights with the inclusion
of a mobility model which represents realistic oceanic scenarios.
• The existing works on performance analysis of UWASNs lack the consideration of
major dominating forces, which offer impetus for a node’s mobility.
WSN Coverage:
• Coverage – area‐of‐interest is covered satisfactorily.
• Connectivity – all the nodes are connected in the network, so that sensed data can
reach to sink node.
• Sensor Coverage studies how to deploy or activate sensors to cover the monitoring
area.
▪ Sensor placement
▪ Density control
• Two modes:
▪ Static sensors
▪ Mobile sensors
• Determine how well the sensing field is monitored or tracked by sensors.
• To determine, with respect to application‐specific performance criteria,
▪ in case of static sensors, where to deploy and/or activate them
▪ in case of (a subset of) the sensors are mobile, how to plan the trajectory of the
mobile sensors.
• These two cases are collectively termed as the coverage problem in wireless sensor
networks.
• The purpose of deploying a WSN is to collect relevant data for processing or
reporting.
• Two types of reporting:
▪ event driven: e.g., forest fire monitoring
▪ on demand: e.g., inventory control system
• Objective is to use a minimum number of sensors and maximize the network lifetime
• The coverage algorithm proposed are either centralized or distributed and localized
• Distributed: Nodes compute their position by communicating with their neighbours
only.
• Centralized: Data collected at central point and global map computed.
KIIT POLYTECHNIC
Internet of Things 38 Abhaya Kumar Panda
• Localized: Localized algorithms are a special type of distributed algorithms where
only a subset of nodes in the WASN participate in sensing, communication, and
computation.
Stationary Wireless Sensor Networks
• Sensor nodes are static.
• Advantages:
▪ Easy deployment
▪ Node can be placed in an optimized distance-Reduce the total number of
nodes
▪ Easy topology maintenance
• Disadvantages:
▪ Node failure may result in partition of networks
▪ Topology cannot be change automatically
Mobile Wireless Sensor Networks
▪ MWSN is Mobile Ad hoc Network (MANET)
▪ Let us remember from previous lectures: ‐
▪ MANET‐Infrastructure less network of mobile devices connected wirelessly which
follow the self‐CHOP properties
o Self‐Configure
o Self‐Heal
o Self‐Optimize
o Self‐Protect
▪ Wireless Sensor Networks‐
o Consists of a large number of sensor nodes, densely deployed over an area.
o Sensor nodes are capable of collaborating with one another and measuring the
condition of their surrounding environments (i.e., Light, temperature, sound,
vibration).
Components of MWSN:
Mobile Sensor Nodes: Sense physical parameters from the environment When these nodes
come in close proximity of sink, deliver data.
Mobile Sink: Moves in order to collect data from sensor nodes. Based on some algorithm
sink moves to different nodes in the networks.
Data Mules: A mobile entity Collects the data from sensor nodes and Goes to the sink and
delivers the collected data from different sensor nodes.
KIIT POLYTECHNIC
Internet of Things 39 Abhaya Kumar Panda
UNIT-5
Machine to Machine Communication
M2M Communication: M2M, is the Communication between machines or devices with
computing and communication facilities, without any human intervention.
Features of M2M:
• Large number of nodes or devices.
• Low cost.
• Energy efficient.
• Small traffic per machine/device.
• Large quantity of collective data.
• M2M communication free from human intervention.
• Human intervention required for operational stability and sustainability
M2M Ecosystem: It comprises of Device Providers, Internet Service Providers (ISPs),
Platform Providers, Service Providers and Service Users.
The device provider is basically the owner of these devices. M2M area network sends the
data from M2M devices, through gateway to the internet which is handled by the internet
service provider. RESTful architecture acts as an interface between the device provider and
the internet service provider. RESTful architecture is used in low resource environment.
From the ISP the reaches the platform provider. The platform provider takes care of device
management, user management, data Analytics and user access is the data is then through a
RESTful architecture which takes care of the business model to the service providers and
users.
M2M Service Platform (M2SP)
KIIT POLYTECHNIC
Internet of Things 40 Abhaya Kumar Panda
M2M Device Platform:
• Enables access to objects or devices connected to the Internet anywhere and at any
time.
• Registered devices create a database of objects from which managers, users and
services can easily access information.
• Manages device profiles, such as location, device type, address, and description.
• Provides authentication and authorization key management functionalities.
• Monitors the status of devices and M2M area networks, and controls them based on
their status.
M2M User Platform
• Manages M2M service user profiles and provides functionalities such as,
▪ User registration
▪ Modification
▪ Charging
▪ Inquiry.
• Interoperates with the Device‐platform, and manages user access restrictions to
devices, object networks, or services.
• Service providers and device managers have administrative privileges on their devices
or networks.
• Administrators can manage the devices through device monitoring and control.
M2M Application Platform
• Provides integrated services based on device collected data‐ sets.
• Heterogeneous data merging from various devices used for creating new services.
• Collects control processing log data for the management of the devices by working
with the Device‐platform.
• Connection management with the appropriate network is provided for seamless
services.
M2M Access Platform
• Provides app or web access environment to users.
• Apps and links redirect to service providers.
• Services actually provided through this platform to M2M devices.
• Provides App management for smart device apps.
KIIT POLYTECHNIC
Internet of Things 41 Abhaya Kumar Panda
• App management manages app registration by developers and provides a mapping
relationship between apps and devices.
• Mapping function provides an app list for appropriate devices.
Interoperability in Internet of Things
Interoperability is a characteristic of a product or system, whose interfaces are completely
understood, to work with other products or systems, present or future, in either
implementation or access, without any restrictions.
Need of Interoperability:
• To fulfil the IoT objectives
▪ Physical objects can interact with any other physical objects and can share
their information
▪ Any device can communicate with other devices anytime from anywhere
▪ Machine to Machine communication(M2M), Device to Device
Communication (D2D), Device to Machine Communication (D2M)
▪ Seamless device integration with IoT network
• Heterogeneity
▪ Different wireless communication protocols such as ZigBee (IEEE 802.15.4),
Bluetooth (IEEE 802.15.1), GPRS, 6LowPAN, and Wi-Fi (IEEE 802.11)
▪ Different wired communication protocols like Ethernet (IEEE 802.3) and
Higher Layer LAN Protocols (IEEE 802.1)
▪ Different programming languages used in computing systems and websites
such as JavaScript, JAVA, C, C++, Visual Basic, PHP, and Python
▪ Different hardware platforms such as Crossbow, NI, etc.
▪ Different operating systems
▪ As an example, for sensor node: TinyOS, SOS, Mantis OS, RETOS, and
mostly vendor specific OS.
▪ As an example, for personal computer: Windows, Mac, Unix, and Ubuntu.
▪ Different databases: DB2, MySQL, Oracle, PostgreSQL, SQLite, SQL Server,
and Sybase.
▪ Different data representations.
▪ Different control models.
▪ Syntactic or semantic interpretations.
KIIT POLYTECHNIC
Internet of Things 42 Abhaya Kumar Panda
Types of Interoperability
User Interoperability: Interoperability problem between a user and a device
The following problems need to be solved
• Device identification and categorization for discovery
• Syntactic interoperability for device interaction.
• Semantic interoperability for device interaction.
Device identification and categorization for discovery: There are different solutions for
generating unique address like Electronic Product Codes (EPC), Universal Product Code
(UPC), Uniform Resource Identifier (URI), IP Addresses (IPv6).
Syntactic Interoperability for Device Interaction:
• The interoperability between devices and device user in term of message formats
• The message format from a device to a user is understandable for the user’s
computer.
• On the other hand, the message format from the user to the device is executable by
the device.
Semantic Interoperability for Device Interaction:
• The interoperability between devices and device user in term of message’s
meaning.
• The device can understand the meaning of user’s instruction that is sent from the
user to the device.
• Similarly, the user can understand the meaning of device’s response sent from the
device.
Device Interoperability: Interoperability problem between two different devices
Solution approach for device interoperability.
• Universal Middleware Bridge (UMB)
▪ Solves seamless interoperability problems caused by the heterogeneity of
several kinds of home network middleware.
▪ UMB creates virtual maps among the physical devices of all middleware home
networks, such as HAVI, Jini, LonWorks, and UPnP.
▪ Creates a compatibility among these middleware home networks.
▪ UMB consists of UMB Core (UMB-C) and UMB Adaptor (UMB-A).
▪ UMB-A converts physical devices into virtually abstracted one, as described
by Universal Device Template (UDT).
▪ UDT consists of a Global Device ID, Global Function ID, Global Action ID,
Global Event ID, and Global Parameters.
KIIT POLYTECHNIC
Internet of Things 43 Abhaya Kumar Panda
▪ UMB Adaptors translate the local middleware’s message into global
metadata’s message.
▪ The major role of the UMB Core is routing the universal metadata message to
the destination or any other UMB Adaptors by the Middleware Routing Table
(MRT).
KIIT POLYTECHNIC
Internet of Things 44 Abhaya Kumar Panda
UNIT-6
Programming with Arduino
Arduino is a prototype platform (open-source) based on an easy-to-use hardware and
software. It consists of a circuit board, which can be programed (referred to as a
microcontroller) and a ready- made software called Arduino IDE (Integrated Development
Environment), which is used to write and upload the computer code to the physical board.
Features of Arduino
• Arduino boards are able to read analog or digital input signals from different sensors
and turn it into an output such as activating a motor, turning LED on/off, connect to
the cloud and many other actions.
• You can control your board functions by sending a set of instructions to the
microcontroller on the board via Arduino IDE (referred to as uploading software).
• Unlike most previous programmable circuit boards, Arduino does not need an extra
piece of hardware (called a programmer) in order to load a new code onto the board.
You can simply use a USB cable.
• Additionally, the Arduino IDE uses a simplified version of C++, making it easier to
learn to program.
• Finally, Arduino provides a standard form factor that breaks the functions of the
micro-controller into a more accessible package.
Components of Arduino Board
We will study the Arduino UNO board because it is the most popular board in the Arduino
board family. In addition, it is the best board to get started with electronics and coding. Some
boards look a bit different from the one given below, but most Arduinos have majority of
these components in common.
KIIT POLYTECHNIC
Internet of Things 45 Abhaya Kumar Panda
Power USB
Arduino board can be powered by using the USB cable from your computer. All you
need to do is connectthe USB cable to the USB connection (1).
Power (Barrel Jack)
Arduino boards can be powered directly from the AC mains power supply by connecting
it to the Barrel Jack(2).
Voltage Regulator
The function of the voltage regulator is to control the voltage given to the Arduino
board and stabilize theDC voltages used by the processor and other elements.
Crystal Oscillator
The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on top
of the Arduino crystal is 16.000H9H. Ittells us that the frequency is 16,000,000 Hertz or
16 MHz.
Arduino Reset
You can reset your Arduino board, i.e., start your program from the beginning. You can
reset the UNO boardin two ways. First, by using the reset button (17) on the board.
Second, you can connect an external reset button to the Arduino pin labelled RESET (5).
Pins (3.3, 5, GND, Vin)
• 3.3V (6) − Supply 3.3 output volt
• 5V (7) − Supply 5 output volt
• Most of the components used with Arduino board works fine with 3.3 volt and 5
volt.
• GND (8)(Ground) − There are several GND pins on the Arduino, any of which
can be used to groundyour circuit.
• Vin (9) − This pin also can be used to power the Arduino board from an
external power source, likeAC mains power supply.
Analog pins
The Arduino UNO board has six analog input pins A0 through A5. These pins can read
the signal from an analog sensor like the humidity sensor or temperature sensor and
convert it into a digital value that can beread by the microprocessor.
KIIT POLYTECHNIC
Internet of Things 46 Abhaya Kumar Panda
Main microcontroller
Each Arduino board has its own microcontroller (11). You can assume it as the brain of
your board. The main IC (integrated circuit) on the Arduino is slightly different from
board to board. The microcontrollers areusually of the ATMEL Company. You must
know what IC your board has before loading up a new programfrom the Arduino IDE.
This information is available on the top of the IC. For more details about the IC
construction and functions, you can refer to the data sheet.
ICSP pin
Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of
MOSI, MISO, SCK,RESET, VCC, and GND. It is often referred to as an SPI (Serial
Peripheral Interface), which could be
considered as an "expansion" of the output. Actually, you are slaving the output device to
the master of the SPI bus.
Power LED indicator
This LED should light up when you plug your Arduino into a power source to indicate
that your board is powered up correctly. If this light does not turn on, then there is
something wrong with the connection.
TX and RX LEDs
On your board, you will find two labels: TX (transmit) and RX (receive). They appear in
two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the
pins responsible for serial communication. Second, the TX and RX led (13). The TX led
flashes with different speed while sending the serial data. The speed of flashing depends
on the baud rate used by the board. RX flashes during the receiving process.
Digital I/O
The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse
Width Modulation) output. These pins can be configured to work as input digital pins to
read logic values (0 or 1) or as digital output pins to drive different modules like LEDs,
relays, etc. The pins labeled “~” can be used to generate PWM.
AREF
AREF stands for Analog Reference. It is sometimes, used to set an external reference
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.
KIIT POLYTECHNIC
Internet of Things 47 Abhaya Kumar Panda
Arduino IDE
After learning about the main parts of the Arduino UNO board, we are ready to learn
how to set up theArduino IDE. Once we learn this, we will be ready to upload our
program on the Arduino board.
In this section, we will learn in easy steps, how to set up the Arduino IDE on our
computer and preparethe board to receive the program via USB cable.
Step 1 − First you must have your Arduino board (you can choose your favorite
board) and a USB cable. In case you use Arduino UNO, Arduino Duemilanove,
Nano, Arduino Mega 2560, or Diecimila,you will need a standard USB cable (A
plug to B plug), the kind you would connect to a USB printeras shown in the
following image.
In case you use Arduino Nano, you will need an A to Mini-B cable
instead as shown in the following image.
Step 2 − Download Arduino IDE Software.
You can get different versions of Arduino IDE from the Download page on the
Arduino Official website.You must select your software, which is compatible with
your operating system (Windows, IOS, or Linux). After your file download is
complete, unzip the file.
Step 3 − Power up your board.
The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw
power from either, the USB connection to the computer or an external power supply.
If you are using an Arduino Diecimila, you have to make sure that the board is
configured to draw power from the USB connection. The power source is selected
with a jumper, a small piece of plastic that fits onto two of the three pins between
the USB and power jacks. Check that it is on the two pins closest to the USB port.
Connect the Arduino board to your computer using the USB cable. The green power
LED (labeled PWR) should glow.
Step 4 − Launch Arduino IDE.
After your Arduino IDE software is downloaded, you need to unzip the
folder. Inside the folder, you can find the application icon with an infinity
label (application.exe). Double-click the icon to start the IDE.
KIIT POLYTECHNIC
Internet of Things 48 Abhaya Kumar Panda
Step 5 − Open your first project.
Once the software starts, you have two options −
• Create a new project.
• Open an
existing project
example. To create
a new project,
select File → New.
To open an existing project example, select File → Example → Basics → Blink.
Here, we are selecting just one of the examples with the name Blink. It
turns the LED on and off with some time delay. You can select any other
example from the list.
Step 6 − Select your Arduino board.
To avoid any error while uploading your program to the board, you must
select the correct Arduino board name, which matches with the board
connected to your computer.
Go to Tools → Board and select your board.
Here, we have selected Arduino Uno board according to our tutorial, but
you must select the name matching the board that you are using.
Step 7 − Select your serial port.
Select the serial device of the Arduino board. Go to Tools → Serial Port
menu. This is likely to be COM3 or higher (COM1 and COM2 are usually
reserved for hardware serial ports). To find out, you can disconnect your
Arduino board and re-open the menu, the entry that disappears should be
of the Arduino board. Reconnect the board and select that serial port.
Step 8 − Upload the program to your board.
Before explaining how we can upload our program to the board, we must
demonstrate the function ofeach symbol appearing in the Arduino IDE
toolbar.
KIIT POLYTECHNIC
Internet of Things 49 Abhaya Kumar Panda
A − Used to check if there is any compilation error. B − Used to upload a program to the
Arduino board. C − Shortcut used to create a new sketch.
D − Used to directly open one of the example sketch.
E − Used to save your sketch.
F − Serial monitor used to receive serial data from the board and send the serial data to the
board.
Now, simply click the "Upload" button in the environment. Wait a few seconds; you will see
the RX and TX LEDs on the board, flashing. If the upload is successful, the message "Done
uploading" will appear in the status bar.
KIIT POLYTECHNIC
Internet of Things 50 Abhaya Kumar Panda
UNIT-7
Programming with Raspberry Pi
Introduction
• Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer
monitor TV and uses a standard keyboard and mouse.
• It is a little device that enables people of all ages to explore computing.
• Programs are written in languages like Scratch and Python.
• It is capable of doing everything we expect from a desktop computer. We can browse
the Internet, play high-definition video, to make spreadsheets, word-processing and
playing games.
• There are several generations of Raspberry Pi like Raspberry Pi 3 model B, Raspberry
Pi 2 model B, Raspberry Pi zero.
Architecture
(Basic Architecture of Raspberry Pi)
The basic set up for Raspberry Pi includes HDMI cable, monitor, keyboard, mouse, 5volt
power adapter for Raspberry Pi, LAN cable, 2 GB micro SD card (minimum). The official
operating systems supported are Raspbian and NOOBS. Other third-party operating systems
like Ubuntu mate, Snappy Ubuntu Core, Windows 10 Core, Pinet and Risc OS are also
supported by Raspberry Pi.
Most commonly Pi. used programming languages in Raspberry Pi are Python, C, C++, Java,
Scratch and Ruby
The popular applications developed using Raspberry Pi are media streamer, home
automation,
controlling robot, Virtual Private Network (VPN), light weight Web server with IoT etc.
KIIT POLYTECHNIC
Internet of Things 51 Abhaya Kumar Panda
Pin Configuration
GPIO pins in pins in Raspberry Pi are the general-purpose Input-Output pins. These pins are
to Communicate WITH OTHER circuit such as such as extension boards, custom circuits and
much more.
For getting an output, we can turn a GPIO pin HIGH or LOW.
These pins are a physical interface between the Pi and the outside world. At the
simplest level, we can think of them as switches that you can turn on or off (input) or that the
Pi can turn on or off (output). Seventeen of the 26 pins are GPIO pins. Others are power or
ground pins. Each pin can turn on or off, or go HIGH or LOW in computing terms. When the
pin is HIGH it outputs 3.3 volts (3v3) and when the pin is LOW, it is off.
We can program the pins to interact in amazing ways with the real world. Inputs don't
have to come from a physical switch. It could be input from a sensor or a signal from another
computer or device. The output can also do anything, from turning on an LED to sending
Signal or data to another device. If the Raspberry Pi is on a network, we can control devices
that are attached to it from anywhere and those devices can send data back. Connectivity and
control of physical devices over the Internet is a powerful and exciting thing and the
Raspberry Pi is ideal for this.
Case Studies
we will discuss about 2 example projects using Raspberry Pi. "The first one is is an LED and
the second one is taking a picture using PiCam. The codes for both the examples are written
in Python.
KIIT POLYTECHNIC
Internet of Things 52 Abhaya Kumar Panda
Blinking LED:
Following are the requirements for this experiment.
• Raspberry pi
• LED
• 100-ohm resistor
• Bread board
• Jumper cables
We need to install GPIO Library
Installing GPIO library:
▪ Open terminal
▪ Enter the command “sudo apt-get install python-dev” to install python development
▪ Enter the command “sudo apt-get install python-rpi.gpio” to install GPIO library.
Connection:
▪ Connect the negative terminal of the LED to the ground pin of Pi
▪ Connect the positive terminal of the LED to the output pin of Pi
KIIT POLYTECHNIC
Internet of Things 53 Abhaya Kumar Panda
Capture Image using Raspberry Pi
Requirement:
▪ Raspberry Pi
▪ Raspberry Pi Camera
Raspberry Pi Camera:
▪ Raspberry Pi specific camera module
▪ Dedicated CSI slot in Pi for connection
▪ The cable slot is placed between Ethernet port and HDMI port
Connection: Boot the Pi once the camera is connected to Pi
Configuring Pi for Camera
• In the terminal run the command “sudo raspi-config” and press enter.
• Navigate to “Interfacing Options” option and press enter.
• Navigate to “Camera” option.
• Enable the camera.
• Reboot Raspberry pi.
Capture Image
▪ Open terminal and enter the command-
raspistill -o image.jpg
▪ This will store the image as ‘image.jpg’
PiCam can also be processed using Python camera module python-picamera
sudo apt-get install python-picamera
Python Code:
Import picamera
camera = picamera.PiCamera() camera.capture('image.jpg')
Implementation of loT with Raspberry Pi
For this we need to integrate sensors and actuators interfaced with Raspberry Pi. The data
will be read from the sensor. The actuator will be controlled according to the reading from
the sensor. We will see an example of a Temperature Dependent Auto Cooling System.
KIIT POLYTECHNIC
Internet of Things 54 Abhaya Kumar Panda
Temperature Dependent Auto Cooling System
In this experiment a DHT sensor senses the temperature and when the temperature goes
above 30° C, a fan needs to be automatically turned on.
Requirements
▪ DHT Sensor
▪ 4.7K ohm resistor
▪ Relay
▪ Jumper wires
▪ Raspberry Pi
▪ Mini fan
DHT Sensor
In Digital Humidity and Temperature Sensor (DHT) there are 4 pins: PIN 1, 2, 3, 4 (from left
to right)
o PIN 1- 3.3V-5V Power supply
o PIN 2- Data
o PIN 3- Null
o PIN 4- Ground
Relay
This is a mechanical or electromechanical switch. There are 3 output terminals from left to
right.
▪ NO (normal open):
▪ Common
▪ NC (normal close)
Connection
1.Sensor interface with Raspberry Pi
▪ Connect pin 1 of DHT sensor to the 3.3V pin of Raspberry Pi
▪ Connect pin 2 of DHT sensor to any input pins of Raspberry Pi, here we have used
pin 11
▪ Connect pin 4 of DHT sensor to the ground pin of the Raspberry Pi
2. Relay interface with Raspberry Pi
▪ Connect the VCC pin of relay to the 5V supply pin of Raspberry Pi
▪ Connect the GND (ground) pin of relay to the ground pin of Raspberry Pi
KIIT POLYTECHNIC
Internet of Things 55 Abhaya Kumar Panda
▪ Connect the input/signal pin of Relay to the assigned output pin of Raspberry Pi (Here
we have used pin 7)
3. Fan interface with Raspberry Pi
▪ Connect the Li-Po battery in series with the fan.
▪ NO terminal of the relay is connected to the positive terminal of the fan.
▪ Common terminal of the relay is connected to positive terminal of the battery.
▪ Negative terminal of the battery is connected to the negative terminal of the fan.
Adafruit provides a library to work with the DHT22 sensor. Install the library in our Pi. Get
the clone from GIT
git clone https://github.com/adafruit/Adafruit_Python_DHT.g...
Go to folder Adafruit_Python_DHT
cd Adafruit_Python_DHT
Install the library
sudo python setup.py install
Following is the Python code for interfacing DHT22, Relay and Fan with Raspberry Pi.
Result:
The fan is switched on whenever the temperature is above the threshold value set in the code.
KIIT POLYTECHNIC
Internet of Things 56 Abhaya Kumar Panda
UINT-8
SOFTWARE DEFINED NETWORKING
Limitations in Current Network
• Vendor-specific architecture of switches limits dynamic configuration according to
application-specific requirements.
• Switches are required to configure according to the installed operating system (OS).
• Centralized control is not feasible in traditional network.
• The exploding volumes of data traffic, complex network architecture, and growing
demands to improve network performance obsoletes the traditional approach to
network management.
Software-Defined Networking (SDN)
Software-Defined Networking (SDN) is an approach to networking that uses software-
based controllers or application programming interfaces (APIs) to communicate with
underlying hardware infrastructure and direct traffic on a network.
Origin of SDN
• 2006: At Stanford university, a team proposes a clean-slate security architecture
(SANE) to control security policies in a centralized manner instead of doing it at
edges.
• 2008: The idea of software-defined network is originated from OpenFlow project
(ACM SIGCOMM 2008).
• 2009: Stanford publishes OpenFlow V1.0.0 specs.
• June 2009: Nicira network is founded.
• March 2011: Open Networking Foundation is formed.
• Oct 2011: First Open Networking Summit. Many Industries (Juniper, Cisco announced
to incorporate.
SDN Architecture
KIIT POLYTECHNIC
Internet of Things 57 Abhaya Kumar Panda
• In traditional networks, the control and data plane are embedded together as a single
unit.
• The control plane is responsible for maintaining the routing table of a switch which
determines the best path to send the network packets and the data plane is responsible
for forwarding the packets based on the instructions given by the control plane.
• Whereas in SDN, the control plane and data plane are separate entities, where the
control plane acts as a central controller for many data planes.
• The data plane consists of network elements, which expose their capabilities to the
control plane via southbound interface.
• The SDN applications are in the application plane and communicate their network
requirements toward the control plane via northbound interface.
• The control plane sits in the middle to translate the applications' requirements and
exerts low-level control over the network elements, Provide network information to
the applications.
Data-plane
• Data sources and sinks
• Traffic forwarding/processing engine which May have the ability to handle some
types of protocol, e.g., ARP
• Provide interfaces communicating to the control plane for Programmatic control of
all functions offered by the network element, Capability advertisement, Event
notification.
Control-plane
• It is placed at Logically centralized.
• Its Core functionalities are Topology and network state information, Device
discovery, Path computation, Security mechanism, Coordination among different
controllers Interfaces to the application plane.
Application-plane
• Applications specify the resources and behaviours required from the network, with the
context of business and policy agreement.
• It may need to orchestra the objectives, (Cloudify, Unify)
• Programming languages help developing applications.
Rule Placement
The SDN controller places rules in three phases upon receiving a new flow at a switch:
(a) In the first phase, the controller determines optimal forwarding path to route the flow from
source to destination;
(b) In the second phase, the controller selects optimal switch in the selected path for exact-
match rule placement in order to get per-flow statistics;
(c) Finally, flow-rule is redistributed among the switches to accommodate new flows in the
network upon detecting rule congestion at a switch
KIIT POLYTECHNIC
Internet of Things 58 Abhaya Kumar Panda
Controller Placement
• In a distributed SDN controller architecture, multiple controllers are deployed to
minimize communication latency between the switch and the control plane.
• The controllers are strategically placed to optimize network performance.
• Controllers define flow-rule according to the application specific requirements.
• The controllers must be able to handle all incoming requests from switches.
• Rule should be placed without incurring much delay.
• Typically, a controller can handle 200 requests in a second (through a single thread).
• The controllers are logically connected to the switches in one hop distance and
physically, they are connected to the switches in multi-hop distance.
• If we have a very small number of controllers for a large network, the network might
be congested with control packets (i.e., PACKET-IN messages).
Security in SDN
• Software-defined network security involves virtualizing security functions from the
traditional hardware they tend to operate on. They enforce virtual network functions,
with data and monitoring accessible through one intuitive interface.
• The latest generation of software-defined security applications make use of
automation to better detect anomalies in network traffic and improve the enforcement
of security policies. This makes it easier to detect suspicious activity more quickly
and respond more efficiently to prevent intrusions and minimize damage in the event
of a breach.
• There is Enhanced security using SDN.
• The Security is implemented using Firewall, Proxy, HTTP, Intrusion detection system
(IDS)
(Example of potential data plane ambiguity to implement the policy chain Firewall-IDS-
Proxy in the example topology.)
KIIT POLYTECHNIC
Internet of Things 59 Abhaya Kumar Panda
In the above example:
1. When an HTTP request comes, it is first forwarded to Firewall 1(FW1).
2. From the firewall 1, it is sent to Instrusion Detection System1(IDS1)
3. From IDS1, it is sent to Proxy1.
4. Finally, it is sent from Proxy1 to outside network.
Integrating SDN in IoT
The SDN-IoT integration brings several significant benefits for IoT traffic:
1. Intelligent traffic routing and better network resources use.
2. Simplified information acquisition facilitating information analysis, decision making
and network configuration actions.
3. Virtualization, whenever required, may be easily achieved and deployed using
common SDN virtualization tools like hypervisors.
4. Visibility of network resources and access management based on user, group, device,
and application.
5. Intelligent algorithms to build effective traffic pattern analysers.
These benefits result in IoT networks with integrated SDN capabilities becoming more agile,
scalable and based on demand.
Difference between SDN and Traditional Network:
S.No. SDN TRADITIONAL NETWORK
01.
Software Defined Network is virtual
networking approach.
Traditional network is the old conventional
networking approach.
02.
Software Defined Network is centralized
control. Traditional Network is distributed control.
03. This network is programmable. This network is non programmable.
04. Software Defined Network is open interface. Traditional network is closed interface.
05.
In Software Defined Network data plane and
control plane are decoupled by software.
In traditional network data plane and control
plane are mounted on same plane.
06.
It supports automatic configuration so it
takes less time.
It supports static/manual configuration so it
takes more time.
07.
It can prioritize and block specific network
packets.
It leads all packets in the same way no
prioritization support.
KIIT POLYTECHNIC
Internet of Things 60 Abhaya Kumar Panda
08. It is easy to program as per need.
It is difficult to program again and to replace
existing program as per use.
09. Cost of Software Defined Network is low. Cost of Traditional Network is high.
10.
Structural complexity is low in Software
Defined Network.
Structural complexity is high in Traditional
Network.
11.
In SDN it is easy to troubleshooting and
reporting as it is centralized controlled.
In Traditional network it is difficult to
troubleshoot and report as it is distributed
controlled.
12.
Its maintenance cost is lower than traditional
network.
Traditional network maintenance cost is higher
than SDN.
KIIT POLYTECHNIC
Internet of Things 61 Abhaya Kumar Panda
UINT-9
SMART HOMES
• A smart home refers to a convenient home setup where appliances and devices can be
automatically controlled remotely from anywhere with an internet connection using a
mobile or other networked device.
• Devices in a smart home are interconnected through the internet, allowing the user to
control functions such as security access to the home, temperature, lighting, and a
home theater remotely.
Smart Home Implementation:
Setting up of a smart home requires the fundamental technology including protocols and all the
hardware and software. Besides, you need smart devices that can be connected to the internet
on the home network. For example, cameras, motion sensors, LED lights, devices with built-
in web servers, etc. These are readily available online or at electronics improvement stores.
Before buying such products, one has to make sure that all devices use the same technology. If
two devices use different technologies, say one uses X10 while other uses Z-Wave, then it
requires a bridging device as well as a lot of technical expertise. It is usually recommended that
one should seek professional help while designing a smart home. Technicians with CEA-Comp
TIA Certification are considered to be more proficient in installing and troubleshooting the
home networking equipment.
The cost of home automation depends on how smart the home is. The users can either keep it
basic with jut intelligent lighting or add high-tech security systems. One has to decide where
to place the nodes to have an effective routing range and plan the as it may require renovation
or rebuilding of certain portions of the house.
Home Area Network (HAN)
• Home Area Network (HAN) is a network in a user’s home where all the laptops,
computers, smartphones, and other smart appliances and digital devices are connected
into a network.
• This facilitates communication among the digital devices within a home which are
connected to the Home network.
• Home Area Network may be wired or wireless. Mostly wireless network is used for
HAN.
• Example –
Think about a home where computers, printers, game systems and tablets, smartphones,
other smart appliances are connected to each other through wired or wireless over a
network is an example of Home Area Network.
KIIT POLYTECHNIC
Internet of Things 62 Abhaya Kumar Panda
Infrastructure of HAN:
• A modem is used which is provided by an ISP to expose Ethernet to WAN. In homes
they come in DSL modem or cable modem.
• A router is used to manage connection between Home Area Network (HAN)
and Wide Area Network (WAN).
• A wireless access point is used for connecting wireless digital devices to the network.
• Smart Devices/ Digital Devices are used to connect to the Home Area Network.
Smart Home benefits
1. Managing all of your home devices from one place.
2. Flexibility for new devices and appliances.
3. Maximizing home security.
4. Remote control of home functions.
5. Increased energy efficiency.
6. Improved appliance functionality. when entertaining guests.
7. Home management insights.
8. Customize as Per our Convenience.
9. Higher quality of life.
KIIT POLYTECHNIC
Internet of Things 63 Abhaya Kumar Panda
10. Notifications in case of trouble.
11. Cost savings in the long run.
12. Smart homes may be suitable for disabled and old persons.
Smart Home issues
1. Significant installation costs.
2. Reliable internet connection is crucial.
3. Technological problems in connected homes.
4. Maintenance and repair issues.
5. Compatibility problems between devices.
6. Technology may become outdated soon.
7. Power Outage May hamper the System operations.
KIIT POLYTECHNIC
Internet of Things 64 Abhaya Kumar Panda
UNIT-10
SMART CITIES
• A smart city is an urban system which uses information & communication technology
(ict) to make infrastructure more interactive, accessible and efficient.
• Need for Smart Cities arose due to
o Rapidly growing urban population.
o Fast depleting natural resources.
o Changes in environment and climate.
Characteristics of Smart Cities
It has been suggested that a smart city (also community, business cluster, urban
agglomeration or region) uses information technologies to:
1. Make more efficient use of physical infrastructure (roads, built environment and other
physical assets) through artificial intelligence and data analytics in order to support a
strong and healthy economic, social, cultural development.
2. Engage effectively with local governance officials by use of open
innovation processes and e-participation, improving the collective intelligence of the
city's institutions through e-governance, with emphasis placed on citizen participation
and co-design.
3. Learn, adapt and innovate and thereby respond more effectively and promptly to
changing circumstances by improving the intelligence of the city.
Smart city Frameworks
The creation, integration, and adoption of smart city capabilities require a unique set of
frameworks to realize the focus areas of opportunity and innovation central to smart city
projects. The frameworks can be divided into 5 main dimensions which include numerous
related categories of smart city development
1.Technology framework
A smart city relies heavily on the deployment of technology. Different combinations of
technological infrastructure interact to form the array of smart city technologies with varying
levels of interaction between human and technological systems.
Digital: A service-oriented infrastructure is required to connect individuals and devices in a
smart city. These include innovation services and communication infrastructure.
Intelligent: Cognitive technologies, such as artificial intelligence and machine learning, can
be trained on the data generated by connected city devices to identify patterns. The efficacy
and impact of particular policy decisions can be quantified by cognitive systems studying the
continuous interactions of humans with their urban surroundings.
KIIT POLYTECHNIC
Internet of Things 65 Abhaya Kumar Panda
Ubiquitous: A ubiquitous city provides access to public services through any connected
device. U-city is an extension of the digital city concept because of the facility in terms of
accessibility to every infrastructure.
Wired: The physical components of IT systems are crucial to early-stage smart city
development. Wired infrastructure is required to support the IoT and wireless technologies
central to more interconnected living. A wired city environment provides general access to
continually updated digital and physical infrastructure. The latest in
telecommunications, robotics, IoT, and various connected technologies can then be deployed
to support human capital and productivity.
Hybrid: A hybrid city is the combination of a physical conurbation and a virtual city related
to the physical space. This relationship can be one of virtual design or the presence of a
critical mass of virtual community participants in a physical urban space. Hybrid spaces can
serve to actualize future-state projects for smart city services and integration.
Information city: The multiplicity of interactive devices in a smart city generates a large
quantity of data. How that information is interpreted and stored is critical to Smart city
growth and security.
2. Human framework
Smart city initiatives have measurable positive impacts on the quality of life of its citizens
and visitors. The human framework of a smart city – its economy, knowledge networks, and
human support systems is an important indicator of its success.
Creativity: Arts and culture initiatives are common focus areas in smart city planning.
Innovation is associated with intellectual curiosity and creativeness, and various projects have
demonstrated that knowledge workers participate in a diverse mix of cultural and artistic
activities.
Learning: Since mobility is a key area of Smart city development, building a capable
workforce through education initiatives is necessary. A city's learning capacity includes its
education system, including available workforce training and support, and its cultural
development and exchange.
Humanity: Numerous Smart city programs focus on soft infrastructure development, like
increasing access to voluntary organizations and designated safe zones. This focus on social
and relational capital means diversity, inclusion, and ubiquitous access to public services is
worked in to city planning.
Knowledge: The development of a knowledge economy is central to Smart city
projects. Smart cities seeking to be hubs of economic activity in emerging tech and service
sectors stress the value of innovation in city development.
3.Institutional framework
The smart community’s movement took shape as a strategy to broaden the base of users
involved in IT. Members of these Communities are people that share their interest and work
in a partnership with government and other institutional organizations to push the use of IT to
improve the quality of daily life as a consequence of different worsening in daily actions.
KIIT POLYTECHNIC
Internet of Things 66 Abhaya Kumar Panda
4.Energy framework
The city has a smarter energy infrastructure. Employment of smart technologies enables the
more efficient application of integrated energy technologies in the city allowing the
development of more self-sustaining areas or even Positive Energy Districts that produce
more energy than consume.
A smart city is powered by "smart connections" for various items such as street
lighting, smart buildings, distributed energy resources (DER), data analytics, and smart
transportation.
5.Data Management framework
Smart cities employ a combination of data collection, processing, and disseminating
technologies in conjunction with networking and computing technologies and data security
and privacy measures encouraging the application of innovation to promote the overall
quality of life for its citizens and covering dimensions that include: utilities, health,
transportation, entertainment and government services.
Challenges in Smart cities
The Chere are several challenges that exist in the implementation of smart cities. The
development of smart City confronts several challenges from the technological perspective.
Security and privacy: Preserving privacy of citizens and end users is a big concern Since
most of most of the frameworks require collecting data from the citizens. The data collected
can be exposed to attacks, vulnerabilities and multi-tenancy which include the risk of data
leakage.
Heterogeneity: lt involves the integration of varying hardware platforms and specifications.
Various radio specifications and software platforms need to be integrated. Accommodating
vary1ng user requirements is another challenging task in smart city.
Reliability: There can be unreliable communication in smart cities due to vehicle mobility.
Delivery failures are still significant in smart cities. There can be delay in receiving data due
to mobility of deployed nodes. Distribution of devices can affect monitoring tasks also. Legal
and social aspects: The legal aspects of smart cities include services based on user provided
information which is subject to local or international laws. Social issue is that individual and
informed consent is required for using humans as data sources.
Big data: Challenges related to Big data include storage, management, fusion, consistency
trustworthiness and 3V's (Volume, Velocity and Variety). In a smart city context, this
becomes more significant. Transfer, storage and maintenance of huge volumes of data are
expensive Data cleaning and purification of data is time consuming. Analytics on gigantic
data volume is process intensive. On-device and embedded intelligence to support light-
weight artificial intelligence on loT and resource-constrained devices that build the smart city
infrastructure is yet another challenge.
Sensor networks: Choice of appropriate sensors for individual sensing tasks and energy
planning is crucial. Device placement and network architecture is important for reliable e to-
end IoT implementation. Communication medium and means play an important role seamless
function of IoT in smart cities.
KIIT POLYTECHNIC
Internet of Things 67 Abhaya Kumar Panda
Data Fusion
• Enormous volume of data is produced periodically in a smart city environment.
• Challenges include making the available/ incoming large data volume precise and
accurate.
• Quality of data precision and accuracy affects the quality of decision making in IoT-
enabled smart cities.
• Data fusion enables optimum utilization of massive data gathered from multiple
sources, and across multiple platforms.
Multi-sensor Data Fusion
• Combines information from multiple sensor sources.
• Enhances the ability of decision-making systems to include a
• multitude of variables prior to arriving at a decision.
• Inferences drawn from multiple sensor type data is qualitatively superior to single
sensor type data.
• Information fusion generated from multiple heterogeneous sensors provides for better
understanding of the operational surroundings.
Challenges in Data Fusion
Data Fusion Opportunities in IoT
• Collective data is rich in information and generates better intelligence compared to data
from single sources.
• Optimal amalgamation of data.
• Enhancing the collective information content obtained from multiple low-power, low-
precision sensors.
• Enables hiding of critical data sources and semantics (useful in military applications,
medical cases, etc.).
Imperfection Inaccurate or uncertain WSN sensor data
Ambiguity Outliers, missing data
Conflicts Same sensor type reports different data for the same location.
Alignment
Arises when sensor data frames are converted to a singular frame prior to transmission
Trivial features Processing of trivial data features may bring down the accuracy of the whole system
KIIT POLYTECHNIC
Internet of Things 68 Abhaya Kumar Panda
Smart Parking
Smart Parking is a parking strategy that combines technology and human innovation in an
effort to use as few resources as possible such as fuel, time and space to achieve faster, easier
and denser parking of vehicles for the majority of time they remain idle.
Benefits of Smart Parking:
• Shortens parking search time of drivers.
• Reduces traffic congestion.
• Reduces pollution by keeping unnecessarily lingering vehicles off the roads.
• Reduces fuel consumption and costs.
• Increases urban mobility.
• Shorter parking search time results in more parked time, and hence, more revenue.
How does a smart parking system work?
A smart parking system is an effective solution developed against the problem of on- and off-
street parking. For understanding how a smart parking system works, it is essential to
comprehend the information about the various elements that contribute to the development of
an intelligent parking system.
Sensors: Sensors are embedded within the roads and grounds to provide the parking
operators knowledge about consumer behaviour and whether or not a suitable parking slot is
available.
Cameras: Cameras attached to the high point views near the parking lot allow the operators
to perceive the dimension and movement of the vehicle.
Parking meters: Parking meter is an intermediate between the operator and the user. It
provides authorization and payment information to the operator.
Central Server: As the name suggests, a central server is responsible for communicating
with sensors, cameras and mobile applications.
Parking Management software: Typically associated with interaction with stakeholders as
it provides them with real-time information pertaining to the parking process.
IoT based Smart Parking Mobile Apps: With regard to the process, a mobile app
contributes to the processing of transactions. All-in-all, mobile apps are responsible for
allowing the user to identify the spaces on the streets and slots available in the garages.
Now that we're aware of the things working in the background, you must know how smart
parking system works:
Input: Sensors, cameras and parking meters collect and transfer the information about the
vehicle and the surroundings to the parking operators.
Processing: Once, the information about the parking slot and consumer's vehicle is received,
the central server securely stores this information and informs the stakeholders about the
granting of the slot.
KIIT POLYTECHNIC
Internet of Things 69 Abhaya Kumar Panda
Output: The underlying software or application processes the data received from the
aforementioned devices and reserves a parking spot for the consumer. If the consumer has
previously booked the parking space, the software guides the driver to the same.
Energy Management in Smart Cities
• Energy Management in Smart Cities involve Energy efficient solutions like
Lightweight protocols, Scheduling optimization, Predictive models for energy
consumption, Cloud-based approach, Low-power transceivers and Cognitive
management framework
• Energy harvesting solutions include Ambient energy harvesting, RF sources, Wind,
Sun, Heat and Vibration.
• In Dedicated energy harvesting, Energy sources intentionally deployed near IoT
sources.
• Amount of energy harvested depends on Sensitivity of the harvesting circuit, Distance
between the device and source and Environment.
KIIT POLYTECHNIC
Internet of Things 70 Abhaya Kumar Panda
UNIT-11
Industrial IoT
The industrial internet of things (IIoT) refers to the extension and use of the internet of
things (IoT) in industrial sectors and applications with a strong focus on machine-to-machine
(M2M) communication, big data, and machine learning, the IIoT enables industries and
enterprises to have better efficiency and reliability in their operations.
IIoT requirements
• IoT end requirement is the consumer convenience and IIoT end requirement is the
return on investment.
• IoT focuses on managing home appliances which increase consumer convenience by
saving resources such as electricity.
• IIoT focuses on critical systems such as health care, aerospace, factory machinery
automation and connecting machines and people together along with data analytics.
• IIoT wants the uptime to be higher and downtime of business operations to be lesser.
Design considerations
To use an IoT device for industrial applications, the following design objectives are to be
considered
• Energy: Time for which the IoT device can operate with limited power supply.
• Latency: Time required to transmit the data.
• Throughput: Maximum data transmitted across the network.
• Scalability: Number of devices supported.
• Topology: Communication among the devices, i.e., interoperability.
• Safety and Security: Degree of safety and security of the application.
Applications of IIoT
The key application areas of IIoT are:
1. Manufacturing industry:
The devices, equipment, workforce, supply chain, work platform are integrated and
connected to achieve smart production. This will lead to –
• reduction in operational costs
• improvement in the productivity of the worker
• reduction in the injuries at the workplace
• resource optimization and waste reduction
• end‐to‐end automation.
KIIT POLYTECHNIC
Internet of Things 71 Abhaya Kumar Panda
2. Healthcare Service industry:
Patients can be continuously monitored due to the implanted on‐body sensors. This
has led to –
• improved treatment outcome
• costs has reduced
• improved disease detection
• improved accuracy in the collection of data
• improved drugs management.
3. Transportation & logistics:
To improve safety, efficiency of transportation, Intelligent Transportation system (ITS) is
developed which consists of connected vehicles. ITS provides –
a. Vehicle – to – sensor connectivity
b. Vehicle – to – vehicle connectivity
c. Vehicle – to – internet connectivity
d. Vehicle – to – road infrastructure
• In IIoT scenario the physical objects are provided with
o bar codes
o RFID tags
o hence, real‐time monitoring of the status and location of the physical objects
from destination to the origin, across the supply chain is possible.
• Security and privacy of the data should be maintained.
4. Mining:
To prevent accidents inside the mines ‐ RFID, Wi‐Fi and other wireless technologies
are used, which
• provides early warning of any disaster
• monitors air‐quality
• detects the presence of poisonous gases inside the mines
• oxygen level inside the mines.
5. Firefighting:
Sensor networks, RFID tags are used to perform
• automatic diagnosis
• early warning of disaster
• emergency rescue
• provides real‐time monitoring Hence, improves public security.
KIIT POLYTECHNIC
Internet of Things 72 Abhaya Kumar Panda
Benefits of IIoT
By harnessing IoT and advanced analytics technologies, manufacturers can:
• Increase productivity and uptime.
• Improve process efficiencies.
• Accelerate innovation.
• Reduce asset downtime.
• Enhance operational efficiency.
• Create end-to-end operational visibility.
• Improve product quality.
• Reduce operating costs.
• Optimize production scheduling.
• Improve overall equipment effectiveness (OEE).
Challenges of IIoT
• The primary challenges in IloT include identification of objects or amount things,
manage huge of data, integrate existing infrastructures into new IloT infrastructure
and data enabling storage.
• There are several safety challenges which include worker health and satety, regulatory
compliance, environmental protection and optimized operations.
• Challenges related to hazards include handling, storing or using hazardous substances,
oxygen deficiency, radiation and physiological stress.
• The problems related to standardization are interoperability, semantic interoperability,
security and privacy and radio access level issues.
• Other important concerns related with IloT are information security and data privacy
protection. The devices or things can be tracked, monitored and connected. So there
are chances of attack on the personal and private data.
• Though lloT provides new opportunities, new factors may cause hindrance in the path
to success such as lack of vision and leadership, lack of understanding of values
among management employees, costly sensors and inadequate infrastructure.
KIIT POLYTECHNIC
Internet of Things 73 Abhaya Kumar Panda
Difference between IIOT and IOT:
IIOT IOT
It focuses on industrial applications such as
manufacturing, power plants, oil & gas, etc.
It focuses on general applications ranging
from wearables to robots & machines.
It uses critical equipment & devices connected over a
network which will cause a life-threatening or other
emergency situation on failure therefore uses more
sensitive and precise sensors.
Its implementation starts with small scale
level so there is no need to worry about
life-threatening situations.
It deals with large scale networks. It deals with small scale networks.
It can be programmed remotely i.e., offers remote on-
site programming. It offers easy off-site programming.
It handles data ranging from medium to high. It handles very high volume of data.
It requires robust security to protect the data. It requires identity and privacy.
It needs stringent requirements. It needs moderate requirements.
It having very long-life cycle. It having short product life cycle.
It has high- reliability. It is less reliable.
KIIT POLYTECHNIC
Internet of Things 74 Abhaya Kumar Panda
References:
1.” Internet of Things” by Jeeva Jose
2.” Internet of Things - A Hands-On Approach” By Arshdeep Bagha & Vijay Madisethi
3.” Internet of Things” By Dr. Rajiv Chopra
4. “21 Internet Of Things (IOT) experiments” by Yashavant Kanetkar, Shrirang Korde
5. “Internet of Things (IoT)” by Dr Kamlesh Lakhwani , Dr Hemant Kumar Gianey , Joseph
Kofi Wireko , Kamal Kant Hiran
6. https://www.geeksforgeeks.org
7. https://nptel.ac.in
8. https://en.wikipedia.org
9. https://www.w3schools.com

More Related Content

PPTX
Introduction to Internet of Things
PDF
Internet of Things -Overview
PPTX
Internet of Things Basics and its protocols
PPTX
IOT LADEN GHISING.pptx
PDF
IoT - Unit 2 (Internet of Things-Concepts) - PPT.pdf
PDF
7CS4_IOT_Unit-1.pdf
PDF
IOT COMPLETE NOTES.pdf jhdflhagflkajshfagslgfahflasgshlah
PDF
IOT COMPLETE NOTES.pdf Internet of Things
Introduction to Internet of Things
Internet of Things -Overview
Internet of Things Basics and its protocols
IOT LADEN GHISING.pptx
IoT - Unit 2 (Internet of Things-Concepts) - PPT.pdf
7CS4_IOT_Unit-1.pdf
IOT COMPLETE NOTES.pdf jhdflhagflkajshfagslgfahflasgshlah
IOT COMPLETE NOTES.pdf Internet of Things

Similar to very useful document who use internet as a references to download (20)

PDF
DS-University-IOT COMPLETE NOTES.pdf FOR CIVIL
PDF
OCS352 IOT CONCEPTS AND APPLICATION 5 NOTES.pdf
PDF
OCS352 IOT All application specific and others
PDF
Lecture No. One -chapter 1 Introduction.pdf
PPTX
Module 1 Internet of Things (2).ppt.pdf on iot
PDF
IOT Notes Unit 1.pdf Internet of Things
PDF
iot module 1 ppt (3).pdf
PPTX
iot module 1 ppt.pptx
PPTX
IOT- UNIT-1.pptx
PDF
The Internet of Things (IoT): An Overview
PPTX
IOT(Internet of Things) Seminar
PPTX
Introduction to IoT (Basics of Networking & Emergence of IoT).pptx
PPTX
Introduction to Internet of Things (IoT)
DOC
Chapter-1.doc
PPTX
IOT Introduction.pptx
DOCX
IoT Smart keychain finder project
PPTX
IOT_UNIT-1_Presentation which is basic presentation level
PPTX
Internet of Things
PPTX
IoT_Unit-1.pptx
PPTX
Iot architecture
DS-University-IOT COMPLETE NOTES.pdf FOR CIVIL
OCS352 IOT CONCEPTS AND APPLICATION 5 NOTES.pdf
OCS352 IOT All application specific and others
Lecture No. One -chapter 1 Introduction.pdf
Module 1 Internet of Things (2).ppt.pdf on iot
IOT Notes Unit 1.pdf Internet of Things
iot module 1 ppt (3).pdf
iot module 1 ppt.pptx
IOT- UNIT-1.pptx
The Internet of Things (IoT): An Overview
IOT(Internet of Things) Seminar
Introduction to IoT (Basics of Networking & Emergence of IoT).pptx
Introduction to Internet of Things (IoT)
Chapter-1.doc
IOT Introduction.pptx
IoT Smart keychain finder project
IOT_UNIT-1_Presentation which is basic presentation level
Internet of Things
IoT_Unit-1.pptx
Iot architecture
Ad

Recently uploaded (20)

PPTX
Digital Literacy And Online Safety on internet
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
innovation process that make everything different.pptx
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
artificial intelligence overview of it and more
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
Sims 4 Historia para lo sims 4 para jugar
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PDF
Testing WebRTC applications at scale.pdf
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
Introduction to Information and Communication Technology
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
DOCX
Unit-3 cyber security network security of internet system
Digital Literacy And Online Safety on internet
Design_with_Watersergyerge45hrbgre4top (1).ppt
presentation_pfe-universite-molay-seltan.pptx
Introuction about ICD -10 and ICD-11 PPT.pptx
innovation process that make everything different.pptx
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PptxGenJS_Demo_Chart_20250317130215833.pptx
artificial intelligence overview of it and more
Job_Card_System_Styled_lorem_ipsum_.pptx
Sims 4 Historia para lo sims 4 para jugar
An introduction to the IFRS (ISSB) Stndards.pdf
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Cloud-Scale Log Monitoring _ Datadog.pdf
Testing WebRTC applications at scale.pdf
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Introduction to Information and Communication Technology
Slides PDF The World Game (s) Eco Economic Epochs.pdf
Tenda Login Guide: Access Your Router in 5 Easy Steps
Unit-3 cyber security network security of internet system
Ad

very useful document who use internet as a references to download

  • 1. LECTURE NOTES ON INTERNET OF THINGS Compiled by Mr. Abhaya Kumar Panda Lecturer, Department of Computer Science & Engineering, KIIT Polytechnic, Bhubaneswar KIIT POLYTECHNIC
  • 2. KIIT POLYTECHNIC Internet of Things Abhaya Kumar Panda CONTENTS S.NO CHAPTER NAME PAGE NO 1 Introduction to Internet of Things 1-9 2 IoT Networking 10-21 3 Connectivity Technologies 22-31 4 Wireless Sensor Networks 32-38 5 M2M Communication 39-43 6 Programming with Arduino 44-49 7 Programming with Raspberry Pi 50-55 8 Software defined Networking 56-60 9 Smart Homes 61-63 10 Smart Cities 64-69 11 Industrial IoT 79-73
  • 3. KIIT POLYTECHNIC Internet of Things 1 Abhaya Kumar Panda UNIT-1 Introduction to Internet of Things Internet of things (IoT) The Internet of things (IoT) is the inter-networking of physical devices, vehicles (also referred to as “connected devices” and “smart devices”), buildings, and other items embedded with electronics, software, sensors, actuators, and network connectivity which enable these objects to collect and exchange data. Characteristics: Things-related services: The IoT is capable of providing thing-related services within the constraints of things, such as privacy protection and semantic consistency between physical things and their associated virtual things Connectivity: Things in I.O.T. should be connected to the infrastructure, without connection nothing makes sense. Intelligence: Extraction of knowledge from the generated data is important, sensor generate data and this data and this data should be interpreted properly. Scalability: The no. of things getting connected to the I.O.T. infrastructure is increased day by day. Hence, an IOT setup shall be able to handle the massive expansion. Unique Identity: Each IOT device has an I.P. address. This identity is helpful in tracking the equipment and at times to query its status. Dynamic and Self-Adapting: The IOT device must dynamically adopt itself to the changing context. Assume a camera meant for surveillance, it may have to work in different conditions and at different light situations (morning, afternoon, night). Heterogeneity: The devices in the IoT are heterogeneous as based on different hardware platforms and networks. They can interact with other devices different networks. Safety: Having got all the things connected with the Internet possess a major threat, as our personal data is also there and it can be tampered with, if proper safety measures are not taken. Application areas of IoT: Smart Home: The smart home is one of the most popular applications of IoT. The cost of owning a house is the biggest expense in a homeowner’s life. Smart homes are promised to save the time, money and energy. Smart cities: The smart city is another powerful application of IoT. It includes smart surveillance, environment monitoring, automated transformation, urban security, smart traffic management, water distribution, smart healthcare etc. Wearables: Wearables are devices that have sensors and software installed which can collect data about the user which can be later used to get the insights about the user. They must be energy efficient and small sized.
  • 4. KIIT POLYTECHNIC Internet of Things 2 Abhaya Kumar Panda Connected cars: A connected car is able to optimize its own operation, maintenance as well as passenger’s comfort using sensors and internet connectivity. Smart retail: Retailers can enhance the in-store experience of the customers using IoT. The shopkeeper can also know which items are frequently bought together using IoT devices. Smart healthcare: People can wear the IoT devices which will collect data about user's health. This will help users to analyze themselves and follow tailor-made techniques to combat illness. The doctor also doesn't have to visit the patients in order to treat them. IoT Categories IOT can be classified into two categories: 1. Consumer IoT(CIOT): The Consumer IoT refers to the billions of physical personal devices, such as smartphones, wearables, fashion items and the growing number of smart home appliances, that are now connected to the internet, collecting and sharing data. A Consumer IoT network typically entails few consumer devices, each of which has a limited lifetime of several years. The common connectivity used in this kind of solutions are Bluetooth, WiFi, and ZigBee. These technologies offer short-range communication, suitable for applications deployed in limited spaces such as houses, or small offices. 2. industrial internet of things (IIoT): It refers to interconnected sensors, instruments, and other devices networked together with computers' industrial applications, including manufacturing and energy management. This connectivity allows for data collection, exchange, and analysis, potentially facilitating improvements in productivity and efficiency as well as another economic ben. BASELINE TECHNOLOGIES There are various baseline technologies that are very closely related to IOT, They include: Machine-to-Machine (M2M), Cyber-Physical Systems (CPS), Web Of Things (WOT) a) Machine-to-Machine (M2M): • Machine-to-Machine (M2M) refers to networking of machines (or devices) for the purpose of remote monitoring and control and data exchange. • An M2M area network comprises of machines (or M2M nodes) which have embedded network modules for sensing, actuation and communicating various communication protocols can be used for M2M LAN such as ZigBee, Bluetooth, M- bus, Wireless M-Bus etc., These protocols provide connectivity between M2M nodes within an M2M area network. • The communication network provides connectivity to remote M2M area networks. The communication network provides connectivity to remote M2M area network. • The communication network can use either wired or wireless network (IP based). While the M2M are networks use either proprietary or non-IP based communication protocols, the communication network uses IP-based network. Since non-IP based
  • 5. KIIT POLYTECHNIC Internet of Things 3 Abhaya Kumar Panda protocols are used within M2M area network, the M2M nodes within one network cannot communicate with nodes in an external network. • To enable the communication between remote M2M are network, M2M gateways are used b) Cyber-Physical systems: Cyber-Physical Systems (CPS) are integrations of computation, networking, and physical processes. Embedded computers and networks monitor and control the physical processes, with feedback loops where physical processes affect computations and vice versa. In cyber-physical systems, physical and software components are deeply intertwined, able to operate on different spatial and temporal scales, exhibit multiple and distinct behavioural modalities, and interact with each other in ways that change with context. c) Web of Things: web of things is a term used to describe approaches, software architectural style of programming patterns that allow real world objects to be part of WWW. The major portion of the WoT specification is the Thing Description. Thing is an abstract representation of a physical or virtual entity. A Thing Description includes the metadata and interfaces of a Thing in a standardized way, with the aim to make the Thing able to communicate with other Things in a heterogeneous world. SENSOR Sensor is a device used for the conversion of physical events or characteristics into the electrical signals. This is a hardware device that takes the input from environment and gives to the system by converting it. For example, a thermometer takes the temperature as physical characteristic and then converts it into electrical signals for the system. Characteristics of Sensors 1. Range: It is the minimum and maximum value of physical variable that the sensor can sense or measure. For example, a Resistance Temperature Detector (RTD) for the measurement of temperature has a range of -200 to 800o C. 2. Span: It is the difference between the maximum and minimum values of input. In above example, the span of RTD is 800 – (-200) = 1000o C. 3. Accuracy: The error in measurement is specified in terms of accuracy. It is defined as the difference between measured value and true value. It is defined in terms of % of full scale or % of reading. 4. Precision: It is defined as the closeness among a set of values. It is different from accuracy.
  • 6. KIIT POLYTECHNIC Internet of Things 4 Abhaya Kumar Panda 5.Linearity: Linearity is the maximum deviation between the measured values of a sensor from ideal curve. 6.Hysteresis: It is the difference in output when input is varied in two ways- increasing and decreasing. 7. Resolution: It is the minimum change in input that can be sensed by the sensor. 8. Reproducibility: It is defined as the ability of sensor to produce the same output when same input is applied. 9. Repeatability: It is defined as the ability of sensor to produce the same output every time when the same input is applied and all the physical and measurement conditions kept the same including the operator, instrument, ambient conditions etc. 10. Response Time: It is generally expressed as the time at which the output reaches a certain percentage (for instance, 95%) of its final value, in response to a step change of the input. Classification of sensors: Sensors based on the power requirement sensor is classified into two types: Active Sensors, Passive Sensors. Active Sensors: Does not need any external energy source but directly generates an electric signal in response to the external. Example: Thermocouple, Photodiode, Piezoelectric sensor. Passive Sensors: The sensors require external power called excitation signal. Sensors modify the excitation signal to provide output. Example: Strain gauge. Sensors based on output sensor is classified into two types: Analog Sensors, Digital Sensors. Analog Sensors • Analog Sensors produces a continuous output signal or voltage which is generally proportional to the quantity being measured. • Physical quantities such as Temperature, speed, Pressure, Displacement, Strain etc. are all analog quantities as they tend to be continuous in nature. • For example, the temperature of a liquid can be measured using a thermometer or thermocouple (e.g. in geysers) which continuously responds to temperature changes as the liquid is heated up or cooled down. Digital Sensors • Digital Sensors produce discrete output voltages that are a digital representation of the quantity being measured. • Digital sensors produce a binary output signal in the form of a logic "1" or a logic "0" , ("ON" or "OFF).
  • 7. KIIT POLYTECHNIC Internet of Things 5 Abhaya Kumar Panda • Digital signal only produces discrete (non-continuous) values, which may be output as a signal "bit" (serial transmission), or by combing the bits to produce a signal "byte" output (parallel transmission). Based on type of data measured sensor is classified into two types: Scalar Sensors and Vector Sensors. Scalar Sensors • Scalar Sensors produce output signal or voltage which generally proportional to the magnitude of the quantity being measured. • Physical quantities such as temperature, color, pressure, strain, etc. are all scalar quantities as only their magnitude is sufficient to convey an information. • For example, the temperature of a room can be measured using thermometer or thermocouple, which responds to temperature changes irrespective of the orientation of the sensor or its direction. Vector Sensors • Vector Sensors produce output signal or voltage which generally proportional to the magnitude, direction, as well as the orientation of the quantity being measured. • Physical quantities such as sound, image, velocity, acceleration, orientation, etc. are all vector quantities, as only their magnitude is not sufficient to convey the complete information. • For example, the acceleration of a body can be measured using an accelerometer, which gives the components of acceleration of the body with respect to the x,y,z coordinate axes. ACTUATOR Actuator is a device that converts the electrical signals into the physical events or characteristics. It takes the input from the system and gives output to the environment. For example, motors and heaters are some of the commonly used actuators. Types of Actuators 1. Hydraulic Actuators: Hydraulic actuators operate by the use of a fluid-filled cylinder with a piston suspended at the centre. Commonly, hydraulic actuators produce linear movements, and a spring is attached to one end as a part of the return motion. These actuators are widely seen in exercise equipment such as steppers or car transport carriers. 2. Pneumatic Actuators: Pneumatic actuators are one of the most reliable options for machine motion. They use pressurized gases to create mechanical movement. Many companies prefer pneumatic-powered actuators because they can make very precise motions, especially when starting and stopping a machine. Examples of equipment that uses pneumatic actuators include: Bus brakes, Exercise machines, Vane motors, Pressure sensors 3.Electric Actuators: Electrical actuators, as you may have guessed, require electricity to work. Well-known examples include electric cars, manufacturing machinery, and robotics
  • 8. KIIT POLYTECHNIC Internet of Things 6 Abhaya Kumar Panda equipment. Similar to pneumatic actuators, they also create precise motion as the flow of electrical power is constant. 4.Thermal and Magnetic Actuators: Thermal and magnetic actuators usually consist of shape memory alloys that can be heated to produce movement. The motion of thermal or magnetic actuators often comes from the Joule effect, but it can also occur when a coil is placed in a static magnetic field. The magnetic field causes constant motion called the Laplace-Lorentz force. Most thermal and magnetic actuators can produce a wide and powerful range of motion while remaining lightweight. 5.Mechanical Actuators: Some actuators are mostly mechanical, such as pulleys or rack and pinion systems. Another mechanical force is applied, such as pulling or pushing, and the actuator will leverage that single movement to produce the desired results. For instance, turning a single gear on a set of rack and pinions can mobilize an object from point A to point B. The tugging movement applied on the pulley can bring the other side upwards or towards the desired location. 6. Soft Actuators: Soft actuators (e.g., polymer based) are designed to handle fragile objects like fruit harvesting in agriculture or manipulating the internal organs in biomedicine. They typically address challenging tasks in robotics. Soft actuators produce flexible motion due to the integration of microscopic changes at the molecular level into a macroscopic deformation of the actuator materials. IOT COMPONENTS Four fundamental components of IoT system, which tells us how IoT works. i. Sensors/Devices First, sensors or devices help in collecting very minute data from the surrounding environment. All of this collected data can have various degrees of complexities ranging from a simple temperature monitoring sensor or a complex full video feed. A device can have multiple sensors that can bundle together to do more than just sense things. For example, our phone is a device that has multiple sensors such as GPS, accelerometer, camera but our phone does not simply sense things. ii. Connectivity Next, that collected data is sent to a cloud infrastructure but it needs a medium for transport. The sensors can be connected to the cloud through various mediums of communication and transports such as cellular networks, satellite networks, Wi-Fi, Bluetooth, wide-area networks (WAN), low power wide area network and many more.
  • 9. KIIT POLYTECHNIC Internet of Things 7 Abhaya Kumar Panda iii. Data Processing Once the data is collected and it gets to the cloud, the software performs processing on the acquired data. This can range from something very simple, such as checking that the temperature reading on devices such as AC or heaters is within an acceptable range. It can sometimes also be very complex, such as identifying objects (such as intruders in your house) using computer vision on video. iv. User Interface Next, the information made available to the end-user in some way. This can achieve by triggering alarms on their phones or notifying through texts or emails. Also, a user sometimes might also have an interface through which they can actively check in on their IOT system. For example, a user has a camera installed in his house, he might want to check the video recordings and all the feeds through a web server. Service Oriented Architecture of IoT SOA can also use to support IoT as a main contributing technology in devices or heterogeneous systems.
  • 10. KIIT POLYTECHNIC Internet of Things 8 Abhaya Kumar Panda 1.Sensing Layer: IoT can be defined as a worldwide interconnected network, where things or devises are controlled remotely. Interconnected things or devices are become easier, as more and more things are furnished with sensors and RFID technologies. 2.Networking Layer: Networking Layer is responsible to connect all device or things together so that they can able to share the information with each other over the Internet. Moreover, network layer also collects data and information from the present IT infrastructure for example ICT systems, power grids, business systems, healthcare systems, and transportation systems. 3. Service Layer: This layer depends upon the technology used on the middleware layer which is responsible for functionalities incorporate between applications and services in IoT. This middleware technology also provides a cost-effective and efficient platform for IoT and this platform including software and hardware components which can be reused when needed.
  • 11. KIIT POLYTECHNIC Internet of Things 9 Abhaya Kumar Panda 4. Interface Layer: The core responsibility of the interface layer has also simplified the interconnection and management of things. Interface specific profile can be defined as the subset of services that support interaction with the application used in a network Challenges for IoT 1. Security: Security is the most significant challenge for the IoT. Increasing the number of connected devices increases the opportunity to exploit security vulnerabilities, as do poorly designed devices, which can expose user data to theft by leaving data streams inadequately protected and in some cases people’s health and safety can be put at risk. 2. Privacy: The IoT creates unique challenges to privacy, many that go beyond the data privacy issues that currently exist. Much of this stems from integrating devices into our environments without us consciously using them. This is becoming more prevalent in consumer devices, such as tracking devices for phones and cars as well as smart televisions. 3. Scalability: Billions of internet-enabled devices get connected in a huge network, large volumes of data are needed to be processed. The system that stores, analyses the data from these IoT devices needs to be scalable. 4. Interoperability: Technological standards in most areas are still fragmented. These technologies need to be converged. Which would help us in establishing a common framework and the standard for the IoT devices. As the standardization process is still lacking, interoperability of IoT with legacy devices should be considered critical. This lack of interoperability is preventing us to move towards the vision of truly connected everyday interoperable smart objects. 5. Bandwidth: Connectivity is a bigger challenge to the IoT than you might expect. As the size of the IoT market grows exponentially, some experts are concerned that bandwidth- intensive IoT applications such as video streaming will soon struggle for space on the IoT’s current server-client model. 6. Standards: Lack of standards and documented best practices have a greater impact than just limiting the potential of IoT devices. Without standards to guide manufacturers, developers sometimes design products that operate in disruptive ways on the Internet without much regard to their impact. If poorly designed and configured, such devices can have negative consequences for the networking resources they connect to and the broader Internet. 7. Regulation: The lack of strong IoT regulations is a big part of why the IoT remains a severe security risk, and the problem is likely to get worse as the potential attack surface expands to include ever more crucial devices. When medical devices, cars and children’s toys are all connected to the Internet, it’s not hard to imagine many potential disaster scenarios unfolding in the absence of sufficient regulation
  • 12. KIIT POLYTECHNIC Internet of Things 10 Abhaya Kumar Panda UNIT-2 IOT Networking Connectivity Terminologies IoT Node: These are machines, things or computers Connected to other nodes inside a LAN via the IoT LAN, May be sometimes connected to the internet through a WAN directly IoT LAN: It is Local, Short range Comm, May or may not connect to Internet, Building or Organization wide IoT WAN: Connection of various network segments, Organizationally and geographically wide, Connects to the internet IoT Gateway: A router connecting the IoT LAN to a WAN to the Internet, can implement several LAN and WAN, Forwards packets between LAN and WAN on the IP layer IoT Proxy: Performs active application layer functions between IoT nodes and other entities Gateway Prefix Allotment: • One of the strategies of address conservation in IoT is to use local addresses which exist uniquely within the domain of the gateway. These are represented by the circles in this slide. • The network connected to the internet has routers with their set of addresses and ranges. • These routers have multiple gateways connected to them which can forward packets from the nodes, to the Internet, only via these routers. These routers assign prefixes to gateways under them, so that the gateways can be identified with them. Impact of Mobility on Addressing • The network prefix changes from 1 to 2 due to movement, making the IoT LAN safe from changes due to movements. • IoT gateway WAN address changes without change in LAN address. This is achieved using ULA. • The gateways assigned with prefixes, which are attached to a remote anchor point by using various protocols such as Mobile IPv6, and are immune to changes of network prefixes. • This is achieved using LU. The address of the nodes within the gateways remains unchanged as the gateways provide them with locally unique address and the change in gateway’s network prefix doesn’t affect them. • Sometimes, there is a need for the nodes to communicate directly to the internet. This is achieved by tunnelling, where the nodes communicate to a remote anchor point instead of channelling their packets through the router which is achieved by using tunnelling protocols such as IKEv2:internet key exchange version 2
  • 13. KIIT POLYTECHNIC Internet of Things 11 Abhaya Kumar Panda Multihoming Multihoming is the practice of connecting a host or a computer network to more than one network. This can be done in order to increase reliability or performance or to reduce cost. There are several different ways to perform multihoming. Host multihoming A single host may be connected to multiple networks. For example, a mobile phone might be simultaneously connected to a WiFi network and a 3G network, and a desktop computer might be connected to both a home network and a VPN. A multihomed host usually is assigned multiple addresses, one per connected network. Classical multihoming In classical multihoming a network is connected to multiple providers, and uses its own range of addresses (typically from a Provider Independent (PI) range). The network's edge routers communicate with the providers using a dynamic routing protocol, typically BGP, which announces the network's address range to all providers. If one of the links fails, the dynamic routing protocol recognizes the failure within seconds or minutes, and reconfigures its routing tables to use the remaining links, transparently to the hosts. Multihoming with multiple addresses In this approach, the network is connected to multiple providers, and assigned multiple address ranges, one for each provider. Hosts are assigned multiple addresses, one for each provider. Deviation from regular Web
  • 14. KIIT POLYTECHNIC Internet of Things 12 Abhaya Kumar Panda Features IoT Stack Web Stack Function or application It is used in constrained network having low power, low bandwidth and low memory requirements. It is used in non-constrained network having no limits on power/BW/memory. Size of data to be transported tens of bytes hundreds or thousands of bytes Data format It uses CBOR (Concise Binary Object Representation) format as IoT is used for tiny messages. CBOR is based on JSON though CBOR uses binary encoding while JSON uses text encoding. It uses HTML, XML and JSON formats. Application Layer It uses CoAP protocol at application layer. It uses HTTP protocol at application layer. Transport layer It uses UDP which is faster due to smaller header size compare to TCP. It is lighter protocol compare to TCP. It uses TCP which is connection oriented and slower compare to UDP. Security layer It uses DTLS (Datagram Transport Layer Security) protocol for security. It uses TLS/SSL protocols for the same. Internet layer It uses 6LoWPAN to convert large IPv6 packets into small size packets to be carried on wireless medium as per bluetooth, zigbee etc. standards. It does fragmentation and reassembly. It also does header compression to reduce packet size. It does not require protocols like 6LoWPAN. Fragmentation and reassembly is taken care by transport layer (i.e. TCP) itself. Datalink or MAC layer It will have MAC layer as per IoT wireless technology used viz. bluetooth, zigbee, zwave etc. It takes care of medium access control and resource allocation and management. It will have MAC layer as per LAN or WLAN or DSL or ISDN technologies. Physical layer and Radio Frequency (RF) layer It will have physical layer (baseband) as per IoT wireless technologies viz. bluetooth, zigbee, zwave etc. It uses frequencies as per cellular or indoor wireless technologies and country wide allocations for the same. It will have PHY layer as per LAN or WLAN or DSL or ISDN technologies.
  • 15. KIIT POLYTECHNIC Internet of Things 13 Abhaya Kumar Panda IoT identification and Data protocols IPv4: IP version four addresses are 32-bit integers which will be expressed in dotted decimal notation. Example- 192.0.2.126 could be an IPv4 address. Characteristics of IPv4 • IPv4 could be a 32-Bit IP Address. • IPv4 could be a numeric address, and its bits are separated by a dot. • The number of header fields is twelve and the length of the header field is twenty. • It has Unicast, broadcast, and multicast style of addresses. • IPv4 supports VLSM (Virtual Length Subnet Mask). • IPv4 uses the Post Address Resolution Protocol to map to the MAC address. • RIP may be a routing protocol supported by the routed daemon. • Networks ought to be designed either manually or with DHCP. • Packet fragmentation permits from routers and causing host. IPv4 Datagram Header Version: This field indicates the version number of the IP packet so that the revised version can be distinguished from the previous version. The current IP version is 4. Internet Header Length (IIHL): It specifies the length of the IP header in unit 32 bits. In case of no option present in the IP header, IHL will have a value of 5. So, if the value of IHL is more than 5 then the length of the option field can be easily calculated.
  • 16. KIIT POLYTECHNIC Internet of Things 14 Abhaya Kumar Panda Type of Service: This field specifies the priority of the packets based on delay, throughput, reliability and cost requirements. Three bits are assigned for priority level and four bits for specific requirements (delay, throughput, reliability and cost). Total Length: This field specifies the number of bytes of the IP packet including header and data. As 16 bits are assigned to this field, the maximum length of the packet is 65635 bytes. Identification: The identification field is used to identify which packet a particular fragment belongs to so that fragments for different packets don’t get mixed up. Flags: The flag field has three bits: 1. Unused bit 2. Don’t fragment (DF) bit 3. More fragment (MF) bit Fragment Offset: The fragment offset field identifies the location of the fragment in a packet. The value measures the offset in a unit of 8 bytes, between the beginning of the packet to be fragmented and the beginning of the fragment. Time to live (TTL): This field is used to indicate the amount of time in seconds a packet is allowed to remain in the network. Protocol: This field specifies the protocol that is to receive the IP data at the destination host. Header Checksum: This field verifies the integrity of the header of the IP packet. The integrity of the data part is left to the upper layer protocols. The checksum is generated by the source and it is sent along with the frame header to the next router. Source IP address & Destination IP address: These two fields contain the IP addresses of the source and destination hosts respectively. Options: Options fields are rarely used to include special features such as security level, the route to be taken and time stamp at each router. It is used in RSVP. Padding: This field is used to make the header a multiple of 32-bit words.
  • 17. KIIT POLYTECHNIC Internet of Things 15 Abhaya Kumar Panda IPv6 Internet Protocol version 6 (IPv6) is also known as Internet Protocol next generation (IPng). It also accommodates more feature to meet the global requirement of growing Internet. To allocate a sufficient number of network address, IPv6 allows 128 bits of IP address separated into 8 sections of 2 bytes each. Unlike IPv4 where the address is represented as dotted-decimal notation, IPv6 uses hexadecimal numbers and colon (“:”) is used as a delimiter between the sections. Example: IPv6 address may be like this: FA20:B120: 6230:0000:0000: CE12:0006: ABDF Version: This field is 4 bits long and it defines the version of the IP packet. The value of it for IPv6 is 6 and IPv4 its value is 4. During the transition period from IPv4 to IPv6, the routers will be able to distinguish the two versions of the IP packets. Traffic Class: This field is 20 bits long and it is used to distinguish between the different requirements for real-time delivery services. Flow Label: This field is 20 bits long and it is used to allow the source and destination nodes to set up a pseudo connection with particular properties and requirements. It is designed to provide special handling of a particular flow of data. Payload Length: It is of 2 bytes length and signifies the number of bytes that follow the 40 bytes base header. It is the length of the IP datagram excluding the base header. Next Header: This field is of 1 bye length and it defines one of the extension headers that follow the base header. The extension headers also contain this field to indicate the next header. if this is the last IP header then Next header field tells which of the transport protocols (TCP or UDP) the packet is to be passed. Hop Limit: This field contains 1 byte and it signifies the maximum number of hops a packet can travel. The time to live field in the IPv4 header did the same task, except that in IPv4 it was counted in time and in IPv6 it is counted in terms of the number of routers. Source Address: It is 16 bytes long and contains the IP address of the source machine to the network interface.
  • 18. KIIT POLYTECHNIC Internet of Things 16 Abhaya Kumar Panda Destination Address: It is 16 bytes long and usually contains the IP address of the ultimate destination machine to the network interface. In case of specific routing, it may contain the IP address of the next router. Extension Header: Some of the fields Ipv4 that are missing in IPv6 is necessary in some of the cases. To handle this problem, IPv6 has introduced the concept of the extension header. There are be one or more of the six possible extension headers. These headers appear directly after the base header. MQTT • It is a publish‐subscribe‐based lightweight messaging protocol for use in conjunction with the TCP/IP protocol. • Designed to provide connectivity (mostly embedded) between applications and middle‐wares on one side and networks and communications on the other side. • A message broker controls the publish‐subscribe messaging pattern. • A topic to which a client is subscribed is updated in the form of messages and distributed by the message broker. • Designed for: Remote connections, Limited bandwidth, Small‐code footprint. MQTT Components • Publishers: Lightweight sensors • Subscribers: Applications interested in sensor data • Brokers: Connect publishers and subscribers and Classify sensor data into topics Communication: • The protocol uses a publish/subscribe architecture (HTTP uses a request/response paradigm). • Publish/subscribe is event‐driven and enables messages to be pushed to clients. • The central communication point is the MQTT broker, which is in charge of dispatching all messages between the senders and the rightful receivers.
  • 19. KIIT POLYTECHNIC Internet of Things 17 Abhaya Kumar Panda • Each client that publishes a message to the broker, includes a topic into the message. The topic is the routing information for the broker. • Each client that wants to receive messages subscribes to a certain topic and the broker delivers all messages with the matching topic to the client. • Therefore, the clients don’t have to know each other. They only communicate over the topic. • This architecture enables highly scalable solutions without dependencies between the data producers and the data consumers. Applications • Facebook Messenger uses MQTT for online chat. • Amazon Web Services use Amazon IoT with MQTT. • Microsoft Azure IoT Hub uses MQTT as its main protocol for telemetry messages. • The EVRYTHNG IoT platform uses MQTT as an M2M protocol for millions of connected products. • Adafruit launched a free MQTT cloud service for IoT experimenters called Adafruit IO. SMQTT • Secure MQTT is an extension of MQTT which uses encryption based on lightweight attribute-based encryption. • The main advantage of using such encryption is the broadcast encryption feature, in which one message is encrypted and delivered to multiple other nodes, which is quite common in IoT applications. • In general, the algorithm consists of four main stages: setup, encryption, publish and decryption. CoAP • CoAP – Constrained Application Protocol. • Web transfer protocol for use with constrained nodes and networks. • Designed for Machine to Machine (M2M) applications such as smart energy and building automation and Based on Request‐Response model between end‐points • Client‐Server interaction is asynchronous over a datagram-oriented transport protocol such as UDP • The Constrained Application Protocol (CoAP) is a session layer protocol designed by IETF Constrained RESTful Environment (CoRE) working group to provide lightweight RESTful (HTTP) interface.
  • 20. KIIT POLYTECHNIC Internet of Things 18 Abhaya Kumar Panda • Representational State Transfer (REST) is the standard interface between HTTP client and servers. • Lightweight applications such as those in IoT, could result in significant overhead and power consumption by REST. • CoAP is designed to enable low‐power sensors to use RESTful services while meeting their power constraints • Built over UDP, instead of TCP (which is commonly used with HTTP) and has a light mechanism to provide reliability. • CoAP architecture is divided into two main sub‐layers: • Messaging • Request/response. • The messaging sub‐layer is responsible for reliability and duplication of messages, while the request/response sub‐layer is responsible for communication. • CoAP has four messaging modes: • Confirmable • Non‐confirmable • Piggyback • Separate CoAP Request-Response Model • Confirmable and non‐confirmable modes represent the reliable and unreliable transmissions, respectively, while the other modes are used for request/response. • Piggyback is used for client/server direct communication where the server sends its response directly after receiving the message, i.e., within the acknowledgment message. • On the other hand, the separate mode is used when the server response comes in a message separate from the acknowledgment, and may take some time to be sent by the server.
  • 21. KIIT POLYTECHNIC Internet of Things 19 Abhaya Kumar Panda • Similar to HTTP, CoAP utilizes GET, PUT, PUSH, DELETE messages requests to retrieve, create, update, and delete, respectively. XMPP • XMPP – Extensible Messaging and Presence Protocol. • A communication protocol for message‐oriented middleware based on XML (Extensible Markup Language). • Real‐time exchange of structured data. • It is an open standard protocol • XMPP uses a client‐server architecture. • As the model is decentralized, no central server is required. • XMPP provides for the discovery of services residing locally or across a network, and the availability information of these services. • Well‐suited for cloud computing where virtual machines, networks, and firewalls would otherwise present obstacles to alternative service discovery and presence‐ based solutions. • Open means to support machine‐to‐machine or peer‐to‐peer communications across a diverse set of networks. Applications: • Publish‐subscribe systems. • Signaling for VoIP. • Video. • File transfer. • Gaming. • Internet of Things applications: Smart grid and Social networking services. AMQP • Advanced Message Queuing Protocol. • Open standard for passing business messages between applications or organizations. • Connects between systems and business processes. • It is a binary application layer protocol. • Basic unit of data is a frame.
  • 22. KIIT POLYTECHNIC Internet of Things 20 Abhaya Kumar Panda Components Exchange: • Part of Broker. • Receives messages and routes them to Queues. Queue: • Separate queues for separate business processes. • Consumers receive messages from queues. Bindings: Rules for distributing messages (who can access what message, destination of the message) AMQP Features • Targeted QoS (Selectively offering QoS to links). • Persistence (Message delivery guarantees). • Delivery of messages to multiple consumers. • Possibility of ensuring multiple consumption. • Possibility of preventing multiple consumption. • High speed protocol.
  • 23. KIIT POLYTECHNIC Internet of Things 21 Abhaya Kumar Panda Applications • Monitoring and global update sharing. • Connecting different systems and processes to talk to each other. • Allowing servers to respond to immediate requests quickly and delegate time consuming tasks for later processing. • Distributing a message to multiple recipients for consumption. • Enabling offline clients to fetch data at a later time. • Introducing fully asynchronous functionality for systems. • Increasing reliability and uptime of application deployments.
  • 24. KIIT POLYTECHNIC Internet of Things 22 Abhaya Kumar Panda UNIT-3 Connectivity Technologies • Communication Protocols: The following communication protocols have immediate importance to consumer and industrial IoTs: • IEEE 802.15.4 • Zigbee • 6LoWPAN • Wireless HART • Z‐Wave • ISA 100 • Bluetooth • NFC • RFID IEEE 802.15.4 Features of IEEE 802.15.4: • Well‐known standard for low data‐rate WPAN. • Developed for low‐data‐rate monitoring and control applications and extended‐life low‐power‐consumption uses. • This standard uses only the first two layers (PHY, MAC) plus the logical link control (LLC) and service specific convergence sub‐layer (SSCS) additions to communicate with all upper layers. • Uses direct sequence spread spectrum (DSSS) modulation. • Highly tolerant of noise and interference and offers link reliability improvement mechanisms. • Low‐speed versions use Binary Phase Shift Keying (BPSK). • High data‐rate versions use offset‐quadrature phase‐shift keying (O‐QPSK). • Uses carrier sense multiple access with collision avoidance (CSMA‐CA) for channel access. • Multiplexing allows multiple users or nodes interference‐free access to the same channel at different times. • Networking topologies defined are ‐‐ Star, and Mesh.
  • 25. KIIT POLYTECHNIC Internet of Things 23 Abhaya Kumar Panda IEEE 802.15.4 supports two types of network node: 1. Full Function Device (FFD) • Can talk to all types of devices. • Supports full protocol. 2. Reduced Function Device (RFD) • Can only talk to an FFD. • Lower power consumption. • Minimal CPU/RAM required. IEEE 802.15.4 Types: 1. Beacon Enabled Networks • Periodic transmission of beacon messages. • Data‐frames sent via Slotted CSMA/CA with a super frame structure managed by PAN coordinator. Beacons used for synchronization & association of other nodes with the coordinator. • Scope of operation spans the whole network. 2. Non-Beacon Enabled Networks • Data‐frames sent via un‐slotted CSMA/CA (Contention Based). • Beacons used only for link layer discovery. • Requires both source and destination IDs. • As 802.15.4 is primarily, a mesh protocol, all protocol addressing must adhere to mesh configurations. • De‐centralized communication amongst nodes. ZigBee Features of ZigBee • Most widely deployed enhancement of IEEE 802.15.4. • The ZigBee protocol is defined by layer 3 and above. It works with the 802.15.4 layers 1 and 2. • The standard uses layers 3 and 4 to define additional communication enhancements. • These enhancements include authentication with valid nodes,
  • 26. KIIT POLYTECHNIC Internet of Things 24 Abhaya Kumar Panda encryption for security, and a data routing and forwarding capability that enables mesh networking. • The most popular use of ZigBee is wireless sensor networks using the mesh topology. ZigBee has two important components: • ZigBee Device Object (ZDO): ZDO responsible for Device management, Security, Policies. • Application Support Sub‐layer (APS): APS responsible for Interfacing and control services, bridge between network and other layers ZigBee Types 1.ZigBee Coordinator (ZC): ▪ The coordinator forms the root of the ZigBee network tree and might act as a bridge between networks. ▪ There is a single ZigBee Coordinator in each network, which originally initiates the network. ▪ It stores information about the network under it and outside it. ▪ It acts as a Trust Centre & repository for security keys. 2. ZigBee Router (ZR): Capable of running applications, as well as relaying information between nodes connected to it. 3. ZigBee End Device (ZED): • It contains just enough functionality to talk to the parent node, and it cannot relay data from other devices. • This allows the node to be asleep a significant amount of the time thereby enhancing battery life. • Memory requirements and cost of ZEDs are quite low, as compared to ZR or ZC. Applications: • Building automation • Remote control (RF4CE or RF for consumer electronics) • Smart energy for home energy monitoring • Health care for medical and fitness monitoring • Home automation for control of smart homes • Light Link for control of LED lighting • Telecom services.
  • 27. KIIT POLYTECHNIC Internet of Things 25 Abhaya Kumar Panda 6LoWPAN • Low‐power Wireless Personal Area Networks over IPv6. • Allows for the smallest devices with limited processing ability to transmit information wirelessly using an Internet protocol. • Allows low‐power devices to connect to the Internet. • Created by the Internet Engineering Task Force (IETF) ‐ RFC 5933 and RFC 4919. Features of 6LoWPANs • Allows IEEE 802.15.4 radios to carry 128‐bit addresses of Internet Protocol version 6 (IPv6). • Header compression and address translation techniques allow the IEEE 802.15.4 radios to access the Internet. • IPv6 packets compressed and reformatted to fit the IEEE 802.15.4 packet format. • Uses include IoT, Smart grid, and M2M applications. Addressing in 6LoWPAN • 64‐bit addresses: globally unique. • 16-bit addresses: PAN specific; assigned by PAN coordinator 6LoWPAN Routing • Mesh routing within the PAN space. • Routing between IPv6 and the PAN domain • Routing protocols in use: ▪ LOADng ▪ RPL LOADng Routing Basic operations of LOADng include: ▪ Generation of Route Requests (RREQs) by a LOADng Router (originator) for discovering a route to a destination, ▪ Forwarding of such RREQs until they reach the destination LOADng Router, ▪ Generation of Route Replies (RREPs) upon receipt of an RREQ by the indicated destination, and unicast hop‐by‐hop forwarding of these RREPs towards the originator. ▪ If a route is detected to be broken, a Route Error (RERR) message is returned to the originator of that data packet to inform the originator about the route breakage.
  • 28. KIIT POLYTECHNIC Internet of Things 26 Abhaya Kumar Panda RPL Routing • Distance Vector IPv6 routing protocol for lossy and low power networks. • Maintains routing topology using low-rate beaconing. • Beaconing rate increases on detecting inconsistencies (e.g. node/link in a route is down). • Routing information included in the datagram itself. • Proactive: Maintaining routing topology. • Reactive: Resolving routing inconsistencies. RFID • RFID is an acronym for “radio‐frequency identification”. • Data digitally encoded in RFID tags, which can be read by a reader. • Somewhat similar to barcodes. • Data read from tags are stored in a database by the reader. • As compared to traditional barcodes and QR codes, RFID tag data can be read outside the line‐of‐sight. RFID Features • RFID tag consists of an integrated circuit and an antenna. • The tag is covered by a protective material which also acts as a shield against various environmental effects. • Tags may be passive or active. • Passive RFID tags are the most widely used. • Passive tags have to be powered by a reader inductively before they can transmit information, whereas active tags have their own power supply. Working Principle • Derived from Automatic Identification and Data Capture (AIDC) technology. • AIDC performs object identification, object data collection and mapping of the collected data to computer systems with little or no human intervention. • AIDC uses wired communication. • RFID uses radio waves to perform AIDC functions.
  • 29. KIIT POLYTECHNIC Internet of Things 27 Abhaya Kumar Panda • The main components of an RFID system include an RFID tag or smart label, an RFID reader, and an antenna. Applications 1. Inventory management 2. Asset tracking 3. Personnel tracking 4. Controlling access to restricted areas 5. ID badging 6. Supply chain management 7. Counterfeit prevention (e.g. in the pharmaceutical industry) HART & Wireless HART • WirelessHART is the latest release of Highway Addressable Remote Transducer (HART) Protocol. • HART standard was developed for networked smart field devices. • The wireless protocol makes the implementation of HART cheaper and easier. • HART encompasses the greatest number of field devices incorporated in any field network. • Wireless HART enables device placements more accessible and cheaper– such as the top of a reaction tank, inside a pipe, or at widely separated warehouses. • Main difference between wired and unwired versions is in the physical, data link and network layers. Wired HART lacks a network layer. HART Physic al Layer • Derived from IEEE 802.15.4 protocol. • It operates only in the 2.4 GHz ISM band. • Employs and exploits 15 channels of the band to increase reliability. HART Data Link Layer • Collision free and deterministic communication achieved by means of super‐frames and TDMA. Super‐frames consist of grouped 10ms wide timeslots. • Super‐frames control the timing of transmission to ensure collision free and reliable communication.
  • 30. KIIT POLYTECHNIC Internet of Things 28 Abhaya Kumar Panda • This layer incorporates channel hopping and channel blacklisting to increase reliability and security. Channel blacklisting identifies channels consistently affected by interference and removes them from use. HART Network & Transport Layers • Cooperatively handle various types of traffic, routing, session creation, and security. • Wireless HART relies on Mesh networking for its communication, and each device is primed to forward packets from every other device. Each device is armed with an updated network graph (i.e., updated topology) to handle routing. • Network layer (HART)=Network + Transport + Session layers (OSI). HART Application Layer • Handles communication between gateways and devices via a series of command and response messages. • Responsible for extracting commands from a message, o executing it and generating responses. • This layer is seamless and does not differentiate between wireless and wired versions of HART. NFC • Near field communication, or NFC for short, is an offshoot of radio‐frequency identification (RFID). • NFC is designed for use by devices within close proximity to each other. • All NFC types are similar but communicate in slightly different ways. NFC Types • Passive devices contain information which is readable by other devices, however it cannot read information itself. • NFC tags found in supermarket products are examples of passive NFC. • Active devices are able to collect as well as transmit information. • Smartphones are a good example of active devices. Working Principle • Works on the principle of magnetic induction. • A reader emits a small electric current which creates a magnetic field that in turn bridges the physical space between the devices. • The generated field is received by a similar coil in the client device where it is turned back into electrical impulses to communicate data such as identification number status information or any other information.
  • 31. KIIT POLYTECHNIC Internet of Things 29 Abhaya Kumar Panda • ‘Passive’ NFC tags use the energy from the reader to encode their response while ‘active’ or ‘peer‐to‐peer’ tags have their own power source. NFC Applications • Smartphone based payments. • Parcel tracking. • Information tags in posters and advertisements. • Computer game synchronized toys. • Low‐power home automation systems. Bluetooth • Bluetooth wireless technology is a short-range communications technology. • Intended for replacing cables connecting portable units • Maintains high levels of security. • Bluetooth technology is based on Ad‐hoc technology also known as Ad‐hoc Piconets Features • Bluetooth technology operates in the unlicensed industrial, scientific and medical (ISM) band at 2.4 to 2.485 GHZ. • Uses spread spectrum hopping, full‐duplex signal at a nominal rate of 1600 hops/sec. • Bluetooth supports 1Mbps data rate for version 1.2 and 3Mbps data rate for Version 2.0 combined with Error Data Rate. • Bluetooth operating range depends on the device: o Class 3 radios have a range of up to 1 meter or 3 feet o Class 2 radios are most commonly found in mobile devices have a range of 10 meters or 30 feet o Class 1 radios are used primarily in industrial use cases have a range of 100 meters or 300 feet. Connection Establishment
  • 32. KIIT POLYTECHNIC Internet of Things 30 Abhaya Kumar Panda • Inquiry: Inquiry run by one Bluetooth device to try to discover other devices near it. • Paging: Process of forming a connection between two Bluetooth devices. • Connection: A device either actively participates in the network or enters a low‐ power sleep mode Piconets: • Bluetooth enabled electronic devices connect and communicate wirelessly through short range networks known as Piconets. • Bluetooth devices exist in small ad‐hoc configurations with the ability to act either as master or slave. Provisions are in place, which allow for a master and a slave to switch their roles. • The simplest configuration is a point-to-point configuration with one master and one slave. • Devices in adjacent Piconets provide a bridge to support inner‐Piconet connections, allowing assemblies of linked Piconets to form a physically extensible communication infrastructure known as Scatternet. Applications • Audio players • Home automation • Smartphones • Toys • Hands free headphones • Sensor networks Z Wave • Zwave is a protocol for communication among devices used for home automation. • It uses RF for signalling and control. • Operating frequency is 908.42 MHz in the US & 868.42 MHz in Europe. • Mesh network topology is the main mode of operation, and can support 232 nodes in a network. • Zwave utilizes GFSK modulation and Manchester channel encoding. • A central network controller device sets‐up and manages a Zwave network. • Each logical Zwave network has 1 Home (Network) ID and multiple node IDs for the devices in it.
  • 33. KIIT POLYTECHNIC Internet of Things 31 Abhaya Kumar Panda • Nodes with different Home IDs cannot communicate with each other. • Network ID length=4 Bytes, Node ID length=1 Byte. ISA 100.11A • ISA is acronym International Society of Automation. • Designed mainly for large scale industrial complexes and plants. • More than 1 billion devices use ISA 100.11A • ISA 100.11A is designed to support native and tunnelled application layers. • Various transport services, including ‘reliable,’ ‘best effort,’ ‘real‐time’ are offered. • Network and transport layers are based on TCP or UDP / IPv6. • Data link layer supports mesh routing and Frequency hopping. • Physical and MAC layers are based on IEEE 802.15.4 • Topologies allowed are: • Star/tree • Mesh • Permitted networks include: • Radio link • ISA over Ethernet • Field buses
  • 34. KIIT POLYTECHNIC Internet of Things 32 Abhaya Kumar Panda UNIT-4 Wireless Sensor Networks Wireless Sensor Networks (WSNs): • WSN Consists of a large number of sensor nodes, densely deployed over an area. • Sensor nodes are capable of collaborating with one another and measuring the condition of their surrounding environments (i.e., Light, temperature, sound, vibration). • The sensed measurements are then transformed into digital signals and processed to reveal some properties of the phenomena around sensors. Components of a Sensor Node: In any wireless sensor network, sensor node consists of four basic components, a sensing unit, a processing unit, a transceiver unit, and a power unit. They may also have additional application dependent components such as a location finding system, power generator and mobilize Challenges in WSN: Energy: Power consumption can be allocated to three functional domains: sensing, communication, and data processing, each of which requires optimization. The sensor node lifetime typically exhibits a strong dependency on battery life. The constraint most often associated with sensor network design is that sensor nodes operate with limited energy budgets. Limited bandwidth: Bandwidth limitation directly affects message exchanges among sensors, and synchronization is impossible without message exchanges. Sensor networks often operate in a bandwidth and performance constrained multi-hop wireless communications medium. These wireless communications links operate in the radio, infrared, or optical range. Node Costs: A sensor network consists of a large set of sensor nodes. It follows that the cost of an individual node is critical to the overall financial metric of the sensor network. Clearly, the cost of each sensor node has to be kept low for the global metrics to be acceptable. Deployment Node: A proper node deployment scheme can reduce the complexity of problems. Deploying and managing a high number of nodes in a relatively bounded environment requires special techniques. Hundreds to thousands of sensors may be deployed in a sensor region. Security: One of the challenges in WSNs is to provide high security requirements with constrained resources. Many wireless sensor networks collect sensitive information. The remote and unattended operation of sensor nodes increases their exposure to malicious intrusions and attacks. The security requirements in WSNs are comprised of node authentication and data confidentiality. To identify both trustworthy and unreliable nodes from a security stand points, the deployment sensors must pass a node authentication
  • 35. KIIT POLYTECHNIC Internet of Things 33 Abhaya Kumar Panda examination by their corresponding manager nodes or cluster heads and unauthorized nodes can be isolated from WSNs during the node authentication procedure. SENSOR WEB the sensor web is a type of sensor network that is especially well suited for environmental monitoring. The sensor web is also associated with a sensing system which heavily utilizes the World Wide Web. Sensor Web Enablement (SWE) Sensor Web Enablement (SWE) is a suite of standards developed and maintained by Open Geospatial Consortium. SWE standards enable developers to make all types of sensors, transducers and sensor data repositories discoverable, accessible and usable via the Web. SWE Standards include: • Sensor Observation Service • Sensor Planning Service • Observations and Measurements • Sensor Model Language • Sensor Things API Cooperation in Wireless Ad Hoc and Sensor Networks • Nodes communicate with other nodes with the help of intermediate nodes. • The intermediate nodes act as relays. • Wireless nodes are energy-constrained. • Nodes may or may not cooperate. • Two extremities for Cooperation: o Total cooperation: if all relay requests are accepted, nodes will quickly exhaust limited energy. o Total non‐cooperation: if no relay requests are accepted, the network throughput will go down rapidly. Node Behaviour in WSNs:
  • 36. KIIT POLYTECHNIC Internet of Things 34 Abhaya Kumar Panda ▪ Normal nodes work perfectly in ideal environmental conditions. ▪ Failed nodes are simply those that are unable to perform an operation; this could be because of power failure and environmental events. ▪ Badly failed nodes exhibit features of failed nodes but they can also send false routing messages which are a threat to the integrity of the network. ▪ Selfish nodes are typified by their unwillingness to cooperate, as the protocol requires whenever there is a personal cost involved. Packet dropping is the main attack by selfish nodes. ▪ Malicious nodes aim to deliberately disrupt the correct operation of the routing protocol, denying network service if possible. Dynamic Misbehaviour (Dumb behaviour): • Detection of such temporary misbehaviour in order to preserve normal functioning of the network – coinage and discovery of dumb behaviour. • In the presence of adverse environmental conditions (high temperature, rainfall, and fog) the communication range shrinks. • A sensor node can sense its surroundings but is unable to transmit the sensed data • With the resumption of favourable environmental conditions, dumb nodes work normally. • Dumb behaviour is temporal in nature (as it is dependent on the effects of environmental conditions). Self-Management of Wireless Sensor Networks: ▪ A WSN is deployed with the intention of acquiring information. ▪ The sensed information is transmitted in the form of packets. ▪ Information theoretic self‐management (INTSEM) controls the transmission rate of a node by adjusting a node’s sleep time. ▪ Benefits: ▪ Reduce consumption of transmission energy of transmitters. ▪ Reduce consumption of receiving energy of relay nodes. Social sensing WSN • Social Sensing‐based Duty Cycle Management for Monitoring Rare Events in Wireless Sensor Networks. WSNs are energy‐constrained Scenario: • Event monitoring using WSNs. • WSNs suffer from ineffective sensing for rare events. • Event monitoring or sensing, even if there is no event to monitor or sense. • Example: Submarine monitoring in underwater surveillance.
  • 37. KIIT POLYTECHNIC Internet of Things 35 Abhaya Kumar Panda • Challenges: • Distinguish rare events and regular events. • Adapt the duty‐cycle with the event occurrence probability. • Contribution: • Probabilistic duty cycle (PDC) in WSNs. • Accumulates information from the social media to identify the occurrence possibility of rare events. • Adjusts the duty cycles of sensor nodes using weak estimation learning automata. Applications of WSNs: 1. Mines • Fire Monitoring and Alarm System for Underground Coal Mines Bord‐and‐Pillar Panel Using Wireless Sensor Networks. ▪ WSN‐based simulation model for building a fire monitoring and alarm (FMA) system for Bord & Pillar coal mine. ▪ The fire monitoring system has been designed specifically for Bord & Pillar based mines. ▪ It is not only capable of providing real‐time monitoring and alarm in case of a fire, but also capable of providing the exact fire location and spreading direction by continuously gathering, analysing, and storing real time information. 2. Healthcare • Wireless Body Area Networks ▪ Wireless body area networks (WBANs) have recently gained popularity due to their ability in providing innovative, cost‐effective, and user‐friendly solution for continuous monitoring of vital physiological parameters of patients. ▪ Monitoring chronic and serious diseases such as cardiovascular diseases and diabetes. ▪ Could be deployed in elderly persons for monitoring their daily activities. 3.Internet of Things (IOT) 4. Surveillance and Monitoring for security, threat detection 5. Environmental temperature, humidity, and air pressure 6. Noise Level of the surrounding 7. Landslide Detection
  • 38. KIIT POLYTECHNIC Internet of Things 36 Abhaya Kumar Panda Wireless Multimedia Sensor Networks (WMSNs) • Incorporation of low-cost camera (typically CMOS) to wireless sensor nodes • Camera sensor (CS) nodes: capture multimedia (video, audio, and the scalar) data, expensive and resource hungry, directional sensing range • Scalar sensor (SS) nodes: sense scalar data (temperature, light, vibration, and so on), omni‐ directional sensing range, and low cost • WMSNs consist of a smaller number of CS nodes and large number of SS nodes WMSNs Application • In security surveillance, wild‐habitat monitoring, environmental monitoring, SS nodes cannot provide precise information • CS nodes replace SS nodes to get precise information • Deployment of both CS and SS nodes can provide better sensing and prolong network lifetime Nanonetworks: ▪ Nanodevice has components of sizes in the order nano‐meters. ▪ Communication options among nanodevices o Electromagnetic o Molecular Molecular Communication: ▪ Molecule used as information ▪ Information packed into vesicles ▪ Gap junction works as mediator between cells and vesicles ▪ Information exchange between communication entities using molecules Electromagnetic-based Communication ▪ Surface Plasmonic Polariton (SPP) generated upon electromagnetic beam ▪ EM communication for Nanonetworks centres around 0.1‐10 Terahertz channel Underwater Acoustic Sensor Networks • In a layered shallow oceanic region, the inclusion of the effect of internal solitons on the performance of the network is important. • Based on various observations, it is proved that non-linear internal waves, i.e., Solitons are one of the major scatters of underwater sound. • If sensor nodes are deployed in such type of environment, inter-node communication is affected due to the interaction of wireless acoustic signal with these solitons, as a result of which network performance is greatly affected.
  • 39. KIIT POLYTECHNIC Internet of Things 37 Abhaya Kumar Panda • The performance analysis of UWASNs renders meaningful insights with the inclusion of a mobility model which represents realistic oceanic scenarios. • The existing works on performance analysis of UWASNs lack the consideration of major dominating forces, which offer impetus for a node’s mobility. WSN Coverage: • Coverage – area‐of‐interest is covered satisfactorily. • Connectivity – all the nodes are connected in the network, so that sensed data can reach to sink node. • Sensor Coverage studies how to deploy or activate sensors to cover the monitoring area. ▪ Sensor placement ▪ Density control • Two modes: ▪ Static sensors ▪ Mobile sensors • Determine how well the sensing field is monitored or tracked by sensors. • To determine, with respect to application‐specific performance criteria, ▪ in case of static sensors, where to deploy and/or activate them ▪ in case of (a subset of) the sensors are mobile, how to plan the trajectory of the mobile sensors. • These two cases are collectively termed as the coverage problem in wireless sensor networks. • The purpose of deploying a WSN is to collect relevant data for processing or reporting. • Two types of reporting: ▪ event driven: e.g., forest fire monitoring ▪ on demand: e.g., inventory control system • Objective is to use a minimum number of sensors and maximize the network lifetime • The coverage algorithm proposed are either centralized or distributed and localized • Distributed: Nodes compute their position by communicating with their neighbours only. • Centralized: Data collected at central point and global map computed.
  • 40. KIIT POLYTECHNIC Internet of Things 38 Abhaya Kumar Panda • Localized: Localized algorithms are a special type of distributed algorithms where only a subset of nodes in the WASN participate in sensing, communication, and computation. Stationary Wireless Sensor Networks • Sensor nodes are static. • Advantages: ▪ Easy deployment ▪ Node can be placed in an optimized distance-Reduce the total number of nodes ▪ Easy topology maintenance • Disadvantages: ▪ Node failure may result in partition of networks ▪ Topology cannot be change automatically Mobile Wireless Sensor Networks ▪ MWSN is Mobile Ad hoc Network (MANET) ▪ Let us remember from previous lectures: ‐ ▪ MANET‐Infrastructure less network of mobile devices connected wirelessly which follow the self‐CHOP properties o Self‐Configure o Self‐Heal o Self‐Optimize o Self‐Protect ▪ Wireless Sensor Networks‐ o Consists of a large number of sensor nodes, densely deployed over an area. o Sensor nodes are capable of collaborating with one another and measuring the condition of their surrounding environments (i.e., Light, temperature, sound, vibration). Components of MWSN: Mobile Sensor Nodes: Sense physical parameters from the environment When these nodes come in close proximity of sink, deliver data. Mobile Sink: Moves in order to collect data from sensor nodes. Based on some algorithm sink moves to different nodes in the networks. Data Mules: A mobile entity Collects the data from sensor nodes and Goes to the sink and delivers the collected data from different sensor nodes.
  • 41. KIIT POLYTECHNIC Internet of Things 39 Abhaya Kumar Panda UNIT-5 Machine to Machine Communication M2M Communication: M2M, is the Communication between machines or devices with computing and communication facilities, without any human intervention. Features of M2M: • Large number of nodes or devices. • Low cost. • Energy efficient. • Small traffic per machine/device. • Large quantity of collective data. • M2M communication free from human intervention. • Human intervention required for operational stability and sustainability M2M Ecosystem: It comprises of Device Providers, Internet Service Providers (ISPs), Platform Providers, Service Providers and Service Users. The device provider is basically the owner of these devices. M2M area network sends the data from M2M devices, through gateway to the internet which is handled by the internet service provider. RESTful architecture acts as an interface between the device provider and the internet service provider. RESTful architecture is used in low resource environment. From the ISP the reaches the platform provider. The platform provider takes care of device management, user management, data Analytics and user access is the data is then through a RESTful architecture which takes care of the business model to the service providers and users. M2M Service Platform (M2SP)
  • 42. KIIT POLYTECHNIC Internet of Things 40 Abhaya Kumar Panda M2M Device Platform: • Enables access to objects or devices connected to the Internet anywhere and at any time. • Registered devices create a database of objects from which managers, users and services can easily access information. • Manages device profiles, such as location, device type, address, and description. • Provides authentication and authorization key management functionalities. • Monitors the status of devices and M2M area networks, and controls them based on their status. M2M User Platform • Manages M2M service user profiles and provides functionalities such as, ▪ User registration ▪ Modification ▪ Charging ▪ Inquiry. • Interoperates with the Device‐platform, and manages user access restrictions to devices, object networks, or services. • Service providers and device managers have administrative privileges on their devices or networks. • Administrators can manage the devices through device monitoring and control. M2M Application Platform • Provides integrated services based on device collected data‐ sets. • Heterogeneous data merging from various devices used for creating new services. • Collects control processing log data for the management of the devices by working with the Device‐platform. • Connection management with the appropriate network is provided for seamless services. M2M Access Platform • Provides app or web access environment to users. • Apps and links redirect to service providers. • Services actually provided through this platform to M2M devices. • Provides App management for smart device apps.
  • 43. KIIT POLYTECHNIC Internet of Things 41 Abhaya Kumar Panda • App management manages app registration by developers and provides a mapping relationship between apps and devices. • Mapping function provides an app list for appropriate devices. Interoperability in Internet of Things Interoperability is a characteristic of a product or system, whose interfaces are completely understood, to work with other products or systems, present or future, in either implementation or access, without any restrictions. Need of Interoperability: • To fulfil the IoT objectives ▪ Physical objects can interact with any other physical objects and can share their information ▪ Any device can communicate with other devices anytime from anywhere ▪ Machine to Machine communication(M2M), Device to Device Communication (D2D), Device to Machine Communication (D2M) ▪ Seamless device integration with IoT network • Heterogeneity ▪ Different wireless communication protocols such as ZigBee (IEEE 802.15.4), Bluetooth (IEEE 802.15.1), GPRS, 6LowPAN, and Wi-Fi (IEEE 802.11) ▪ Different wired communication protocols like Ethernet (IEEE 802.3) and Higher Layer LAN Protocols (IEEE 802.1) ▪ Different programming languages used in computing systems and websites such as JavaScript, JAVA, C, C++, Visual Basic, PHP, and Python ▪ Different hardware platforms such as Crossbow, NI, etc. ▪ Different operating systems ▪ As an example, for sensor node: TinyOS, SOS, Mantis OS, RETOS, and mostly vendor specific OS. ▪ As an example, for personal computer: Windows, Mac, Unix, and Ubuntu. ▪ Different databases: DB2, MySQL, Oracle, PostgreSQL, SQLite, SQL Server, and Sybase. ▪ Different data representations. ▪ Different control models. ▪ Syntactic or semantic interpretations.
  • 44. KIIT POLYTECHNIC Internet of Things 42 Abhaya Kumar Panda Types of Interoperability User Interoperability: Interoperability problem between a user and a device The following problems need to be solved • Device identification and categorization for discovery • Syntactic interoperability for device interaction. • Semantic interoperability for device interaction. Device identification and categorization for discovery: There are different solutions for generating unique address like Electronic Product Codes (EPC), Universal Product Code (UPC), Uniform Resource Identifier (URI), IP Addresses (IPv6). Syntactic Interoperability for Device Interaction: • The interoperability between devices and device user in term of message formats • The message format from a device to a user is understandable for the user’s computer. • On the other hand, the message format from the user to the device is executable by the device. Semantic Interoperability for Device Interaction: • The interoperability between devices and device user in term of message’s meaning. • The device can understand the meaning of user’s instruction that is sent from the user to the device. • Similarly, the user can understand the meaning of device’s response sent from the device. Device Interoperability: Interoperability problem between two different devices Solution approach for device interoperability. • Universal Middleware Bridge (UMB) ▪ Solves seamless interoperability problems caused by the heterogeneity of several kinds of home network middleware. ▪ UMB creates virtual maps among the physical devices of all middleware home networks, such as HAVI, Jini, LonWorks, and UPnP. ▪ Creates a compatibility among these middleware home networks. ▪ UMB consists of UMB Core (UMB-C) and UMB Adaptor (UMB-A). ▪ UMB-A converts physical devices into virtually abstracted one, as described by Universal Device Template (UDT). ▪ UDT consists of a Global Device ID, Global Function ID, Global Action ID, Global Event ID, and Global Parameters.
  • 45. KIIT POLYTECHNIC Internet of Things 43 Abhaya Kumar Panda ▪ UMB Adaptors translate the local middleware’s message into global metadata’s message. ▪ The major role of the UMB Core is routing the universal metadata message to the destination or any other UMB Adaptors by the Middleware Routing Table (MRT).
  • 46. KIIT POLYTECHNIC Internet of Things 44 Abhaya Kumar Panda UNIT-6 Programming with Arduino Arduino is a prototype platform (open-source) based on an easy-to-use hardware and software. It consists of a circuit board, which can be programed (referred to as a microcontroller) and a ready- made software called Arduino IDE (Integrated Development Environment), which is used to write and upload the computer code to the physical board. Features of Arduino • Arduino boards are able to read analog or digital input signals from different sensors and turn it into an output such as activating a motor, turning LED on/off, connect to the cloud and many other actions. • You can control your board functions by sending a set of instructions to the microcontroller on the board via Arduino IDE (referred to as uploading software). • Unlike most previous programmable circuit boards, Arduino does not need an extra piece of hardware (called a programmer) in order to load a new code onto the board. You can simply use a USB cable. • Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program. • Finally, Arduino provides a standard form factor that breaks the functions of the micro-controller into a more accessible package. Components of Arduino Board We will study the Arduino UNO board because it is the most popular board in the Arduino board family. In addition, it is the best board to get started with electronics and coding. Some boards look a bit different from the one given below, but most Arduinos have majority of these components in common.
  • 47. KIIT POLYTECHNIC Internet of Things 45 Abhaya Kumar Panda Power USB Arduino board can be powered by using the USB cable from your computer. All you need to do is connectthe USB cable to the USB connection (1). Power (Barrel Jack) Arduino boards can be powered directly from the AC mains power supply by connecting it to the Barrel Jack(2). Voltage Regulator The function of the voltage regulator is to control the voltage given to the Arduino board and stabilize theDC voltages used by the processor and other elements. Crystal Oscillator The crystal oscillator helps Arduino in dealing with time issues. How does Arduino calculate time? The answer is, by using the crystal oscillator. The number printed on top of the Arduino crystal is 16.000H9H. Ittells us that the frequency is 16,000,000 Hertz or 16 MHz. Arduino Reset You can reset your Arduino board, i.e., start your program from the beginning. You can reset the UNO boardin two ways. First, by using the reset button (17) on the board. Second, you can connect an external reset button to the Arduino pin labelled RESET (5). Pins (3.3, 5, GND, Vin) • 3.3V (6) − Supply 3.3 output volt • 5V (7) − Supply 5 output volt • Most of the components used with Arduino board works fine with 3.3 volt and 5 volt. • GND (8)(Ground) − There are several GND pins on the Arduino, any of which can be used to groundyour circuit. • Vin (9) − This pin also can be used to power the Arduino board from an external power source, likeAC mains power supply. Analog pins The Arduino UNO board has six analog input pins A0 through A5. These pins can read the signal from an analog sensor like the humidity sensor or temperature sensor and convert it into a digital value that can beread by the microprocessor.
  • 48. KIIT POLYTECHNIC Internet of Things 46 Abhaya Kumar Panda Main microcontroller Each Arduino board has its own microcontroller (11). You can assume it as the brain of your board. The main IC (integrated circuit) on the Arduino is slightly different from board to board. The microcontrollers areusually of the ATMEL Company. You must know what IC your board has before loading up a new programfrom the Arduino IDE. This information is available on the top of the IC. For more details about the IC construction and functions, you can refer to the data sheet. ICSP pin Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of MOSI, MISO, SCK,RESET, VCC, and GND. It is often referred to as an SPI (Serial Peripheral Interface), which could be considered as an "expansion" of the output. Actually, you are slaving the output device to the master of the SPI bus. Power LED indicator This LED should light up when you plug your Arduino into a power source to indicate that your board is powered up correctly. If this light does not turn on, then there is something wrong with the connection. TX and RX LEDs On your board, you will find two labels: TX (transmit) and RX (receive). They appear in two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the pins responsible for serial communication. Second, the TX and RX led (13). The TX led flashes with different speed while sending the serial data. The speed of flashing depends on the baud rate used by the board. RX flashes during the receiving process. Digital I/O The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse Width Modulation) output. These pins can be configured to work as input digital pins to read logic values (0 or 1) or as digital output pins to drive different modules like LEDs, relays, etc. The pins labeled “~” can be used to generate PWM. AREF AREF stands for Analog Reference. It is sometimes, used to set an external reference voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.
  • 49. KIIT POLYTECHNIC Internet of Things 47 Abhaya Kumar Panda Arduino IDE After learning about the main parts of the Arduino UNO board, we are ready to learn how to set up theArduino IDE. Once we learn this, we will be ready to upload our program on the Arduino board. In this section, we will learn in easy steps, how to set up the Arduino IDE on our computer and preparethe board to receive the program via USB cable. Step 1 − First you must have your Arduino board (you can choose your favorite board) and a USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega 2560, or Diecimila,you will need a standard USB cable (A plug to B plug), the kind you would connect to a USB printeras shown in the following image. In case you use Arduino Nano, you will need an A to Mini-B cable instead as shown in the following image. Step 2 − Download Arduino IDE Software. You can get different versions of Arduino IDE from the Download page on the Arduino Official website.You must select your software, which is compatible with your operating system (Windows, IOS, or Linux). After your file download is complete, unzip the file. Step 3 − Power up your board. The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power from either, the USB connection to the computer or an external power supply. If you are using an Arduino Diecimila, you have to make sure that the board is configured to draw power from the USB connection. The power source is selected with a jumper, a small piece of plastic that fits onto two of the three pins between the USB and power jacks. Check that it is on the two pins closest to the USB port. Connect the Arduino board to your computer using the USB cable. The green power LED (labeled PWR) should glow. Step 4 − Launch Arduino IDE. After your Arduino IDE software is downloaded, you need to unzip the folder. Inside the folder, you can find the application icon with an infinity label (application.exe). Double-click the icon to start the IDE.
  • 50. KIIT POLYTECHNIC Internet of Things 48 Abhaya Kumar Panda Step 5 − Open your first project. Once the software starts, you have two options − • Create a new project. • Open an existing project example. To create a new project, select File → New. To open an existing project example, select File → Example → Basics → Blink. Here, we are selecting just one of the examples with the name Blink. It turns the LED on and off with some time delay. You can select any other example from the list. Step 6 − Select your Arduino board. To avoid any error while uploading your program to the board, you must select the correct Arduino board name, which matches with the board connected to your computer. Go to Tools → Board and select your board. Here, we have selected Arduino Uno board according to our tutorial, but you must select the name matching the board that you are using. Step 7 − Select your serial port. Select the serial device of the Arduino board. Go to Tools → Serial Port menu. This is likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serial ports). To find out, you can disconnect your Arduino board and re-open the menu, the entry that disappears should be of the Arduino board. Reconnect the board and select that serial port. Step 8 − Upload the program to your board. Before explaining how we can upload our program to the board, we must demonstrate the function ofeach symbol appearing in the Arduino IDE toolbar.
  • 51. KIIT POLYTECHNIC Internet of Things 49 Abhaya Kumar Panda A − Used to check if there is any compilation error. B − Used to upload a program to the Arduino board. C − Shortcut used to create a new sketch. D − Used to directly open one of the example sketch. E − Used to save your sketch. F − Serial monitor used to receive serial data from the board and send the serial data to the board. Now, simply click the "Upload" button in the environment. Wait a few seconds; you will see the RX and TX LEDs on the board, flashing. If the upload is successful, the message "Done uploading" will appear in the status bar.
  • 52. KIIT POLYTECHNIC Internet of Things 50 Abhaya Kumar Panda UNIT-7 Programming with Raspberry Pi Introduction • Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor TV and uses a standard keyboard and mouse. • It is a little device that enables people of all ages to explore computing. • Programs are written in languages like Scratch and Python. • It is capable of doing everything we expect from a desktop computer. We can browse the Internet, play high-definition video, to make spreadsheets, word-processing and playing games. • There are several generations of Raspberry Pi like Raspberry Pi 3 model B, Raspberry Pi 2 model B, Raspberry Pi zero. Architecture (Basic Architecture of Raspberry Pi) The basic set up for Raspberry Pi includes HDMI cable, monitor, keyboard, mouse, 5volt power adapter for Raspberry Pi, LAN cable, 2 GB micro SD card (minimum). The official operating systems supported are Raspbian and NOOBS. Other third-party operating systems like Ubuntu mate, Snappy Ubuntu Core, Windows 10 Core, Pinet and Risc OS are also supported by Raspberry Pi. Most commonly Pi. used programming languages in Raspberry Pi are Python, C, C++, Java, Scratch and Ruby The popular applications developed using Raspberry Pi are media streamer, home automation, controlling robot, Virtual Private Network (VPN), light weight Web server with IoT etc.
  • 53. KIIT POLYTECHNIC Internet of Things 51 Abhaya Kumar Panda Pin Configuration GPIO pins in pins in Raspberry Pi are the general-purpose Input-Output pins. These pins are to Communicate WITH OTHER circuit such as such as extension boards, custom circuits and much more. For getting an output, we can turn a GPIO pin HIGH or LOW. These pins are a physical interface between the Pi and the outside world. At the simplest level, we can think of them as switches that you can turn on or off (input) or that the Pi can turn on or off (output). Seventeen of the 26 pins are GPIO pins. Others are power or ground pins. Each pin can turn on or off, or go HIGH or LOW in computing terms. When the pin is HIGH it outputs 3.3 volts (3v3) and when the pin is LOW, it is off. We can program the pins to interact in amazing ways with the real world. Inputs don't have to come from a physical switch. It could be input from a sensor or a signal from another computer or device. The output can also do anything, from turning on an LED to sending Signal or data to another device. If the Raspberry Pi is on a network, we can control devices that are attached to it from anywhere and those devices can send data back. Connectivity and control of physical devices over the Internet is a powerful and exciting thing and the Raspberry Pi is ideal for this. Case Studies we will discuss about 2 example projects using Raspberry Pi. "The first one is is an LED and the second one is taking a picture using PiCam. The codes for both the examples are written in Python.
  • 54. KIIT POLYTECHNIC Internet of Things 52 Abhaya Kumar Panda Blinking LED: Following are the requirements for this experiment. • Raspberry pi • LED • 100-ohm resistor • Bread board • Jumper cables We need to install GPIO Library Installing GPIO library: ▪ Open terminal ▪ Enter the command “sudo apt-get install python-dev” to install python development ▪ Enter the command “sudo apt-get install python-rpi.gpio” to install GPIO library. Connection: ▪ Connect the negative terminal of the LED to the ground pin of Pi ▪ Connect the positive terminal of the LED to the output pin of Pi
  • 55. KIIT POLYTECHNIC Internet of Things 53 Abhaya Kumar Panda Capture Image using Raspberry Pi Requirement: ▪ Raspberry Pi ▪ Raspberry Pi Camera Raspberry Pi Camera: ▪ Raspberry Pi specific camera module ▪ Dedicated CSI slot in Pi for connection ▪ The cable slot is placed between Ethernet port and HDMI port Connection: Boot the Pi once the camera is connected to Pi Configuring Pi for Camera • In the terminal run the command “sudo raspi-config” and press enter. • Navigate to “Interfacing Options” option and press enter. • Navigate to “Camera” option. • Enable the camera. • Reboot Raspberry pi. Capture Image ▪ Open terminal and enter the command- raspistill -o image.jpg ▪ This will store the image as ‘image.jpg’ PiCam can also be processed using Python camera module python-picamera sudo apt-get install python-picamera Python Code: Import picamera camera = picamera.PiCamera() camera.capture('image.jpg') Implementation of loT with Raspberry Pi For this we need to integrate sensors and actuators interfaced with Raspberry Pi. The data will be read from the sensor. The actuator will be controlled according to the reading from the sensor. We will see an example of a Temperature Dependent Auto Cooling System.
  • 56. KIIT POLYTECHNIC Internet of Things 54 Abhaya Kumar Panda Temperature Dependent Auto Cooling System In this experiment a DHT sensor senses the temperature and when the temperature goes above 30° C, a fan needs to be automatically turned on. Requirements ▪ DHT Sensor ▪ 4.7K ohm resistor ▪ Relay ▪ Jumper wires ▪ Raspberry Pi ▪ Mini fan DHT Sensor In Digital Humidity and Temperature Sensor (DHT) there are 4 pins: PIN 1, 2, 3, 4 (from left to right) o PIN 1- 3.3V-5V Power supply o PIN 2- Data o PIN 3- Null o PIN 4- Ground Relay This is a mechanical or electromechanical switch. There are 3 output terminals from left to right. ▪ NO (normal open): ▪ Common ▪ NC (normal close) Connection 1.Sensor interface with Raspberry Pi ▪ Connect pin 1 of DHT sensor to the 3.3V pin of Raspberry Pi ▪ Connect pin 2 of DHT sensor to any input pins of Raspberry Pi, here we have used pin 11 ▪ Connect pin 4 of DHT sensor to the ground pin of the Raspberry Pi 2. Relay interface with Raspberry Pi ▪ Connect the VCC pin of relay to the 5V supply pin of Raspberry Pi ▪ Connect the GND (ground) pin of relay to the ground pin of Raspberry Pi
  • 57. KIIT POLYTECHNIC Internet of Things 55 Abhaya Kumar Panda ▪ Connect the input/signal pin of Relay to the assigned output pin of Raspberry Pi (Here we have used pin 7) 3. Fan interface with Raspberry Pi ▪ Connect the Li-Po battery in series with the fan. ▪ NO terminal of the relay is connected to the positive terminal of the fan. ▪ Common terminal of the relay is connected to positive terminal of the battery. ▪ Negative terminal of the battery is connected to the negative terminal of the fan. Adafruit provides a library to work with the DHT22 sensor. Install the library in our Pi. Get the clone from GIT git clone https://github.com/adafruit/Adafruit_Python_DHT.g... Go to folder Adafruit_Python_DHT cd Adafruit_Python_DHT Install the library sudo python setup.py install Following is the Python code for interfacing DHT22, Relay and Fan with Raspberry Pi. Result: The fan is switched on whenever the temperature is above the threshold value set in the code.
  • 58. KIIT POLYTECHNIC Internet of Things 56 Abhaya Kumar Panda UINT-8 SOFTWARE DEFINED NETWORKING Limitations in Current Network • Vendor-specific architecture of switches limits dynamic configuration according to application-specific requirements. • Switches are required to configure according to the installed operating system (OS). • Centralized control is not feasible in traditional network. • The exploding volumes of data traffic, complex network architecture, and growing demands to improve network performance obsoletes the traditional approach to network management. Software-Defined Networking (SDN) Software-Defined Networking (SDN) is an approach to networking that uses software- based controllers or application programming interfaces (APIs) to communicate with underlying hardware infrastructure and direct traffic on a network. Origin of SDN • 2006: At Stanford university, a team proposes a clean-slate security architecture (SANE) to control security policies in a centralized manner instead of doing it at edges. • 2008: The idea of software-defined network is originated from OpenFlow project (ACM SIGCOMM 2008). • 2009: Stanford publishes OpenFlow V1.0.0 specs. • June 2009: Nicira network is founded. • March 2011: Open Networking Foundation is formed. • Oct 2011: First Open Networking Summit. Many Industries (Juniper, Cisco announced to incorporate. SDN Architecture
  • 59. KIIT POLYTECHNIC Internet of Things 57 Abhaya Kumar Panda • In traditional networks, the control and data plane are embedded together as a single unit. • The control plane is responsible for maintaining the routing table of a switch which determines the best path to send the network packets and the data plane is responsible for forwarding the packets based on the instructions given by the control plane. • Whereas in SDN, the control plane and data plane are separate entities, where the control plane acts as a central controller for many data planes. • The data plane consists of network elements, which expose their capabilities to the control plane via southbound interface. • The SDN applications are in the application plane and communicate their network requirements toward the control plane via northbound interface. • The control plane sits in the middle to translate the applications' requirements and exerts low-level control over the network elements, Provide network information to the applications. Data-plane • Data sources and sinks • Traffic forwarding/processing engine which May have the ability to handle some types of protocol, e.g., ARP • Provide interfaces communicating to the control plane for Programmatic control of all functions offered by the network element, Capability advertisement, Event notification. Control-plane • It is placed at Logically centralized. • Its Core functionalities are Topology and network state information, Device discovery, Path computation, Security mechanism, Coordination among different controllers Interfaces to the application plane. Application-plane • Applications specify the resources and behaviours required from the network, with the context of business and policy agreement. • It may need to orchestra the objectives, (Cloudify, Unify) • Programming languages help developing applications. Rule Placement The SDN controller places rules in three phases upon receiving a new flow at a switch: (a) In the first phase, the controller determines optimal forwarding path to route the flow from source to destination; (b) In the second phase, the controller selects optimal switch in the selected path for exact- match rule placement in order to get per-flow statistics; (c) Finally, flow-rule is redistributed among the switches to accommodate new flows in the network upon detecting rule congestion at a switch
  • 60. KIIT POLYTECHNIC Internet of Things 58 Abhaya Kumar Panda Controller Placement • In a distributed SDN controller architecture, multiple controllers are deployed to minimize communication latency between the switch and the control plane. • The controllers are strategically placed to optimize network performance. • Controllers define flow-rule according to the application specific requirements. • The controllers must be able to handle all incoming requests from switches. • Rule should be placed without incurring much delay. • Typically, a controller can handle 200 requests in a second (through a single thread). • The controllers are logically connected to the switches in one hop distance and physically, they are connected to the switches in multi-hop distance. • If we have a very small number of controllers for a large network, the network might be congested with control packets (i.e., PACKET-IN messages). Security in SDN • Software-defined network security involves virtualizing security functions from the traditional hardware they tend to operate on. They enforce virtual network functions, with data and monitoring accessible through one intuitive interface. • The latest generation of software-defined security applications make use of automation to better detect anomalies in network traffic and improve the enforcement of security policies. This makes it easier to detect suspicious activity more quickly and respond more efficiently to prevent intrusions and minimize damage in the event of a breach. • There is Enhanced security using SDN. • The Security is implemented using Firewall, Proxy, HTTP, Intrusion detection system (IDS) (Example of potential data plane ambiguity to implement the policy chain Firewall-IDS- Proxy in the example topology.)
  • 61. KIIT POLYTECHNIC Internet of Things 59 Abhaya Kumar Panda In the above example: 1. When an HTTP request comes, it is first forwarded to Firewall 1(FW1). 2. From the firewall 1, it is sent to Instrusion Detection System1(IDS1) 3. From IDS1, it is sent to Proxy1. 4. Finally, it is sent from Proxy1 to outside network. Integrating SDN in IoT The SDN-IoT integration brings several significant benefits for IoT traffic: 1. Intelligent traffic routing and better network resources use. 2. Simplified information acquisition facilitating information analysis, decision making and network configuration actions. 3. Virtualization, whenever required, may be easily achieved and deployed using common SDN virtualization tools like hypervisors. 4. Visibility of network resources and access management based on user, group, device, and application. 5. Intelligent algorithms to build effective traffic pattern analysers. These benefits result in IoT networks with integrated SDN capabilities becoming more agile, scalable and based on demand. Difference between SDN and Traditional Network: S.No. SDN TRADITIONAL NETWORK 01. Software Defined Network is virtual networking approach. Traditional network is the old conventional networking approach. 02. Software Defined Network is centralized control. Traditional Network is distributed control. 03. This network is programmable. This network is non programmable. 04. Software Defined Network is open interface. Traditional network is closed interface. 05. In Software Defined Network data plane and control plane are decoupled by software. In traditional network data plane and control plane are mounted on same plane. 06. It supports automatic configuration so it takes less time. It supports static/manual configuration so it takes more time. 07. It can prioritize and block specific network packets. It leads all packets in the same way no prioritization support.
  • 62. KIIT POLYTECHNIC Internet of Things 60 Abhaya Kumar Panda 08. It is easy to program as per need. It is difficult to program again and to replace existing program as per use. 09. Cost of Software Defined Network is low. Cost of Traditional Network is high. 10. Structural complexity is low in Software Defined Network. Structural complexity is high in Traditional Network. 11. In SDN it is easy to troubleshooting and reporting as it is centralized controlled. In Traditional network it is difficult to troubleshoot and report as it is distributed controlled. 12. Its maintenance cost is lower than traditional network. Traditional network maintenance cost is higher than SDN.
  • 63. KIIT POLYTECHNIC Internet of Things 61 Abhaya Kumar Panda UINT-9 SMART HOMES • A smart home refers to a convenient home setup where appliances and devices can be automatically controlled remotely from anywhere with an internet connection using a mobile or other networked device. • Devices in a smart home are interconnected through the internet, allowing the user to control functions such as security access to the home, temperature, lighting, and a home theater remotely. Smart Home Implementation: Setting up of a smart home requires the fundamental technology including protocols and all the hardware and software. Besides, you need smart devices that can be connected to the internet on the home network. For example, cameras, motion sensors, LED lights, devices with built- in web servers, etc. These are readily available online or at electronics improvement stores. Before buying such products, one has to make sure that all devices use the same technology. If two devices use different technologies, say one uses X10 while other uses Z-Wave, then it requires a bridging device as well as a lot of technical expertise. It is usually recommended that one should seek professional help while designing a smart home. Technicians with CEA-Comp TIA Certification are considered to be more proficient in installing and troubleshooting the home networking equipment. The cost of home automation depends on how smart the home is. The users can either keep it basic with jut intelligent lighting or add high-tech security systems. One has to decide where to place the nodes to have an effective routing range and plan the as it may require renovation or rebuilding of certain portions of the house. Home Area Network (HAN) • Home Area Network (HAN) is a network in a user’s home where all the laptops, computers, smartphones, and other smart appliances and digital devices are connected into a network. • This facilitates communication among the digital devices within a home which are connected to the Home network. • Home Area Network may be wired or wireless. Mostly wireless network is used for HAN. • Example – Think about a home where computers, printers, game systems and tablets, smartphones, other smart appliances are connected to each other through wired or wireless over a network is an example of Home Area Network.
  • 64. KIIT POLYTECHNIC Internet of Things 62 Abhaya Kumar Panda Infrastructure of HAN: • A modem is used which is provided by an ISP to expose Ethernet to WAN. In homes they come in DSL modem or cable modem. • A router is used to manage connection between Home Area Network (HAN) and Wide Area Network (WAN). • A wireless access point is used for connecting wireless digital devices to the network. • Smart Devices/ Digital Devices are used to connect to the Home Area Network. Smart Home benefits 1. Managing all of your home devices from one place. 2. Flexibility for new devices and appliances. 3. Maximizing home security. 4. Remote control of home functions. 5. Increased energy efficiency. 6. Improved appliance functionality. when entertaining guests. 7. Home management insights. 8. Customize as Per our Convenience. 9. Higher quality of life.
  • 65. KIIT POLYTECHNIC Internet of Things 63 Abhaya Kumar Panda 10. Notifications in case of trouble. 11. Cost savings in the long run. 12. Smart homes may be suitable for disabled and old persons. Smart Home issues 1. Significant installation costs. 2. Reliable internet connection is crucial. 3. Technological problems in connected homes. 4. Maintenance and repair issues. 5. Compatibility problems between devices. 6. Technology may become outdated soon. 7. Power Outage May hamper the System operations.
  • 66. KIIT POLYTECHNIC Internet of Things 64 Abhaya Kumar Panda UNIT-10 SMART CITIES • A smart city is an urban system which uses information & communication technology (ict) to make infrastructure more interactive, accessible and efficient. • Need for Smart Cities arose due to o Rapidly growing urban population. o Fast depleting natural resources. o Changes in environment and climate. Characteristics of Smart Cities It has been suggested that a smart city (also community, business cluster, urban agglomeration or region) uses information technologies to: 1. Make more efficient use of physical infrastructure (roads, built environment and other physical assets) through artificial intelligence and data analytics in order to support a strong and healthy economic, social, cultural development. 2. Engage effectively with local governance officials by use of open innovation processes and e-participation, improving the collective intelligence of the city's institutions through e-governance, with emphasis placed on citizen participation and co-design. 3. Learn, adapt and innovate and thereby respond more effectively and promptly to changing circumstances by improving the intelligence of the city. Smart city Frameworks The creation, integration, and adoption of smart city capabilities require a unique set of frameworks to realize the focus areas of opportunity and innovation central to smart city projects. The frameworks can be divided into 5 main dimensions which include numerous related categories of smart city development 1.Technology framework A smart city relies heavily on the deployment of technology. Different combinations of technological infrastructure interact to form the array of smart city technologies with varying levels of interaction between human and technological systems. Digital: A service-oriented infrastructure is required to connect individuals and devices in a smart city. These include innovation services and communication infrastructure. Intelligent: Cognitive technologies, such as artificial intelligence and machine learning, can be trained on the data generated by connected city devices to identify patterns. The efficacy and impact of particular policy decisions can be quantified by cognitive systems studying the continuous interactions of humans with their urban surroundings.
  • 67. KIIT POLYTECHNIC Internet of Things 65 Abhaya Kumar Panda Ubiquitous: A ubiquitous city provides access to public services through any connected device. U-city is an extension of the digital city concept because of the facility in terms of accessibility to every infrastructure. Wired: The physical components of IT systems are crucial to early-stage smart city development. Wired infrastructure is required to support the IoT and wireless technologies central to more interconnected living. A wired city environment provides general access to continually updated digital and physical infrastructure. The latest in telecommunications, robotics, IoT, and various connected technologies can then be deployed to support human capital and productivity. Hybrid: A hybrid city is the combination of a physical conurbation and a virtual city related to the physical space. This relationship can be one of virtual design or the presence of a critical mass of virtual community participants in a physical urban space. Hybrid spaces can serve to actualize future-state projects for smart city services and integration. Information city: The multiplicity of interactive devices in a smart city generates a large quantity of data. How that information is interpreted and stored is critical to Smart city growth and security. 2. Human framework Smart city initiatives have measurable positive impacts on the quality of life of its citizens and visitors. The human framework of a smart city – its economy, knowledge networks, and human support systems is an important indicator of its success. Creativity: Arts and culture initiatives are common focus areas in smart city planning. Innovation is associated with intellectual curiosity and creativeness, and various projects have demonstrated that knowledge workers participate in a diverse mix of cultural and artistic activities. Learning: Since mobility is a key area of Smart city development, building a capable workforce through education initiatives is necessary. A city's learning capacity includes its education system, including available workforce training and support, and its cultural development and exchange. Humanity: Numerous Smart city programs focus on soft infrastructure development, like increasing access to voluntary organizations and designated safe zones. This focus on social and relational capital means diversity, inclusion, and ubiquitous access to public services is worked in to city planning. Knowledge: The development of a knowledge economy is central to Smart city projects. Smart cities seeking to be hubs of economic activity in emerging tech and service sectors stress the value of innovation in city development. 3.Institutional framework The smart community’s movement took shape as a strategy to broaden the base of users involved in IT. Members of these Communities are people that share their interest and work in a partnership with government and other institutional organizations to push the use of IT to improve the quality of daily life as a consequence of different worsening in daily actions.
  • 68. KIIT POLYTECHNIC Internet of Things 66 Abhaya Kumar Panda 4.Energy framework The city has a smarter energy infrastructure. Employment of smart technologies enables the more efficient application of integrated energy technologies in the city allowing the development of more self-sustaining areas or even Positive Energy Districts that produce more energy than consume. A smart city is powered by "smart connections" for various items such as street lighting, smart buildings, distributed energy resources (DER), data analytics, and smart transportation. 5.Data Management framework Smart cities employ a combination of data collection, processing, and disseminating technologies in conjunction with networking and computing technologies and data security and privacy measures encouraging the application of innovation to promote the overall quality of life for its citizens and covering dimensions that include: utilities, health, transportation, entertainment and government services. Challenges in Smart cities The Chere are several challenges that exist in the implementation of smart cities. The development of smart City confronts several challenges from the technological perspective. Security and privacy: Preserving privacy of citizens and end users is a big concern Since most of most of the frameworks require collecting data from the citizens. The data collected can be exposed to attacks, vulnerabilities and multi-tenancy which include the risk of data leakage. Heterogeneity: lt involves the integration of varying hardware platforms and specifications. Various radio specifications and software platforms need to be integrated. Accommodating vary1ng user requirements is another challenging task in smart city. Reliability: There can be unreliable communication in smart cities due to vehicle mobility. Delivery failures are still significant in smart cities. There can be delay in receiving data due to mobility of deployed nodes. Distribution of devices can affect monitoring tasks also. Legal and social aspects: The legal aspects of smart cities include services based on user provided information which is subject to local or international laws. Social issue is that individual and informed consent is required for using humans as data sources. Big data: Challenges related to Big data include storage, management, fusion, consistency trustworthiness and 3V's (Volume, Velocity and Variety). In a smart city context, this becomes more significant. Transfer, storage and maintenance of huge volumes of data are expensive Data cleaning and purification of data is time consuming. Analytics on gigantic data volume is process intensive. On-device and embedded intelligence to support light- weight artificial intelligence on loT and resource-constrained devices that build the smart city infrastructure is yet another challenge. Sensor networks: Choice of appropriate sensors for individual sensing tasks and energy planning is crucial. Device placement and network architecture is important for reliable e to- end IoT implementation. Communication medium and means play an important role seamless function of IoT in smart cities.
  • 69. KIIT POLYTECHNIC Internet of Things 67 Abhaya Kumar Panda Data Fusion • Enormous volume of data is produced periodically in a smart city environment. • Challenges include making the available/ incoming large data volume precise and accurate. • Quality of data precision and accuracy affects the quality of decision making in IoT- enabled smart cities. • Data fusion enables optimum utilization of massive data gathered from multiple sources, and across multiple platforms. Multi-sensor Data Fusion • Combines information from multiple sensor sources. • Enhances the ability of decision-making systems to include a • multitude of variables prior to arriving at a decision. • Inferences drawn from multiple sensor type data is qualitatively superior to single sensor type data. • Information fusion generated from multiple heterogeneous sensors provides for better understanding of the operational surroundings. Challenges in Data Fusion Data Fusion Opportunities in IoT • Collective data is rich in information and generates better intelligence compared to data from single sources. • Optimal amalgamation of data. • Enhancing the collective information content obtained from multiple low-power, low- precision sensors. • Enables hiding of critical data sources and semantics (useful in military applications, medical cases, etc.). Imperfection Inaccurate or uncertain WSN sensor data Ambiguity Outliers, missing data Conflicts Same sensor type reports different data for the same location. Alignment Arises when sensor data frames are converted to a singular frame prior to transmission Trivial features Processing of trivial data features may bring down the accuracy of the whole system
  • 70. KIIT POLYTECHNIC Internet of Things 68 Abhaya Kumar Panda Smart Parking Smart Parking is a parking strategy that combines technology and human innovation in an effort to use as few resources as possible such as fuel, time and space to achieve faster, easier and denser parking of vehicles for the majority of time they remain idle. Benefits of Smart Parking: • Shortens parking search time of drivers. • Reduces traffic congestion. • Reduces pollution by keeping unnecessarily lingering vehicles off the roads. • Reduces fuel consumption and costs. • Increases urban mobility. • Shorter parking search time results in more parked time, and hence, more revenue. How does a smart parking system work? A smart parking system is an effective solution developed against the problem of on- and off- street parking. For understanding how a smart parking system works, it is essential to comprehend the information about the various elements that contribute to the development of an intelligent parking system. Sensors: Sensors are embedded within the roads and grounds to provide the parking operators knowledge about consumer behaviour and whether or not a suitable parking slot is available. Cameras: Cameras attached to the high point views near the parking lot allow the operators to perceive the dimension and movement of the vehicle. Parking meters: Parking meter is an intermediate between the operator and the user. It provides authorization and payment information to the operator. Central Server: As the name suggests, a central server is responsible for communicating with sensors, cameras and mobile applications. Parking Management software: Typically associated with interaction with stakeholders as it provides them with real-time information pertaining to the parking process. IoT based Smart Parking Mobile Apps: With regard to the process, a mobile app contributes to the processing of transactions. All-in-all, mobile apps are responsible for allowing the user to identify the spaces on the streets and slots available in the garages. Now that we're aware of the things working in the background, you must know how smart parking system works: Input: Sensors, cameras and parking meters collect and transfer the information about the vehicle and the surroundings to the parking operators. Processing: Once, the information about the parking slot and consumer's vehicle is received, the central server securely stores this information and informs the stakeholders about the granting of the slot.
  • 71. KIIT POLYTECHNIC Internet of Things 69 Abhaya Kumar Panda Output: The underlying software or application processes the data received from the aforementioned devices and reserves a parking spot for the consumer. If the consumer has previously booked the parking space, the software guides the driver to the same. Energy Management in Smart Cities • Energy Management in Smart Cities involve Energy efficient solutions like Lightweight protocols, Scheduling optimization, Predictive models for energy consumption, Cloud-based approach, Low-power transceivers and Cognitive management framework • Energy harvesting solutions include Ambient energy harvesting, RF sources, Wind, Sun, Heat and Vibration. • In Dedicated energy harvesting, Energy sources intentionally deployed near IoT sources. • Amount of energy harvested depends on Sensitivity of the harvesting circuit, Distance between the device and source and Environment.
  • 72. KIIT POLYTECHNIC Internet of Things 70 Abhaya Kumar Panda UNIT-11 Industrial IoT The industrial internet of things (IIoT) refers to the extension and use of the internet of things (IoT) in industrial sectors and applications with a strong focus on machine-to-machine (M2M) communication, big data, and machine learning, the IIoT enables industries and enterprises to have better efficiency and reliability in their operations. IIoT requirements • IoT end requirement is the consumer convenience and IIoT end requirement is the return on investment. • IoT focuses on managing home appliances which increase consumer convenience by saving resources such as electricity. • IIoT focuses on critical systems such as health care, aerospace, factory machinery automation and connecting machines and people together along with data analytics. • IIoT wants the uptime to be higher and downtime of business operations to be lesser. Design considerations To use an IoT device for industrial applications, the following design objectives are to be considered • Energy: Time for which the IoT device can operate with limited power supply. • Latency: Time required to transmit the data. • Throughput: Maximum data transmitted across the network. • Scalability: Number of devices supported. • Topology: Communication among the devices, i.e., interoperability. • Safety and Security: Degree of safety and security of the application. Applications of IIoT The key application areas of IIoT are: 1. Manufacturing industry: The devices, equipment, workforce, supply chain, work platform are integrated and connected to achieve smart production. This will lead to – • reduction in operational costs • improvement in the productivity of the worker • reduction in the injuries at the workplace • resource optimization and waste reduction • end‐to‐end automation.
  • 73. KIIT POLYTECHNIC Internet of Things 71 Abhaya Kumar Panda 2. Healthcare Service industry: Patients can be continuously monitored due to the implanted on‐body sensors. This has led to – • improved treatment outcome • costs has reduced • improved disease detection • improved accuracy in the collection of data • improved drugs management. 3. Transportation & logistics: To improve safety, efficiency of transportation, Intelligent Transportation system (ITS) is developed which consists of connected vehicles. ITS provides – a. Vehicle – to – sensor connectivity b. Vehicle – to – vehicle connectivity c. Vehicle – to – internet connectivity d. Vehicle – to – road infrastructure • In IIoT scenario the physical objects are provided with o bar codes o RFID tags o hence, real‐time monitoring of the status and location of the physical objects from destination to the origin, across the supply chain is possible. • Security and privacy of the data should be maintained. 4. Mining: To prevent accidents inside the mines ‐ RFID, Wi‐Fi and other wireless technologies are used, which • provides early warning of any disaster • monitors air‐quality • detects the presence of poisonous gases inside the mines • oxygen level inside the mines. 5. Firefighting: Sensor networks, RFID tags are used to perform • automatic diagnosis • early warning of disaster • emergency rescue • provides real‐time monitoring Hence, improves public security.
  • 74. KIIT POLYTECHNIC Internet of Things 72 Abhaya Kumar Panda Benefits of IIoT By harnessing IoT and advanced analytics technologies, manufacturers can: • Increase productivity and uptime. • Improve process efficiencies. • Accelerate innovation. • Reduce asset downtime. • Enhance operational efficiency. • Create end-to-end operational visibility. • Improve product quality. • Reduce operating costs. • Optimize production scheduling. • Improve overall equipment effectiveness (OEE). Challenges of IIoT • The primary challenges in IloT include identification of objects or amount things, manage huge of data, integrate existing infrastructures into new IloT infrastructure and data enabling storage. • There are several safety challenges which include worker health and satety, regulatory compliance, environmental protection and optimized operations. • Challenges related to hazards include handling, storing or using hazardous substances, oxygen deficiency, radiation and physiological stress. • The problems related to standardization are interoperability, semantic interoperability, security and privacy and radio access level issues. • Other important concerns related with IloT are information security and data privacy protection. The devices or things can be tracked, monitored and connected. So there are chances of attack on the personal and private data. • Though lloT provides new opportunities, new factors may cause hindrance in the path to success such as lack of vision and leadership, lack of understanding of values among management employees, costly sensors and inadequate infrastructure.
  • 75. KIIT POLYTECHNIC Internet of Things 73 Abhaya Kumar Panda Difference between IIOT and IOT: IIOT IOT It focuses on industrial applications such as manufacturing, power plants, oil & gas, etc. It focuses on general applications ranging from wearables to robots & machines. It uses critical equipment & devices connected over a network which will cause a life-threatening or other emergency situation on failure therefore uses more sensitive and precise sensors. Its implementation starts with small scale level so there is no need to worry about life-threatening situations. It deals with large scale networks. It deals with small scale networks. It can be programmed remotely i.e., offers remote on- site programming. It offers easy off-site programming. It handles data ranging from medium to high. It handles very high volume of data. It requires robust security to protect the data. It requires identity and privacy. It needs stringent requirements. It needs moderate requirements. It having very long-life cycle. It having short product life cycle. It has high- reliability. It is less reliable.
  • 76. KIIT POLYTECHNIC Internet of Things 74 Abhaya Kumar Panda References: 1.” Internet of Things” by Jeeva Jose 2.” Internet of Things - A Hands-On Approach” By Arshdeep Bagha & Vijay Madisethi 3.” Internet of Things” By Dr. Rajiv Chopra 4. “21 Internet Of Things (IOT) experiments” by Yashavant Kanetkar, Shrirang Korde 5. “Internet of Things (IoT)” by Dr Kamlesh Lakhwani , Dr Hemant Kumar Gianey , Joseph Kofi Wireko , Kamal Kant Hiran 6. https://www.geeksforgeeks.org 7. https://nptel.ac.in 8. https://en.wikipedia.org 9. https://www.w3schools.com