1.1Unit 1 (IoT)-1 (1)
1.1Unit 1 (IoT)-1 (1)
1.1Unit 1 (IoT)-1 (1)
1. IoT Devices
⚫ Things in IoT are IoT devices.
⚫ They have unique identifiers
⚫ They perform remote sensing, actuating and monitoring.
⚫ Types of IoT devices: sensing devices, smart watches, smart electronic devices, smart industrial
machines, wearable sensors etc.
⚫ Data generated by IoT devices processed by data analytics systems leads to useful information
to guide further actions locally or remotely.
⚫ IoT devices exchange data with other connected devices & applications directly or indirectly or
collect data from other devices.
⚫ For example, Temperature data generated by a Temperature Sensor in Home or other place,
when processed can help in determining temperature and take action according to users.
i. Input/Output interface
Sensors & actuators are connected to IoT devices using this interface. To give input and output signals
to sensors, and actuators we use things like
⚫ UART (Universal Asynchronous receiver and transmitter), simplest and oldest form of device to
device digital communication.
⚫ SPI (Serial Peripheral Interface), used in short distance communication.
⚫ I2C (Inter Integrated Circuit) used in video devices like monitor, TV, VCR.
⚫ CAN (Controller Area Network), Network of independent controllers.
2. IoT Protocols
These protocols are used to establish communication between a node device and a server over the internet.
It also helps to send commands to an IoT device and receive data from an IoT device over the internet.
We use different types of protocols that are present on both the server and client-side and these protocols are
managed by network layers like application, transport, network, and link layer.
HTTP:
⚫ Hyper Text Transfer Protocol that forms foundation of WWW.
⚫ a protocol that presents in an application layer for transmitting media
documents. It is used to communicate between web browsers and servers.
⚫ HTTP follows classical client-server model.
⚫ Follow request- response model (it makes a request to a server and then
waits till it receives a response and in between the request server does not
keep any data between two requests)
⚫ Stateless protocol.
⚫ Generally, use TCP connections to communicate with server.
CoAP:
⚫ Constrained Application Protocol for machine-to-machine(M2M)
applications with constrained devices, constrained environment and
constrained n/w. Uses client-server architecture.
⚫ It enables devices to communicate over the internet.
⚫ It is used for constrained devices such as 8 bit microcontroller, low power
sensors that can’t run on HTTP.
⚫ It is simplification of HTTP protocol running on UDP instead of TCP, that
helps save bandwidth.
Compiled By: Dr. Amita Gandhi, Assistant
Professor, GVMITM, Sonipat 7
WebSocket:
● It is a low level web friendly communication mechanism (FB, messenger etc)
● allows full duplex communication i.e this protocol enables two-way communication between a client and a
host that can be run on an untrusted code in a controlled environment. this protocol is commonly used by web
browsers.
XMPP:
● Extensible Message and Presence Protocol for real time communication and streaming XML data between
network entities.
●Support client-server and server-server communication.
● It is suitable for voice/video calls, chats, messaging, gaming, multiparty chat, social networking etc.
DDS:
● Data Distribution Service is data centric middleware standards for device-to-device or machine-to-machine
communication.
● IoT protocol developed for M2M communication by object management group communication.
● Uses publish-subscribe model.
AMQP:
● Advanced Message Queuing Protocol is open standard application layer protocol for business messaging.
● Supports both point-to-point and publish-subscribe model.
Compiled By: Dr. Amita Gandhi, Assistant
Professor, GVMITM, Sonipat 8
2. Transport Layer Protocols:
This layer is used to control the flow of data segments and handle the error control. also, these layer
protocols provide end-to-end message transfer capability independent of the underlying network.
TCP
The transmission control protocol is a protocol that defines how to establish and maintain a network that can
exchange data in a proper manner using the internet protocol.
UDP
a user datagram protocol is a part of an internet protocol called the connectionless protocol. this protocol is
not required to establish the connection to transfer data.
IPv6
It is a successor of IPv4 that uses 128 bits for an IP address. it is developed by the IETF task force to deal
with long-anticipated problems.
6LOWPAN
(IPv6 over Low Power Wireless Personal Area Network) operates in 2.4 GHz frequency range and data
transfer 250 kb/s.
This protocol allows smallest devices with limited processing ability to transmit information wirelessly using
an internet protocol.
6LOWPAN can communicate with 802.15.4 devices as well as other types of devices on an IP network link
like WiFi.
2G/3G/4G-Mobile Communication
● IoT devices based on these standards can communicate over cellular networks.
● Supports data rates from 9.6kb/s(2G) to up to100Mb/s(4G).
3. Communication APIs.
APIs are used to communicate between the server and system in IoT. Some API’s
include:
REST-based communication APIs
Websocket based communication API
Cache-able –
Cache constraints requires that the data within a response to a request be implicitly
or explicitly leveled as cache-able or non cache-able.
If a response is cache-able, then a client cache is given the right to reuse that
response data for later, equivalent requests.
Layered system –
Layered system constraints, constrains the behavior of components such that each
component cannot see beyond the immediate layer with they are interacting.
For example, the client cannot tell whether it is connected directly to the end server
or to an intermediary along the way.
Code on demand –
Servers can provide executable code for clients to execute in their context.
this constraint is the only one that is optional.
A RESTful web service is a “Web API ” implemented using HTTP and
REST principles. REST is most popular IoT Communication APIs.
When a client request is made via a RESTful API, it transfers a representation of the state of
the resource to the requester or endpoint. This information, or representation, is delivered in
one of several formats via HTTP: JSON (Javascript Object Notation), HTML, Python, PHP,
or plain text. JSON is the most generally popular file format to use because, despite its name,
it’s language-agnostic, as well as readable by both humans and machines.
Compiled By: Dr. Amita Gandhi, Assistant
Professor, GVMITM, Sonipat 25
ii. Websocket-based communication APIs
WebSocket APIs allow bi-directional, full duplex communication between
clients and servers.
WebSocket APIs follow the exclusive pair communication model.
This API uses full-duplex communication so it does not require a new
connection setup every time when it requests new data.
WebSocket API begins with a connection setup between the server and client
and if the WebSocket is supported by the server then it responds back to the
client with the successful response, After the setup of a connection server and
the client can send data to each other in full-duplex mode.
This type of API reduces the traffic and latency of data (as there is no
overhead for connection setup and termination requests for each message) and
makes sure that each time when we request new data it cannot terminate the
request.
Websocket suitable for IoT applications that have low latency or high
throughput requirements.
So Web socket is most suitable IoT Communication APIs for IoT System.