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

IoT Module 1

The document provides an overview of the Internet of Things (IoT), detailing its characteristics, including connectivity, sensors, actuators, data processing, and security. It explains the physical design of IoT devices, communication protocols, and models such as client-server and publisher-subscriber. Additionally, it discusses REST and WebSocket APIs for facilitating communication between software applications in IoT systems.

Uploaded by

bharathsekar9009
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)
7 views

IoT Module 1

The document provides an overview of the Internet of Things (IoT), detailing its characteristics, including connectivity, sensors, actuators, data processing, and security. It explains the physical design of IoT devices, communication protocols, and models such as client-server and publisher-subscriber. Additionally, it discusses REST and WebSocket APIs for facilitating communication between software applications in IoT systems.

Uploaded by

bharathsekar9009
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/ 35

DAYANANDA SAGAR

UNIVERSITY
DEPARTMENT OF COMPUTER APPLICATIONS

INTERNET OF THINGS(IOT)(23CA2410)
MODULE -1 (INTRODUCTION TO IOT)
INTERNET OF THINGS
The Internet of Things (IoT) is a network of interconnected devices equipped with sensors and
software that enable them to collect, exchange, and utilize data over the internet
CHARACTERISTICS OF IOT
1.Connectivity-
▪ IoT devices are connected to the internet or local networks through various communication protocols such as Wi-Fi,
Bluetooth, Zigbee, LoRa, and cellular networks (4G, 5G).
2.Sensors and Actuators-
▪ sensors collect real-world data (e.g., temperature, motion).
▪ Actuators take actions based on sensor data (e.g., turning on a fan).
3.Data Processing-
▪ IoT systems process sensor data for meaningful insights.
▪ Edge computing reduces latency, while cloud computing enables large-scale analysis.
4.Interoperability-
▪ Devices must communicate using common protocols like MQTT, CoAP, or HTTP.
▪ Ensures seamless integration of different IoT systems.
5.Security-
▪ Protects IoT devices and data from cyber threats.
▪ Includes encryption, authentication, and access control.
6.Scalability-
▪ IoT networks support many devices without performance loss.
▪ Cloud platforms help manage large-scale deployments.
7. Remote Monitoring and Control-
▪ Users can monitor and control devices from anywhere.
▪ Example: Smart home apps controlling lights and security cameras.
8.Real-time Capabilities-
▪ IoT enables immediate data collection and response.
▪ Used in applications like healthcare monitoring and industrial automation.
9.Energy Efficiency-
▪ Low-power IoT devices optimize energy consumption.
▪ Essential for battery-powered sensors in remote locations.
10.Data Analytics and Insights-
▪ AI and machine learning analyze IoT data to improve efficiency.
▪ Example: Predictive maintenance in industrial machinery.
SENSORS
▪ A sensor is a device that detects changes and events in a physical environment.
▪ It may convert physical parameters like humidity, pressure, temperature, heat, motion, etc., into
electrical signals.
FEATURES OF SENSORS
There are various features of Sensors. Some main features of Sensors are as follows:
1. A sensor could be either active or passive. Active sensors necessitate a power source, but passive
doesn't necessitate a power source.
2. It is a device that monitors and measures changes in the environment.
3. It is responsible for converting physical quantities into electrical signals.
4. It is connected to a system's input.
5. It generates an electrical signal as its output.
ACTUATOR
▪ A device that changes electrical signals into mechanical work is known as an actuator. It is used to
cause movement or a change in the surroundings
▪ Actuators are connected to a system's output. It receives an electrical signal as input and produces
mechanical movement as output. It receives input or instruction from a system or a signal
conditioning device and outputs it to the environment
FEATURES OF ACTUATORS
There are various features of Actuators. Some main features of Actuators are as follows:
1. The actuator assists in managing the environment based on sensor readings.
2. A device that converts electrical signals into mechanical movement is known as an actuator.
3. It requires an additional power source to function.
4. It receives an electrical signal as input.
5. It is connected to a system's output.
6. It produces mechanical work.
DIFFERENCE BETWEEN SENSORS
AND ACTUATORS
PHYSICAL DESIGN
1. Connectivity:
1. Devices in IoT need to communicate with each other and external networks.
2. Examples: USB Host, RJ45/Ethernet (for wired communication).
3. Wireless options: Wi-Fi, Bluetooth, Zigbee, and LoRaWAN (not shown in the image).
2. Processor:
1. The CPU (Central Processing Unit) is the brain of an IoT device, handling computations, decision-making, and data processing.
3. Audio/Video Interfaces:
1. Used in IoT applications that require multimedia processing.
2. Examples: HDMI, 3.5mm audio, RCA video for transmitting sound and video data.
4. Memory:
1. Stores firmware, application code, and sensor data.
2. Types: NAND/NOR flash memory (for firmware storage), DDR1/2/3 RAM (for fast data processing).
5. Graphics Processing:
1. Some IoT devices use GPU (Graphics Processing Unit) for handling images, videos, and graphical content.
2. Example: Smart home dashboards or IoT-enabled surveillance cameras.
6. Storage Interfaces:
1. Used to store large amounts of IoT data.
2. Examples: SD cards, MMC, SDIO (commonly used in embedded systems).
7. I/O Interfaces (for Sensors & Actuators):
1. Enable communication between the processor and external components.
2. Examples:
1. UART (Universal Asynchronous Receiver-Transmitter): Serial communication interface.
2. SPI (Serial Peripheral Interface): High-speed data transfer for sensors and storage.
3. I2C (Inter-Integrated Circuit): Used for low-speed communication with multiple devices.
4. CAN (Controller Area Network): Used in automotive IoT systems.
Example of IoT Physical Design: Smart Home Automation System
Scenario: A smart home system controls lighting, temperature, and security using IoT devices.
Physical Components:
1. Sensors:
1. Temperature sensor (DHT11) for monitoring room temperature.
2. Motion sensor (PIR) for detecting movement.
2. Processor:
1. Microcontroller (ESP32, Raspberry Pi, or Arduino) to process sensor data.
3. Connectivity:
1. Wi-Fi module (ESP8266) for cloud communication.
4. Actuators:
1. Relays to turn lights and fans on/off.
2. Motors to automate door locks.
5. Storage & Memory:
1. SD card to log temperature readings.
6. I/O Interfaces:
1. I2C for connecting multiple sensors.
2. UART for debugging and serial communication.
IOT PROTOCOL

