Ocs352 Iot Unit 3
Ocs352 Iot Unit 3
IoT protocols
IoT devices communicate using IoT protocols. Internet protocol (IP) is a set of rules that dictates
how data gets sent to the internet. IoT protocols ensure that information from one device or
sensor gets read and understood by another device, a gateway, a service. Different IoT protocols
have been designed and optimized for different scenarios and usage.
1. IPv6
Internet Protocol version 6 (Ipv6) is the newest version of the Internet Protocol (IP),
which is the concept of communications protocol that provides an identification and location
system for computers on networks. The main purposes of an Internet Protocol are routing traffic
across the Internet, packet-switched internetworking, and allowing end-to-end datagram
transmission. IPv6 was developed to deal with the problem of IPv4 address exhaustion and is
expected to replace IPv4.
Devices with Internet connection are assigned a unique IP address, however, since the
rapid growth of the Internet in the 1990s, far more addresses than the available space of IPv4 are
needed, which ultimately lead to the development of IPv6. IPv6 also provides other technical
benefits besides a larger addressing space. Multicasting, an optional but commonly implemented
feature in IPv4, received changes and improvements in IPv6. Multicasting allows the
transmission of a single packet to numerous destinations with only one send operation.
Furthermore, the packet header in IPv6 is simpler than the IPv4 header, and therefore, the
process of packet forwarding by routers has been simplified. Other aspects including device
mobility, configuration, and security have been considered in the development and
implementation of this protocol as well.
Ipv6 is the latest version of the internet protocol. Devices that use the internet are
recognized by their own ip addresses so that internet communication can work. Ipv6 in
iot identifies these devices so that they can be located through the internet easily.
IPv4
Ipv4 has 32-bit addressing which is able to support about 4.5 billion devices. But because of the
large number of laptops, computers, smartphones, and the internet of things devices, it was
proved that more addresses are required for the devices. Ipv6 was created in 1998 which uses
128-bit addressing. It supports approximately 350 trillion devices. The addressing method
of ipv6 includes eight groups of four hexadecimal digits, while the ipv4 addresses used to have
four sets of one to three digits numbers.
Advantages Of IPv6 In The Internet Of Things
• Iot is a vast field of technology. This field includes a large number of devices and
their working is mainly focused via the internet. Ipv6 is capable of giving out
various ip addresses to these iot devices so that they can be easily recognized on
the internet and can work efficiently to transfer data from one iot device to
another.
• Ipv6 networks have auto-configuration capabilities which are quite simple and
can be managed easily in larger installations. With the help of this feature of ipv6,
configuration effort and deployment cost in the field of iot reduces drastically.
• Ipv6 is capable of sending large data packets simultaneously to conserve
bandwidth. With the help of fast transmission of data due to ipv6 in iot, devices
used in iot will also be able to interact with each other.
• Ipv6 provides far better security than ipv4. It provides confidentiality,
authenticity, and data integrity as well. This security given by ipv6 is of utmost
importance to iot because of its high dependency on network.
• Ipv6 in iot has a highly efficient multicast communication feature that eliminates
the requirement for routine broadcast messaging. This improvement helps in
preserving the battery life of iot devices by reducing the number of packets
processed.
• Ipv6 provides multiple addresses to devices. Its routing mechanism is also
distributed in a better way than ipv4. With the help of this feature, programmers
will have the liberty to assign iot end-device addresses that are consistent with
their own applications and network practices.
2. 6LoWPAN
What is 6LoWPAN?
6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks), is a low power wireless
mesh network where every node has its own IPv6 address. This allows the node to connect
6LoWPAN came to exist from the idea that the Internet Protocol could and should be applied
even to the smallest devices, and that low-power devices with limited processing capabilities
Advantages of 6LoWPAN:
• It works great with open IP standard including TCP, UDP, HTTP, COAP, MATT
and web-sockets.
• The 6LoWPAN mesh routers can route data to others nodes in the network.
• In a 6LowPAN network, leaf nodes can sleep for a long duration of time.
• It also offers thorough support for the PHY layer which gives freedom of
frequency band & physical layer, which can be used across multiple
• It is a standard: RFC6282
6LoWPAN Application Areas
With many low power wireless sensor networks and other forms of wireless networks designed
to tackle specific problems, it is essential that any new wireless system has a defined area which
it addresses. While there are many forms of wireless networks including wireless sensor
networks, 6LoWPAN addresses an area that is currently not addressed by any other system, for
example, that of using IP, and in particular IPv6 to carry the data.
The overall system is aimed at providing wireless internet connectivity at low data rates and with
a low duty cycle. However, there are many applications where 6LoWPAN is being used:
• Further security is provided by the transport layer security mechanisms. This is defined in
RFC 5246 and runs over TCP.
• For systems where UDP is used, the transport layer protocol defined under RFC 6347 can
be used.
3. MQTT protocol
Characteristics of MQTT
The MQTT has some unique features which are hardly found in other protocols. Some of the
features of an MQTT are given below:
MQTT Architecture
To understand the MQTT architecture, we first look at the components of the MQTT.
o Message
o Client
o Server or Broker
o TOPIC
Message
The message is the data that is carried out by the protocol across the network for the application.
When the message is transmitted over the network, then the message contains the following
parameters:
1. Payload data
2. Quality of Service (QoS)
3. Collection of Properties
4. Topic Name
Client
In MQTT, the subscriber and publisher are the two roles of a client. The clients subscribe to the
topics to publish and receive messages. In simple words, we can say that if any program or
device uses an MQTT, then that device is referred to as a client. A device is a client if it opens
the network connection to the server, publishes messages that other clients want to see,
subscribes to the messages that it is interested in receiving, unsubscribes to the messages that it is
not interested in receiving, and closes the network connection to the server.
In MQTT, the client performs two operations:
Publish: When the client sends the data to the server, then we call this operation as a publish.
Subscribe: When the client receives the data from the server, then we call this operation a
subscription.
Server
The device or a program that allows the client to publish the messages and subscribe to the
messages. A server accepts the network connection from the client, accepts the messages from
the client, processes the subscribe and unsubscribe requests, forwards the application messages
to the client, and closes the network connection from the client.
TOPIC
The label provided to the message is checked against the subscription known by the server is
known as TOPIC.
Architecture of MQTT
Now we will look at the architecture of MQTT. To understand it more clearly, we will look at
the example. Suppose a device has a temperature sensor and wants to send the rating to the
server or the broker. If the phone or desktop application wishes to receive this temperature value
on the other side, then there will be two things that happened. The publisher first defines the
topic; for example, the temperature then publishes the message, i.e., the temperature's value.
After publishing the message, the phone or the desktop application on the other side will
subscribe to the topic, i.e., temperature and then receive the published message, i.e., the value of
the temperature. The server or the broker's role is to deliver the published message to the phone
or the desktop application.
4. COAP Protocol
COAP is a lightweight, RESTful protocol designed specifically for the Internet of Things. COAP
is optimized for low-power devices and networks with limited resources. The COAP protocol
was designed to provide a low-overhead channel of communication that is ideal for IoT devices’
requirements for low latency, small packet sizes, and low power consumption.
COAP is based on similar principles as HTTP, but there are also some significant differences.
COAP is intended for usage on low-power, low-bandwidth, and unstable networks, such as those
present in IoT environments, in contrast to HTTP. With a number of characteristics that support
preventing unauthorized access and ensuring the privacy of communication, COAP is also
intended to be more secure than HTTP.
Features of COAP Protocol
The COAP protocol provides several benefits that make it a desirable choice for IoT
connectivity. These features include:
▪ COAP provides the ability to cache messages, reducing the number of messages
transmitted between clients and servers and improving performance.
▪ Another key feature of COAP is its support for resource discovery. This allows
devices to discover resources that are available on other devices, and to determine
the type of data that can be requested from those resources. In IoT environments,
resource discovery is crucial because it enables devices to find and communicate
with other devices even if they are not directly connected.
Advantages of COAP
The COAP protocol offers a number of advantages over other protocols, particularly in the
context of IoT:
• Low power consumption: COAP’s low overhead means that it uses less power than other
protocols, making it ideal for battery-powered IoT devices.
• Low latency: The COAP protocol is designed to have low latency, providing fast
communication between devices and the internet.
• Small packet sizes: COAP’s small packet sizes reduce the amount of data transmitted
between devices and the internet, helping to reduce network congestion and improve
performance.
• Easy integration: COAP is designed to be easily integrated into existing IoT ecosystems,
making it simple for developers to add COAP support to their devices and for existing
IoT systems to adopt COAP as their communication protocol.
• Security: COAP provides support for encryption, helping to protect against security
threats such as eavesdropping and tamperi
• Smart homes: COAP can be used to provide communication between IoT devices in a
smart home, such as smart thermostats, smart locks, and smart lighting systems.
• Industrial automation: COAP can be used in industrial automation to provide
communication between IoT devices, such as sensors and actuators.
• Finally, COAP is designed to be highly scalable. The protocol can be used in both small
and large-scale IoT networks and can support tens of thousands of devices. This
scalability is achieved through the use of a hierarchical structure, where devices can be
organized into groups and resources can be divided among different devices.
2. Active RFID –
In this device, RF tags are attached by a power supply that emits a signal and there
is an antenna which receives the data. means, active tag uses a power source like
battery. It has it’s own power source, does not require power from source/reader.
Working Principle of RFID :
Generally, RFID uses radio waves to perform AIDC function. AIDC stands for Automatic
Identification and Data Capture technology which performs object identification and collection
and mapping of the data.
An antenna is an device which converts power into radio waves which are used for
communication between reader and tag. RFID readers retrieve the information from RFID tag
which detects the tag and reads or writes the data into the tag. It may include one processor,
package, storage and transmitter and receiver unit.
Every RFID system consists of three components: a scanning antenna, a transceiver and a
transponder. When the scanning antenna and transceiver are combined, they are referred to as
an RFID reader or interrogator. There are two types of RFID readers — fixed readers and
mobile readers. The RFID reader is a network-connected device that can be portable or
permanently attached. It uses radio waves to transmit signals that activate the tag. Once
activated, the tag sends a wave back to the antenna, where it is translated into data.
The transponder is in the RFID tag itself. The read range for RFID tags varies based on factors
including the type of tag, type of reader, RFID frequency and interference in the surrounding
environment or from other RFID tags and readers. Tags that have a stronger power source also
have a longer read range.
Features of RFID :
• An RFID tag consists of two-part which is an microcircuit and an antenna.
• This tag is covered by protective material which acts as a shield against the outer
environment effect.
• This tag may active or passive in which we mainly and widely used passive RFID.
Application of RFID:
• It utilized in tracking shipping containers, trucks and railroad, cars.
• It uses in Asset tracking.
• It utilized in credit-card shaped for access application.
• It uses in Personnel tracking.
• Controlling access to restricted areas.
• It uses ID badging.
• Supply chain management.
• Counterfeit prevention (e.g., in the pharmaceutical industry).
Advantages of RFID:
• It provides data access and real-time information without taking to much time.
• RFID tags follow the instruction and store a large amount of information.
• The RFID system is non-line of sight nature of the technology.
• It improves the Efficiency, traceability of production.
• In RFID hundreds of tags read in a short time.
Disadvantages of RFID:
• It takes longer to program RFID Devices.
• RFID intercepted easily even it is Encrypted.
• In an RFID system, there are two or three layers of ordinary household foil to dam
the radio wave.
• There is privacy concern about RFID devices anybody can access information about
anything.
• Active RFID can costlier due to battery.
Applications of WSN:
1. Quality of Service
2. Security Issue
3. Energy Efficiency
4. Network Throughput
5. Performance
6. Ability to cope with node failure
7. Cross layer optimization
8. Scalability to large scale of deployment
A modern Wireless Sensor Network (WSN) faces several challenges, including:
• Limited power and energy: WSNs are typically composed of battery-powered
sensors that have limited energy resources. This makes it challenging to ensure that
the network can function for
long periods of time without the need for frequent battery replacements.
• Limited processing and storage capabilities: Sensor nodes in a WSN are typically
small and have limited processing and storage capabilities. This makes it difficult to
perform complex tasks or store large amounts of data.
• Heterogeneity: WSNs often consist of a variety of different sensor types and nodes
with different capabilities. This makes it challenging to ensure that the network can
function effectively and
efficiently.
• Security: WSNs are vulnerable to various types of attacks, such as eavesdropping,
jamming, and spoofing. Ensuring the security of the network and the data it collects
is a major challenge.
• Scalability: WSNs often need to be able to support a large number of sensor nodes
and handle large amounts of data. Ensuring that the network can scale to meet these
demands is a significant
challenge.
• Interference: WSNs are often deployed in environments where there is a lot of
interference from other wireless devices. This can make it difficult to ensure
reliable communication between sensor nodes.
• Reliability: WSNs are often used in critical applications, such as monitoring the
environment or controlling industrial processes. Ensuring that the network is
reliable and able to function correctly
in all conditions is a major challenge.
Components of WSN:
1. Sensors:
Sensors in WSN are used to capture the environmental variables and which is used
for data acquisition. Sensor signals are converted into electrical signals.
2. Radio Nodes:
It is used to receive the data produced by the Sensors and sends it to the WLAN
access point. It consists of a microcontroller, transceiver, external memory, and
power source.
3. WLAN Access Point:
It receives the data which is sent by the Radio nodes wirelessly, generally through
the internet.
4. Evaluation Software:
The data received by the WLAN Access Point is processed by a software called as
Evaluation Software for presenting the report to the users for further processing of
the data which can be used for processing, analysis, storage, and mining of the data.
Advantages of Wireless Sensor Networks (WSN):
• Low cost: WSNs consist of small, low-cost sensors that are easy to deploy, making
them a cost-effective solution for many applications.
• Wireless communication: WSNs eliminate the need for wired connections, which can
be costly and difficult to install. Wireless communication also enables flexible
deployment and reconfiguration of the network.
• Energy efficiency: WSNs use low-power devices and protocols to conserve energy,
enabling long-term operation without the need for frequent battery replacements.
• Scalability: WSNs can be scaled up or down easily by adding or removing sensors,
making them suitable for a range of applications and environments.
• Real-time monitoring: WSNs enable real-time monitoring of physical phenomena in the
environment, providing timely information for decision making and control.
Disadvantages of Wireless Sensor Networks (WSN):
• Limited range: The range of wireless communication in WSNs is limited, which can be
a challenge for large-scale deployments or in environments with obstacles that obstruct
radio signals.
• Limited processing power: WSNs use low-power devices, which may have limited
processing power and memory, making it difficult to perform complex computations or
support advanced applications.
• Data security: WSNs are vulnerable to security threats, such as eavesdropping,
tampering, and denial of service attacks, which can compromise the confidentiality,
integrity, and availability of data.
• Interference: Wireless communication in WSNs can be susceptible to interference from
other wireless devices or radio signals, which can degrade the quality of data
transmission.
• Deployment challenges: Deploying WSNs can be challenging due to the need for
proper sensor placement, power management, and network configuration, which can
require significant time and resources.
In addition to sensors and devices, data can originate from various software programs and digital
devices, such as social media platforms such as Facebook or Twitter.
Traditional database systems are inefficient when they perform complex tasks such as storing,
processing, and analyzing large amounts of data (or big data). The volume of structured,
unstructured, or semi-structured data generated by these sources, on the other hand, is steadily
rising. As a result of this huge data production, we have “big data.”
• Data source
• Data analytics
• The presentation of the results of the analytics.
Big data analytics
Analyzing big data includes exploring and mining databases to enhance business
performance. In big data analytics, enormous datasets, including various data kinds, are analyzed
to discover previously unknown patterns such as consumer preferences and other relevant
business data. An organization’s capacity to evaluate huge volumes of data can assist it in
dealing with important information that could harm its operations. Defined in this way, big data
analytics’ primary goal is to help businesses better understand their data and make better
decisions.
Using big data analytics, data miners and scientists can examine a vast volume of data
that would otherwise be unusable using standard techniques. Massive amounts of structured,
unstructured, and semi-structured data must be transformed into a more understandable data
format and metadata for analytical processes using big data analytics technology and tools.
Analytics of big data is quickly becoming one of the most essential IoT initiatives for
improving decision-making. On the Internet of Devices, one of the most significant aspects is
analyzing data about linked things. With the Internet of Things, big data analytics demands
analyzing a substantial quantity of data on the go while also storing the data in several different
ways. For big data projects to be successful, companies must quickly analyze and make choices
based on massive amounts of unstructured data acquired from web-enabled devices. Sensors and
actuators are interconnected, allowing information to be shared across platforms through a single
architecture and a common operational picture to be developed, enabling novel applications.
In IoT applications, there is a clear need to incorporate big data. These two technologies
are already well-known in the IT and commercial worlds, respectively. These technologies are
linked and should be developed together, even though the growth of big data is behind. Big data
analytics may be applied and developed when IoT devices are deployed since they increase the
amount of data in terms of quantity and kind. En outre, IoT research and business models are
accelerated by using big data technology. The following graphic illustrates the connection
between IoT and big data.
Example of Data analytics in IoT systems
Among the IoT application use cases, smart metering generates a huge quantity of data
from many sources, including smart grids, tank levels. Decision-makers may collect and analyze
data from smart meters in an IoT context to anticipate power usage.
An IoT-based smart transportation system intends to promote the notion of smart cities.
One of the main goals of smart transportation is to use powerful and modern communication
technology to govern smart cities.
With the help of IoT sensors and gadgets, a smart traffic light system keeps an eye on the
presence of automobiles as well as bicycles and pedestrians. Using the IoT data gathered by the
system, real-time analytics processing is required to perform necessary. Smart traffic lights can
change the timing cycles based on traffic conditions. Moreover, they can also send signals to
nearby traffic lights and recognize vehicles that use IoT sensors and devices to prevent long
queues or accidents.
1. Computing power
2. Reliability
3. Connectivity
Embedded Devices (System) in (IoT)
It is essential to know about the embedded devices while learning the IoT or building the projects
on IoT. The embedded devices are the objects that build the unique computing system. These
systems may or may not connect to the Internet.
An embedded device system generally runs as a single application. However, these devices can
connect through the internet connection, and able communicate through other network devices.
The embedded system can be of type microcontroller or type microprocessor. Both of these types
contain an integrated circuit (IC).
The essential component of the embedded system is a RISC family microcontroller like
Motorola 68HC11, PIC 16F84, Atmel 8051 and many more. The most important factor that
differentiates these microcontrollers with the microprocessor like 8085 is their internal read and
writable memory. The essential embedded device components and system architecture are
specified below.
The embedded system that uses the devices for the operating system is based on the language
platform, mainly where the real-time operation would be performed. Manufacturers build
embedded software in electronics, e.g., cars, telephones, modems, appliances, etc. The embedded
system software can be as simple as lighting controls running using an 8-bit microcontroller. It
can also be complicated software for missiles, process control systems, airplanes etc.