0% found this document useful (0 votes)
17 views

Session 5 IoT Protocols and Architecture

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

Session 5 IoT Protocols and Architecture

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

IoT Protocols

Nitin N. Sakhare
VIIT, Pune
IoT Protocols
Link Layer
• LL protocols determine how the data is physically
sent over the network’s physical layer (copper
wire, coaxial cable, radio waves)
• Local network connection to which host is
attached
• Hosts on the same link exchange data packets
over the link layer using link layer protocols.
• LL determines how packets are coded and
signaled by hardware device over medium to
which host is attached.
1. 802.3
• Collection of wired Ethernet standards for
the link layer.

Sr. Standard Specification


No.
1 802.3 10BASE5, coaxial cable as shared medium
2 802.3i 10BASE-T, copper twisted pair
connections
3 802.3j 10BASE-F, Optical Fibre
4 802.3ae 10Gbit/s Ethernet over Fibre
2. 802.11- WiFi
• Collection of wireless local area network
(WLAN)
• Data rates- 1 Mb/s upto 6.75 Gb/s
Sr.No. WLAN Standard Specification

1 802.11a Operating Band- 5 GHz

2 802.11b and g 2.4 GHz

3 802.11n 2.4/5GHz

4 802.11ac 5 GHz

5 802.11ad 60 GHz
3. 802.16 Wi-Max
• Collection of wireless broadband standards
including extensive description for link layer-
Wi-Max.
• Data rates- 1.5 MBPS to 1 GBPS
• Recent update- 100 Mbit/s for mobile
stations and 1 Gbit/s for fixed stations.
4. 802.15.4
• Collection of standards for low rate wireless
personal area network (LR-PAN)
• High level communication protocol- ZigBee
• Data rates- 40 Kb/s to 250 Kb/s
• Low cost, low speed communication for
power constrained devices.
5. 2G/3G/4G
• Mobile Communication Standards 2G- GSM,
CDMA
• 3G- UMTS, CDMA 2000
(Code Division Multiple Access is a form of
multiplexing, which allows numerous signals to
occupy a single transmission channel, optimizing
the use of available bandwidth.)
• UMTS (Universal Mobile Telecommunications Service)
Third-generation (3G) broadband, packet-based
transmission of text, digitized voice, video, and multimedia
at data rates up to 2 megabits per second (Mbps).
• UMTS offers a consistent set of services to mobile
computer and phone users, no matter where they are
located in the world. UMTS is based on the Global System
for Mobile (GSM) communication standard.
• Once UMTS is fully available, computer and phone users
can be constantly attached to the Internet wherever they
travel and, as they roam, will have the same set of
capabilities. Users will have access through a combination
of terrestrial wireless and satellite transmissions
• 4G- LTE
• IoT devices based on these standards can
communicate over cellular network
• Data rates- 9.6 kb/s for 2G to 100 Mb/s for
4G
Internet/Network Layer
• Responsible for sending IP datagram from
source network to destination network
• Host addressing + Routing
• Datagram contain the source and destination
addresses which are used to route them from
source to destination across multiple
networks
• IPv4
• IPv6
• 6LoWPAN
IP protocol to the low power devices having
limited processing capability
Operates in 2.4 GHz frequency range
Provides data transfer rates of 250 Kb/s
works with 802.15.4 link layer
Transport Layer
• End to end message transfer capability
independent of underlying network
• Message transfer capability- using
handshakes/acknowledgement (TCP) or
without handshakes/acknowledgements(UDP)
• Error control, segmentation, flow control and
congestion control
1. TCP
• Most widely used- web browsers, HTTP,
HTTPS, SMTP, FTP
• Connection Oriented and stateful
• Ensures reliable transmission of packets in-
order
• Error control – duplicate packets discarded,
lost packets retransmitted
• Flow control- rate of sender and rate of
receiver
• Congestion control- avoiding network
congestion and degradation of network
performace.
2.UDP
• Requires carrying initial set-up
• Connectionless, unreliable, stateless
• Time sensitive applications- very small data
units to exchange and don’t want overhead
of connection setup
• No guaranteed delivery, ordering of
messages and duplicate elimination
Application Layer
• Defines how applications interface with the
lower layer protocols to send data over
network.
• Application data in files encoded by application
layer and encapsulated in transport layer
protocol which connection/transaction oriented
communication over network.
• Port numbers are used for application
addressing (port 80- HTTO, port 22-SSH etc)
1. HTTP
• Foundation of WWW
• Commands- GET, PUT, POST, DELETE, HEAD,
TRACE, OPTIONS
• Based on Request-Response model (client
sends requests to server using HTTP
commands)
• Stateless protocol, each request independent
of another
• HTTP client can be a browser or an application
running on client.
• Uses Universal Resource Identifiers (URIs) to
identify HTTP resources
2. CoAP (Constrained Application Protocol)
• Application layer protocol for machine to
machine applications with constrained
environment (devices, network)
• Like HTTP web transfer protocol and follows
request-response model
• Runs on top of UDP
3. WebSocket
• Allows full-duplex communication over a
single socket connection for sending
messages between client and server
• Based on TCP
• Allows streams of messages to be sent back
and forth between client and server while
keeping TCP connection open.
4. MQTT (Message Queue Telemetry Transport)
• Light weight messaging protocol based on
publish-subscribe model
• Client-server architecture where client(IoT
device) connects to server(MQTT broker) and
publishes messages to topics on the server
• The broker forwards the messages to clients
subscribed to topics
• Well suited for constrained environments with
devices having limited processing and memory
resources and network bandwidth is low.
5. XMPP (Extensible Messaging and Presence Protocol)
• Real time communication- messaging, data
syndication, gaming, multi-party chat, voice and
video calls
• Allows sending small chunks of XML data from
one network entity to another in real time
• Decentralized protocol and uses client-server
architecture
• Communication path- client-server and server-
server
6. DDS(Data Distribution Server)
• Data centric middleware standard for device-to-
device communication
• Publish-subscribe model where publishers
(devices that generate data) create topics to
which subscribers (devices that consume data)
can subscribe.
• Publisher is an object responsible for data
distribution and subscriber object for receiving
published data.
7. AMQP (Advanced Message Queuing Protocol)
• Used for business messaging
• Supports both point to point and publish/subscribe
model, routing and queuing
• AMQP brokers receive messages from publishers
and route them over connections to consumers
(devices that process data)
• Publishers publish the messages to exchanges
which then distribute message copies to queues
• Messages are delivered by the broker to the
consumers which have subscribed to the
queues or consumers can pull messages from
queues
Logical Design of IoT
• Logical design of IoT system refers to an
abstract representation of the entities and
processes without going into the low-level
specifications.
1. IoT Functional Blocks
2. IoT Communication Models
3. IoT Communication APIs
IoT Functional Blocks
IoT Functional Blocks
• Capabilities for identification, sensing, actuation, communication
and management
1. Device-
• IoT devices that provide sensing, actuation, monitoring and
control functions
2. Communication-
• Protocols
3. Services-
• Device monitoring, device control, data publishing, device
discovery
4. Management-
• Overall management of IoT system
5. Security
• Authentication, authorization, message/content integrity, data
security
6. Applications
IoT Communication Models
• Request-Response