Data Link
Layer Network Transport Application
Protocols Layer Layer Layer
Ethernet, Wi-Fi, Protocols Protocols Protocols
WiMAX, IPv4 ,IPv6, TCP HTTP , CoAP,
LR-WPAN,
cellular 6LoWPAN. UDP MQTT , XMPP
technologies.
Data link layer Network Layer
Link-layer protocols are used to send data over the This layer is used to send datagrams from the source
network’s physical layer. it also determines how the network to the destination network. we use IPv4 and
packets are coded and signaled by the devices. IPv6 protocols as host identification that transfers data
in packets.

Ethernet
It is a set of technologies and protocols that are IPv4
used primarily in LANs. it defines the physical This is a protocol address that is a unique and
layer and the medium access control for wired numerical label assigned to each device connected to
ethernet networks. the network. an IP address performs two main
functions host and location addressing. IPv4 is an IP
address that is 32-bit long.
Wi-Fi
It is a set of LAN protocols and specifies the set of
media access control and physical layer protocols IPv6
for implementing wireless local area networks. 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.
Transport Layer protocol Application Layer protocol
This layer is used to control the flow of data In this layer, protocols define how the data can be
segments and handle error control. also, these layer sent over the network with the lower layer protocols
protocols provide end-to-end message transfer using the application interface. these protocols
capability independent of the underlying network. include HTTP, WebSocket, XMPP, MQTT, DDS,
and AMQP protocols.
HTTP
TCP
Hypertext transfer protocol is a protocol that presents
The transmission control protocol is a protocol that an application layer for transmitting media
defines how to establish and maintain a network documents. it is used to communicate between web
that can exchange data in a proper manner using the browsers and servers. it makes a request to a server
internet protocol. and then waits till it receives a response and in
between the request server does not keep any data
UDP between the two requests.
a user datagram protocol is part of an internet WebSocket
protocol called the connectionless protocol. this
protocol is not required to establish the connection This protocol enables two-way communication
to transfer data 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.

