Session 5 IoT Protocols and Architecture
Session 5 IoT Protocols and Architecture
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.
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