• Publish-Subscribe

• Push-Pull

• Exclusive Pair
Request-Response
• Client-Server communication
• When server receives request, it decides how
to respond, fetches data, retrieves resource
representations, prepares the response and
sends to the client
• Stateless communication model (each
request-response is independent of others)
Request-Response Communication
Model
Publish-Subscribe
• Communication model that involves publishers,
brokers and consumers
• Publishers- source of data
• Publishers send data to topics which are
managed by broker (publishers not aware of
consumers)
• Consumers subscribe to topics which are
managed by broker
• When broker receives data for a topic from the
publisher, it sends the data to all the subscribed
consumers
Publish-Subscribe Communication
Model
Push-Pull
• Data producers push data to queue and
consumers pull data from queue
• Producers not aware of consumers
• Queues also act as buffer which helps in
situations when there is mismatch between
rate at which producers push and consumers
pull.
Exclusive pair
• Bi-directional , full duplex communication model
• Persistent connection between client and server
• Connection remains open until client sends
request to close the connection
• Client-server can communicate once connection
setup is done.
• Stateful communication model and server is
aware of all open connections
IoT Communication APIs
• REST based Communication APIs

• WebSocket-based communication APIs


REST based communication APIs
• Representational State Transfer (REST) – set of
architectural principles to design web services and web
APIs that focus on system’s resources and how
resources are addressed and transferred.
1. Client-Server
• Separation of concern- for example, client should not
be concerned with the storage of data at server side
• Server need not worry about user interface
• Separation allows independent development and
updation of client and server
Communication with REST APIs
2. Stateless
• Each request from client to server must contain all the
information necessary to understand the request and
can not take advantage of any stored context on the
server.
3. Cache-able
• Data within response to a request must be labeled as
cache-able or non-cache-able
• For cache-able response, client cache is given the
right to reuse that response for later requests.
• Improve efficiency, server interactions minimized
4. Layered System
• Ensures that each component can not see
beyond immediate layer with which they are
interacting.
• Example, client can not tell whether it is
connected directly to end server
• System scalability can be improved by
allowing intermediaries to respond to
requests instead of end server.
5. Uniform Interface
• Communication method between client and
server must be uniform
6. Code on demand
• Servers can provide executable code or
scripts for clients to execute in their context.
WebSocket based Communication API
• Allow bidirectional, full duplex communication between
clients and servers
• Follows exclusive pair communication model
• Do not require a new connection to be set up for each
message to be sent
• WebSocket communication begins with a connection setup
request sent by client to server
• This request is (WebSocket handshake request)
is sent over HTTP and the server interprets it as an upgrade
request.
• If server supports WebSocket protocol, it responds with
WebSocket handshake response.
• Once connection is setup, the client and
server can send data to each other in full
duplex mode.
• WebSocket API reduces the network traffic
and latency as there is no overhead of
connection setup and termination requests for
each message.
• Suitable for IoT applications
Exclusive pair model used by
WebSocket API
IoT Enabling technologies
• Wireless sensor networks
• Cloud Computing
• Big data analytics
• Communication protocols
• Embedded Systems
IoT levels and deployment templates
• IoT Level 1
• IoT Level 2
• IoT Level 3
• IoT Level 4
• IoT Level 5
• IoT Level 6
IoT Level 1
• L1 IoT system has a single node/device that
performs sensing and/or actuation, stores
data and hosts the application
• Suitable for modeling low cost and low
complexity solution where data involved is not
big and analysis requirements are
computationally inexpensive
L1 IoT system for Home Automation
• System with single node that allows controlling the lights
and appliances in a home remotely
• Device used interfaces with lights and appliances using
electronic relay switches
• The status information of each light or appliance is
maintained in a local database
• REST services deployed locally allow retrieving and
updating state of each light and triggers the relay switches
accordingly.
• Application deployed locally has an user interface for
controlling the lights or appliances
• With internet connectivity application can be accessed
remotely as well.
IoT Level 1
IoT Level 2
• Single node that performs sensing and/or
actuation and local analysis
• Data is stored on the cloud and application is
usually cloud based
• Suitable for solutions which involve big data
but primary analysis requirement is not
computationally intensive and can be done
locally.
L2 IoT system for Smart Irrigation
• System consists of a single node that monitors
the soil moisture level and controls the irrigation
system
• Device used in this system collects moisture data
from sensors
• Controller service continuously monitors the
moisture levels
• If moisture level drops below a threshold,
irrigation system turns on
• Actuators like solenoid valves can be used
• The controller also sends the moisture data to
computing cloud
• A cloud based application is used for
visualizing the moisture levels over a period of
time, which can help in making decisions
about irrigation schedules
IoT level 3
• Single node
• Data is stored and analyzed in the cloud
• Suitable for solutions where big data is
involved and analysis requirements are
computationally intensive
L3 IoT system for tracking package
handling
• System consists of a single node that monitors
the vibration levels for package being shipped
• Devices used accelerometer and gyroscope
sensors for monitoring vibration levels.
• The controller service sends the sensor data to
cloud in real time using a WebSocket service
• Data is stored in the cloud and visualized using
cloud based application
• Analysis components in the cloud can trigger
alerts if the vibration levels become greater
than threshold.
• The benefit of using WebSocket is that, the
sensor data can be sent in real time to the
cloud
IoT level-4
• L4 IoT system has multiple nodes that perform local
analysis
• Data is stored in the cloud and application is cloud based
• L4 contains local and cloud based observer nodes which
can subscribe to and receive information collected in the
cloud from IoT devices
• Observer nodes can process information which can be used
for applications
• They do not perform any control operation
• Suitable for solutions with multiple node requirement, big
data and analysis requirements are computationally
intensive
L4 IoT system for noise monitoring
• The system consists of multiple nodes placed in
different locations for monitoring noise levels in an
area.
• Nodes in this example are equipped with sound
sensors
• Nodes are independent of each other and run own
controller service that sends the data to the cloud.
• Data is stored in a cloud database and analysis of data
collected from number of nodes is done in cloud.
• Data visualization
IoT level 5
• L5 IoT system has multiple end nodes and one
coordinator node
• End node performs sensing and/or actuation
• Coordinator node collects data from the end
nodes and sends to the cloud
• Data is stored and analyzed in the cloud and
application is cloud based
• Suitable for solutions based on wireless sensor
networks with big data and analytics is
computationally intensive.
L5 IoT system for forest fire detection
• The system consists of multiple nodes placed
in different locations for monitoring
temperature, humidity and CO2 levels in
forest
• End nodes are equipped with various sensors
• Coordinator node collects the data from the
end nodes and acts as a gateway for internet
connectivity
• Nodes are independent of each other and run
own controller service that sends the data to the
cloud.
• Data is stored in a cloud database and analysis of
data collected from number of nodes is done in
cloud.
• Data visualization and prediction
• Suitable for solutions based on wireless sensor
networks with big data and analytics is
computationally intensive.
IoT Level 6
• L6 has multiple independent end nodes that
perform sensing and/or actuation and send
data to cloud
• Data is stored in the cloud
• Analytics component analyzes data and stores
the results in the cloud database.
• The centralized controller is aware of the
status of all the end nodes and sends control
commands to nodes.
L6 IoT System for weather monitoring
• The system consists of multiple nodes placed in
different locations for monitoring temperature,
humidity and pressure in an area.
• End nodes are equipped with sensors, they
collect data and send to cloud in real time using
WebSocket service
• Data is stored in cloud database and analysis of
data in cloud to make predictions
• Visualization

You might also like