MQTT
It is a machine-to-machine connectivity protocol that was
designed as a publish/subscribe messaging transport. and it
is used for remote locations where a small code footprint is
required
COMMUNICATION MODELS
1. Client server model

∙ This model follows a client-server architecture.


∙ The client, when required, requests the information from
the server. This request is usually in the encoded format.
∙ This model is stateless since the data between the requests
is not retained and each request is independently handled.
∙ The server Categories the request, and fetches the data
from the database and its resource representation. This
data is converted to response and is transferred in an
encoded format to the client. The client, in turn, receives
the response.
∙ On the other hand — In Request-Response communication
model client sends a request to the server and the server
responds to the request. When the server receives the
request, it decides how to respond, fetches the data
retrieves resources, and prepares the response, and sends
it to the client.
2. Publisher –subscriber model

This model comprises three entities: Publishers, Brokers, and


Consumers.
∙ Publishers are the source of data. It sends the data to the
topic which are managed by the broker. They are not aware
of consumers.
∙ Consumers subscribe to the topics which are managed by
the broker.
∙ Hence, Brokers responsibility is to accept data from
publishers and send it to the appropriate consumers. The
broker only has the information regarding the consumer to
which a particular topic belongs to which the publisher is
unaware of.
3. Push-pull Model

The push-pull model constitutes data publishers, data


consumers, and data queues.
∙ Publishers and Consumers are not aware of each other.
∙ Publishers publish the message/data and push it into the
queue. The consumers, present on the other side, pull the
data out of the queue. Thus, the queue acts as the buffer
for the message when the difference occurs in the rate of
push or pull of data on the side of a publisher and
consumer.
∙ Queues help in decoupling the messaging between the
producer and consumer. Queues also act as a buffer which
helps in situations where there is a mismatch between the
rate at which the producers push the data and consumers
pull the data.
4. Exclusive pair model

∙ Exclusive Pair is the bi-directional model, including


full-duplex communication 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 and the server is aware
of all open connections.
∙ WebSocket based communication API is fully based on this
model.
COMMUNICATION APIs
An API, or Application Programming Interface, is a set of rules, protocols, and tools that allows
different software applications to communicate with each other. A communication API
specifically refers to an API designed to facilitate communication between different software
systems, applications, or services.
They serve as a bridge between different software components, enabling them to share
information and functionality.
REST API
▪ Representational State Transfer (REST) is a set of
architectural principles by which we can design web
services and web APIs that focus on a system’s
resources and how resource states are addressed and
transferred
▪ REST APIs follow request-response model. REST
architectural constraints apply to components,
connectors, and data elements within a system.
REST ARCHITECTURE EXPLANATION

1. HTTP Client :

This is the entity (could be a web browser, a mobile app, another service, or an IoT device) that initiates communication with the server.

"REST-Aware HTTP Client" indicates that this client is designed to interact with RESTful web services, meaning it understands and utilizes the
principles of REST architecture (like using specific HTTP methods).

2. HTTP Packet :

This represents the data package sent by the client to the server. It contains:

▪ HTTP Command: This specifies the action the client wants to perform on a resource. The image lists the common HTTP methods:

❑ GET: Retrieves a resource.

❑ PUT: Updates an existing resource.

❑ POST: Creates a new resource.

