r22 Iot Unit-1 Notes
r22 Iot Unit-1 Notes
r22 Iot Unit-1 Notes
Things
Basically, Things refers to IoT Devices, in which every device has a unique
identity that can perform remote sensing, actuating and monitoring
capabilities/work.
Ex; combination of sensors, actuators, Arduino, relay, non-IOT devices.
IoT devices can:
Share/ Exchangedata with other connected devices and applications
(directlyorindirectly), or
Collectdata from other devices and process the data locally or
Send the data to centralized servers or cloud-based
applicationforprocessing the data, or
Perform some tasks locally and other tasks within the IoT
infrastructure,based on temporal and space constraints (space memory,
processing capabilities, communication latencies (whenever you have
given input to the system and the total time period it takes to give
output so that particular time period/interval is known as latency) and
speeds, and deadlines).
These devices generate data in some forms or the other which when
processed by data analytics systems leads to useful information to guide
further actions locally or remotely.
For example, Temperature datagenerated by a Temperature Sensor in
Home or other place, when processed can help in determining
temperature and take action according to users.
IOT devices can be of varied types,
Some of the examples of IoT devices are:
Home appliances: smart TV, smart refrigerator, smart AC, etc.
Smart phones and computers
Wearables: smart watch, smart sensors, etc.
Automobiles like self-driving cars
Energy systems
Retail: smart payment
Printers
Industrial machines
Healthcare: smart watch, smart healthcare, etc.
Surveillance: smart cameras, smart trackers, etc.
Abbreviations
USB – Universal Serial Bus
HDMI – High Definition Multimedia Interface
RCA – Radio Corporation of America
3.5 mm – audio jack with headphone adapter
DDR – Double Data Rate
GPU – Graphics Processing Unit
SD – Secure Digital
MMC – Multi Media Card
SDIO – Secure Digital Input Output
UART – Universal Asynchronous Receiver Transmitter
SPI – Serial Peripheral Interface
I2C – Inter Integrated Circuit
CAN – Controller Area Network (used for microcontroller and devices
to communicate)
IoT Protocols
In simpler terms, IoT protocols are a number of procedures or sets of
rules that decides how data will be transmitted between two devices
These protocols are used to establish communication between a node
device and a server over the internet. it helps to send commands to an
IoT device and receive data from an IoT device over the internet.
An overview of different protocols used in IoT with respect to TCP/IP
protocol stack is given below:
Link Layer
Link layer protocols determine how data is physically sent over the
network’s physical layer or medium (Ex; Copper Wire, Coaxial cable
or radio wave).
They also determine how devices signal and code packets on the
network.
The packets or datagrams travel through these links. The link layer
also defines the format of packet that is to be communicated across
the link and is responsible for physical addressing.
Protocols generally used at this layer are Ethernet, Wi-Fi, WiMax, LR-
WPAN, cellular technologies, etc.
802.3 – Ethernet:
IEEE 802.3 is a collection of Ehternet standards (wireless local area
network) communication standards (Ex. 802.11a, 802.11b, 802.11g,
802.11n, 802.11ac, 802.11ad).
802.11 – Wi-Fi:
IEEE 802.11 is a collection of WLANs (wireless local area network)
communication standards (Ex. 802.11a, 802.11b, 802.11g, 802.11n,
802.11ac, 802.11ad).
802.16 – Wi-Max:
IEEE 802.16 is a collection of wireless broadband standards (or) The
standard for WiMAX technology is a standard for Wireless Metropolitan
Area Networks (WMANs).
The recent update (802.16m) provides data rates of 100 Mbps for
mobile stations and 1 Gbps for fixed stations.
802.15.4 -LR-WPAN:
A collection of standards for Low-rate wireless personal area network.
These standards form the basis of network specifications for high level
communication protocols such as Zigbee
The standards provide low-cost and low-speed communication for
power constrained devices.
2G/3G/4G- Mobile Communication:
These are different types of telecommunication generations (2G
including GSM and CDMA, 3G – including UMTS and CDMA2000, 4G-
including LTE).
GSM – Global System for Mobile communication
CDMA - Code Division Multiple Access
UMTS - Universal Mobile Telecommunications System
LTE - Long Term Evolution
IoT devices are based on these standards can communicate over the
cellular networks.
Network Layer
Responsible for sending of IP datagrams from the source network to the
destination network.
Network layer performs the host addressing and packet routing.
The datagram contains the source and destination addresses, which are
used to route them from source to destination across multiple networks.
Host identificationhierarchical IP addressing schemes such asIPv4 and
IPv6.
IPv4:
Internet protocol version 4 is the most deployed internet protocol that is
used to identify the devices (by assigning the numeric label to each
device) on a network using hierarchical addressing scheme (The IPv4
addressing hierarchy includes network, subnet, and host components in
an IPv4 address).
IPv4 uses a 32-bit address scheme that allows total of 2^32 or
4,294,967,296 (approx. > 4 billion) addresses.
The IP protocols establish connections on packet networks, but do not
guarantee delivery of packets.
Guaranteed delivery and data integrity are handled by the upper layer
protocols such as TCP.
IPv6:
Is the newest version of internet protocol and successor to IPv4.
IPv6 was developed by the Internet Engineering Task Force (IETF) to deal
with the long-anticipated problem of IPv4 address exhaustion.
IPv6 uses a 128-bit address, theoretically allowing 2128, or
approximately 3.4×1038 addresses.
6LoWPAN:
It is an acronym of IPv6 over Low-Power Wireless Personal Area
Networks.
This protocol allows for the smallest devices with limited processing
ability to transmit information wirelessly using an internet protocol.
6LoWPAN work with 802.15.4 link layer protocol and define
compression mechanisms for IPv6 datagrams.
Transport Layer
this layer protocols provide end-to-end this layer protocols provide end-
to-end message transfer capability independent of the underlying
network.
The message transfer capability can be set up on connections, either
using handshakes (as in TCP) or without handshakes /
acknowledgements (as in UDP).
This layer provides functions such as error control, segmentation, flow
control and congestion control.
TCP:
Transmission Control Protocol (TCP) is the most widely used transport
layer protocol, that is used by web browsers (along with HTTP, HTTPS
application layer protocols), email programs (SMTP application layer
protocol) and file transfer (FTP).
TCP is a connection oriented and stateful protocol.
While IP protocol deals with sending packets, TCP ensures reliable
transmission of packets in-order.
TCP also provides error detection capability, so that duplicate packets
can be discarded and lost packets are retransmitted.
The flow control capability of TCP ensures that rate at which the sender
sends the data is not too high for the receiver to process.
The congestion control capability of TCP helps in avoiding network
congestion and congestion collapse which can lead to degradation of
network performance.
UDP:
Unlike TCP, it is unreliable and connectionless protocol. So, there is no
need to establish connection prior to data transfer.
UDP is useful for time sensitive applications that have very small data
units to exchange and do not want the overhead of connection setup.
UDP is a transaction oriented and stateless protocol.
UDP does not provide guaranteed delivery, ordering of messages and
duplicate elimination.
Application Layer
Communication Models in IoT (Internet of Things)
IoT devices are found everywhere and will enable circulatory intelligence
in the future.
For operational perception, it is important and useful to understand how
various IoT devices communicate with each other.
Communication models used in IoT have great value. The IoTs allow
people and things to be connected any time, any space, with anything
and anyone, using any network and any service.
2. Publisher-Subscriber Model
3 Push-Pull Models
There are three basic elements also in Push-Pull Model as given below
4. Exclusive Pair
It is a bi-directional (full duplex) communication model among client and
server.
The connection is constant and remains open till the client sends a
request to close the connection.
The Server has the record of all the connections which has been opened.
This is a state-full connection model.
Web Socket based communication API is fully based on this model.
IoT Communication APIs
What are APIs?
1) Client-server
The principle behind the client-server constraint is the separation of
concerns.
For example, the client should not be concerned with the storage of data
which is a concern of the server; similarly, the server should not be
concerned about the user interface, which is the concern of the client.
Separation makes it possible for the client and server to be developed
and updated independently.
2) Stateless
Each request from client to server must contain all the information
necessary to understand the request, and cannot take advantage of any
stored context on the server.
So the status of the session remains entirely on the client.
3) Cache-able
This property defines whether the response to any request can be
cached or not. If a response can be cached, then a client cache is granted
the right to reuse that response data for subsequent matching requests.
4) Layered system
A layered system defines the boundaries of the components within each
specific layer. For example, a client is unable to tell whether it is
connected to the end server or an intermediate node.
5) Uniform interface
This specifies that the technique/method of communication between a
client and a server must be uniform throughout the communication
period.
6) Code on Demand (Optional Constraint)
Servers may provide executable code or scripts for execution by clients
in their context.