❑ DELETE: Removes a resource

REST Payload: This is the actual data being sent along with the HTTP command. It's often formatted in:

❑ JSON (JavaScript Object Notation): A lightweight, human-readable format for data exchange.

❑ XML (Extensible Markup Language): Another format for structured data, often used in more complex scenarios.
3. HTTP Server :

∙ This is the entity that hosts the resources and responds to the client's requests.

∙ "Authorization" indicates that the server might require authentication and authorization to ensure only
legitimate clients can access or modify resources.

∙ "REST-ful Web Service" indicates that the server is designed to provide access to resources following the
principles of REST.

4. Resources :

∙ This section represents the core of the RESTful architecture: the resources being accessed and manipulated.

∙ URI (Uniform Resource Identifier): This is like the address of the resource. Each resource has a unique URI,
allowing the client to identify it specifically.

∙ Representations: Resources can have different representations (e.g., different formats like JSON or XML, or
different versions). The server can provide the representation that best suits the client's needs.

∙ Resource: This is the actual data or entity being represented.


Interaction Flow:
1. The HTTP Client sends an HTTP Packet to the HTTP Server.
2. This packet includes an HTTP Command (e.g., GET, POST, PUT, DELETE) and, optionally, a REST Payload (e.g.,
data in JSON or XML format).
3. The HTTP Server, after potentially verifying authorization, processes the request and interacts with the Resources
based on the HTTP Command and URI.
4. The HTTP Server sends a response back to the HTTP Client, which may include the requested resource (in a specific
representation) or a confirmation of the action performed.
FEATURES OF REST API:

• Client-Server Architecture: The fundamental separation between the client


requesting resources and the server providing them.
• Statelessness: Each request from the client to the server is treated as
independent. The server doesn't retain client context between requests.
• Resource Identification: URIs are used to uniquely identify each resource.
• Uniform Interface: HTTP methods (GET, POST, PUT, DELETE) provide a
consistent way to interact with resources.
• Representations: Resources can be represented in various formats, allowing
flexibility for different clients.
WEB SOCKET API
▪ WebSocket-based API creates full-duplex
communication between clients and servers. It
follows exclusive Web pair communication
model. WebSocket-based communication is
stateful.
▪ No need to establish connection for each
request. It is suitable for IoT applications that
need low latency.
▪ Initial Handshake (HTTP Upgrade):
"Request to setup WebSocket Connection": The client initiates the process by sending a special HTTP request to the
server. This request isn't a regular HTTP GET or POST; it's an "Upgrade" request.
It essentially asks the server to switch from the HTTP protocol to the WebSocket protocol.
This request includes specific headers to indicate the WebSocket version and other relevant information.
"Response accepting the request": If the server supports WebSocket and agrees to the connection, it sends back a special
HTTP response
This response confirms the "upgrade" and establishes the WebSocket connection. This initial handshake uses HTTP but
after this, the communication switches to the WebSocket protocol.
▪ Bidirectional Communication (Over Persistent WebSocket Connection):
"Data frame": Once the WebSocket connection is established, the client and server can send data to each other in the form
of "frames."
These frames contain the actual data being transmitted. The key here is that this communication is bidirectional and
persistent.
Unlike traditional HTTP, where the client always initiates the request, with WebSocket, the server can also send data to the
client without waiting for a request. This is what enables real-time updates.
▪ Closing Connection:
"Connection close request": Either the client or the server can initiate the closure of the WebSocket connection by
sending a "close frame.“
"Connection close response": The other party responds with a "close frame" to acknowledge the closure request. After
this, the WebSocket connection is terminated
IOT ENABLED TECHNOLOGIES
1. Wireless Sensor Network (WSN)
▪ A Wireless Sensor Network (WSN) comprises many sensor nodes, each of
which has sensors that can identify a wide range of physical phenomena,
including pressure, heat, light, and more. With the rapid technical
advancement of sensors, WSNs will become the core technology for IoT.
▪ These sensors may capture a wide range of information, from location data to
device orientation. Together, these sensors provide a considerable amount of
data, both unstructured (such as images and movies) and organized (like GPS
coordinates or acceleration readings).
▪ Nodes collect data from their sensors, process it locally (sometimes), and then
transmit it wirelessly to a central collection point (a "sink" or "gateway"). The
data is then relayed to a base station or the cloud for further analysis. WSNs
often use mesh networking, where nodes can act as routers to forward data
from other nodes, extending the network's range.
▪ Example: weather monitoring system, soil moisture monitoring system
2. Cloud Computing
▪ It provides us the means by which we can access applications as utilities over the
internet.
With Cloud computing, users can access any resources from anywhere like databases,
webservers, storage, any device, and any software over the internet.
▪ The cloud computing industry is dominated by Amazon web services(AWS), which
provides a wide range of dependable, scalable, and affordable cloud computing
services.
Service Models:
▪ Infrastructure as a Service (IaaS): Provides access to computing resources like virtual
machines, storage, and networks.
▪ Platform as a Service (PaaS): Provides a platform for developing, deploying, and
managing applications.
▪ Software as a Service (SaaS): Provides access to software applications over the
internet.

Data storage, application hosting, analytics platforms.


3. Embedded Systems
▪ Embedded Systems such as microcontrollers and other hardware components, are
critical in processing sensor data. The information gathered by these sensors isn't
immediately usable. Instead, the embedded system intervenes to make it useful.
▪ Example: digital watch, vending machine
IOT SYSTEM MANAGEMENT
IoT system management involves overseeing the configuration, monitoring, and
maintenance of IoT devices and networks to ensure optimal performance and security.
It includes tasks such as remote device provisioning, firmware updates, data
monitoring, and troubleshooting.
IOT SYSTEM MANAGEMENT WITH
NETCONF- YANG
NETCONF (Network Configuration Protocol):
• NETCONF is a standardized network management protocol designed for configuring
network devices and retrieving operational data. It provides a secure and reliable
mechanism for communication between a client (typically a network management
system) and a NETCONF server (a network device).
• NETCONF operates over a secure transport layer such as SSH (Secure Shell) or TLS
(Transport Layer Security), ensuring confidentiality and integrity of communications.
• It uses XML (extensible Markup Language) to encode configuration data and
operations. Clients can use NETCONF to remotely modify device configurations,
retrieve operational data, and manage device state.
▪ Secure Transport Layer: This layer is like the tunnel through which
information travels securely between your device (like a router) and the
management system (like a network administrator's computer). It
ensures that your data is protected from eavesdropping and tampering
using protocols like SSH or TLS.
▪ Message Layer: This layer acts as an envelope containing the
instructions or requests sent between your device and the management
system. These instructions could be things like "retrieve device
information" or "make this configuration change." NETCONF uses
XML (extensible Markup Language) to structure these messages so that
both devices can understand each other.
▪ Operation Layer: Inside the envelope are the specific commands or
operations that your device needs to perform. These could include things
like fetching data (<get>), updating configurations (<edit-config>), or
receiving notifications (<notification>). Each operation tells your device
what action to take in response to the management system's request.
▪ Content Layer: Finally, within each operation, there's the actual content
or data being sent or received. For example, if you're fetching device
information, the content layer would contain details like system status,
interface statistics, or hardware specifications. This layer ensures that
the information exchanged between devices is structured and
meaningful
YANG (Yet Another Next Generation):
▪ YANG is a data modeling language used to describe the hierarchical structure, data types,
relationships, and constraints of configuration and operational data within network devices.
▪ YANG models provide a standardized and vendor-neutral way to represent the configuration
and operational state of network devices. These models are defined in text files with a .yang
extension.
▪ YANG models are crucial for ensuring interoperability between different network devices and
management systems. They provide a common language for expressing device capabilities and
configuration requirements.

You might also like