0% found this document useful (0 votes)
28 views40 pages

1 MID IIOT MATERIAL (PDF - Io)

The document discusses three questions about industrial internet of things (IIoT). It compares IIoT to regular IoT, describes future trends in IIoT including edge computing and 5G connectivity, and explains the role of IIoT in manufacturing processes such as predictive maintenance and quality control.

Uploaded by

rayalasai874
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)
28 views40 pages

1 MID IIOT MATERIAL (PDF - Io)

The document discusses three questions about industrial internet of things (IIoT). It compares IIoT to regular IoT, describes future trends in IIoT including edge computing and 5G connectivity, and explains the role of IIoT in manufacturing processes such as predictive maintenance and quality control.

Uploaded by

rayalasai874
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/ 40

UNIT –I

INDUSTRIAL INTERNET OF THINGS (IIOT)


( Important Question & Answers)

Prepared by Dr Koteswara Rao Seelam, Professor ECE,KHIT

1. compare the Internet Of Things (Iot) Vs The Industrial


Internet Of Things (IIoT)

Answer :
The Internet of Things (IoT) and the Industrial Internet of Things (IIoT)
share similarities but also have key differences. Here's a comparison
between the two:

Scope and Application:

IoT: The IoT refers to the network of interconnected devices, objects, and
systems that communicate and exchange data over the internet. It
encompasses a wide range of applications in various sectors, including
smart homes, wearables, consumer electronics, healthcare,
transportation, and more.

IIoT: The IIoT specifically focuses on the application of IoT technologies in


industrial settings, such as manufacturing, energy, agriculture, logistics,
and infrastructure. It aims to improve efficiency, productivity, and safety
in industrial processes by connecting machines, equipment, and systems.

Objectives:

IoT: The primary objectives of IoT applications are centered around


enhancing convenience, automation, and user experiences in everyday
life. Examples include smart home devices, fitness trackers, and personal
assistants.

IIoT: The main goals of IIoT are to optimize industrial operations, enable
predictive maintenance, enhance safety, and drive cost savings in
industries. It involves connecting industrial assets, monitoring
performance, analyzing data, and making data-driven decisions to
improve efficiency and productivity.
Scale and Complexity:

IoT: IoT applications can range from small-scale deployments involving a


few devices to large-scale implementations involving millions or even
billions of connected devices. While individual devices may have limited
complexity, the overall IoT ecosystem can be highly diverse and complex.

IIoT: IIoT deployments often involve complex industrial systems and


processes. They typically encompass a wide range of industrial
equipment, sensors, actuators, control systems, and other components.
The scale of IIoT can vary from a single factory to a global network of
interconnected industrial facilities.

Connectivity and Communication:

IoT: IoT devices primarily rely on standard internet connectivity, often


using wireless protocols such as Wi-Fi, Bluetooth, or cellular networks to
exchange data with the cloud or other devices.

IIoT: IIoT systems require robust and reliable connectivity, often utilizing
wired connections, industrial protocols (e.g., Modbus, OPC UA), or
industrial wireless networks (e.g., Zigbee, LoRaWAN) designed for harsh
industrial environments. IIoT devices may also employ edge computing to
process data locally for real-time decision-making.

Security and Reliability:

IoT: Security and privacy are concerns in IoT, especially regarding


personal data and home networks. However, the consequences of security
breaches in IoT applications are generally less severe compared to IIoT.

IIoT: Security and reliability are critical considerations in IIoT due to


potential risks to human safety, operational disruptions, and financial
losses. IIoT systems employ advanced security measures, such as
encryption, authentication, access control, and monitoring, to ensure the
integrity and resilience of industrial operations.

In summary, while both IoT and IIoT involve connecting devices and
utilizing data, the industrial context and specific requirements of IIoT
distinguish it from the broader consumer-centric focus of IoT. IIoT
addresses the unique challenges and opportunities of industrial sectors,
focusing on operational efficiency, safety, and optimization of industrial
processes.

2. Describe the Future Trends In Industrial Internet Of Things

Answer :
The Industrial Internet of Things (IIoT) is poised for further advancements
and transformative changes in the future. Here are some future trends
that are expected to shape the landscape of IIoT:

Edge Intelligence: Edge computing and intelligence will play a significant


role in the future of IIoT. By processing data closer to the source, at the
network edge or within devices themselves, edge intelligence will enable
real-time decision-making, reduced latency, improved bandwidth
utilization, and enhanced privacy and security.

5G Connectivity: The deployment and widespread adoption of 5G


networks will unlock new possibilities for IIoT applications. With its ultra-
low latency, high bandwidth, and massive device connectivity capabilities,
5G will support mission-critical and time-sensitive IIoT use cases, such as
autonomous vehicles, remote surgery, and smart cities.

Digital Twins: Digital twin technology will gain prominence in IIoT


applications. Digital twins are virtual replicas of physical assets, systems,
or processes, and they enable real-time monitoring, analysis, and
simulation. By creating digital representations, businesses can optimize
operations, predict failures, and perform what-if scenarios for improved
decision-making.

AI and Machine Learning: Artificial intelligence (AI) and machine learning


(ML) will continue to play a significant role in IIoT. AI/ML algorithms will
enable advanced analytics, predictive maintenance, anomaly detection,
and autonomous decision-making, leading to optimized processes,
reduced downtime, and improved efficiency.

Cybersecurity and Privacy: As IIoT deployments grow, cybersecurity and


privacy will be crucial focus areas. Enhanced security measures, including
end-to-end encryption, secure authentication, and blockchain-based
solutions, will be employed to protect IIoT systems from cyber threats.
Privacy regulations and standards will also evolve to ensure data
protection and user consent.

Sustainability and Energy Efficiency: IIoT will contribute to sustainability


efforts by enabling energy-efficient operations, resource optimization, and
environmental monitoring. Smart grids, smart buildings, and energy
management systems powered by IIoT will drive energy conservation and
the transition to cleaner and greener practices.

Integration with Supply Chain: IIoT will increasingly be integrated into


supply chain management to enable end-to-end visibility, real-time
tracking, inventory management, and demand forecasting. By connecting
all stages of the supply chain, IIoT will facilitate seamless coordination,
improve efficiency, reduce costs, and enhance customer satisfaction.
Collaborative Robotics: The integration of IIoT and collaborative robots
(cobots) will transform industrial automation. Cobots equipped with
sensors and connected to IIoT networks will enable safe and efficient
human-robot collaboration. This will enhance productivity, enable flexible
manufacturing, and improve worker safety.

Data Monetization: Companies will explore new ways to monetize the vast
amount of data generated by IIoT systems. Data marketplaces and data-
sharing collaborations will emerge, allowing organizations to sell or
exchange data for valuable insights, research, and business opportunities.

Standardization and Interoperability: Standardization efforts will continue


to evolve to address interoperability challenges in the IIoT ecosystem.
Common frameworks, protocols, and standards will enable seamless
integration of devices, platforms, and systems from different vendors,
fostering interoperability and scalability.

These future trends in IIoT indicate a continued convergence of


technologies, driving innovation and unlocking new possibilities for
industries across sectors. The advancements will bring about improved
operational efficiency, intelligent automation, enhanced decision-making,
and sustainable practices.

3. Describe Role Of Industrial Internet Of Things In


Manufacturing Processes :

Answer :
The Industrial Internet of Things (IIoT) plays a significant role in
transforming manufacturing processes by enabling enhanced automation,
data-driven decision-making, and improved operational efficiency. Here
are some key aspects highlighting the role of IIoT in manufacturing:

Connectivity and Data Collection: IIoT connects machines, equipment, and


systems within the manufacturing environment, allowing seamless
communication and data exchange. Sensors embedded in devices collect
real-time data on parameters such as temperature, pressure, vibration,
energy consumption, and more. This data provides insights into the
performance, health, and condition of machines and processes.

Predictive Maintenance: IIoT enables predictive maintenance, where data


from sensors and equipment is analyzed to detect patterns and
anomalies. By monitoring machine conditions and identifying signs of
potential failures or malfunctions in advance, manufacturers can schedule
maintenance activities proactively, minimizing unplanned downtime,
reducing maintenance costs, and maximizing asset utilization.

Operational Optimization: IIoT facilitates operational optimization by


providing real-time visibility and control over manufacturing processes.
Data collected from machines and production lines is analyzed to identify
bottlenecks, optimize workflow, and improve overall efficiency.
Manufacturers can monitor production metrics, track Key Performance
Indicators (KPIs), and make data-driven decisions to streamline operations
and enhance productivity.

Quality Control: IIoT enables continuous monitoring and quality control


throughout the manufacturing process. Real-time data from sensors can
be analyzed to detect variations, deviations, or defects in products. By
implementing automated quality control systems and integrating IIoT data
with quality management software, manufacturers can ensure consistent
product quality, reduce defects, and prevent costly rework or recalls.

Supply Chain Integration: IIoT facilitates seamless integration and


coordination within the manufacturing supply chain. Manufacturers can
leverage IIoT data to optimize inventory levels, track shipments, monitor
supplier performance, and improve logistics. Real-time visibility into the
supply chain enables efficient planning, reduces lead times, minimizes
stockouts, and enhances customer satisfaction.

Energy Efficiency and Sustainability: IIoT contributes to energy efficiency


and sustainability in manufacturing processes. By monitoring and
optimizing energy consumption through sensors and data analytics,
manufacturers can identify energy-intensive operations, implement
energy-saving measures, and reduce their carbon footprint. IIoT also
enables the use of renewable energy sources and supports sustainability
initiatives within the manufacturing industry.

Worker Safety and Productivity: IIoT enhances worker safety and


productivity by providing real-time insights into the working environment.
Wearable devices equipped with sensors can monitor factors such as
temperature, air quality, and hazardous conditions. IIoT systems can alert
workers to potential risks and enable the implementation of preventive
measures to ensure a safer working environment.
Continuous Improvement and Innovation: IIoT facilitates continuous
improvement and innovation in manufacturing processes. By analyzing
data collected from IIoT devices, manufacturers can identify areas for
improvement, implement process optimizations, and support innovation
initiatives. IIoT data also provides valuable inputs for research and
development, product design enhancements, and the introduction of new
technologies and materials.

Overall, the integration of IIoT into manufacturing processes empowers


manufacturers to make data-driven decisions, optimize operations,
improve quality, enhance sustainability, and drive innovation. It
transforms traditional manufacturing into more agile, efficient, and
intelligent processes, enabling manufacturers to stay competitive in an
evolving industrial landscape.

4. Write short notes on i) IoT Platforms ii) IoT networks iii) Application
Programming Interface (API) iv) IoT clouds v)IOT Sensors

Answer :
i)IoT Platforms :
Google Cloud IoT. Google launched its platform for Internet of
Things development on the basis of its end-to-end Google Cloud
Platform. ...
Cisco IoT Cloud Connect. ...
Salesforce IoT Cloud. ...
IRI Voracity. ...
Particle. ...
IBM Watson IoT. ...
ThingWorx. ...
Amazon AWS IoT Core.

ii) IoT networks :

• Cellular networks like LTE-M, NB-IoT, etc.


• LAN/PAN like Bluetooth, WiFi, etc.
• LPWAN like LoRaWAN, Sigfox, etc.
• Mesh protocols like RFID, ZigBee, Z-wave, etc.

iii)Application Programming Interface (API) : Is An Interfacing


Software Platform That Allows The Exchange Of Any Information Or
Data And Supports The Interaction Among Different Applications Or
Any Such Intermediaries. Google Maps, Twitter, Facebook Are A Few
Examples Of APIs Used In Our Day To Day Life.
Iv )IoT clouds :
An IoT cloud is a massive network that supports IoT devices and
applications. This includes the underlying infrastructure, servers and
storage, needed for real-time operations and processing.
Ex: IBM Watson IOT, Microsoft Azure, ThingWorx, IRI voracity

5. v) IOT Sensors

1. Temperature sensors: These sensors measure and monitor


temperature changes in various environments. They are commonly
used in industries such as agriculture, manufacturing, and
healthcare.
2. Pressure sensors: These sensors measure and monitor changes in
pressure levels. They are used in applications such as monitoring
tire pressure in vehicles, measuring fluid levels in tanks, and
controlling industrial processes.
3. Motion sensors: These sensors detect and monitor movement or
changes in position. They are commonly used in security systems,
automated lighting systems, and smart home devices.
4. Proximity sensors: These sensors detect the presence or absence
of an object within a certain range. They are used in applications
such as automatic doors, parking sensors, and object detection
systems.
5. Light sensors: These sensors measure and monitor light levels in
an environment. They are used in applications such as automatic
lighting systems, outdoor lighting control, and energy management.
6. Humidity sensors: These sensors measure and monitor the
moisture content in the air or other substances. They are commonly
used in HVAC systems, agriculture, and industrial processes.
7. Gas sensors: These sensors detect and monitor the presence of
specific gases in the environment. They are used in applications
such as gas leak detection, air quality monitoring, and industrial
safety.
8. Accelerometers: These sensors measure and monitor acceleration
or changes in velocity. They are commonly used in applications such
as fitness trackers, navigation systems, and vibration monitoring.

6. Explain the Challenges and Benefits in implementing IIoT

Challenges:
1. Security: With more devices connected to the internet, the risk of
cyber attacks and data breaches increases. Ensuring the security of
IIoT systems is a major challenge.
2. Interoperability: Different devices and systems may use different
protocols and standards, making it difficult to integrate them
seamlessly. Achieving interoperability is crucial for the success of
IIoT implementations.
3.Scalability: As the number of connected devices increases, managing
and scaling the infrastructure becomes more complex. Ensuring that
the system can handle the growing number of devices is a
challenge.
4. Data management: IIoT generates a massive amount of data, and
effectively managing and analyzing this data is a challenge. Extracting
meaningful insights from the data is crucial for making informed
decisions.

Benefits:
1. Increased efficiency: IIoT enables real-time monitoring and
control of industrial processes, leading to improved efficiency and
productivity. It allows for predictive maintenance, reducing
downtime and optimizing resource utilization.
2. Cost savings: IIoT can help identify inefficiencies and optimize
resource usage, leading to cost savings. It enables predictive
maintenance, reducing the need for costly unplanned repairs.
3. Improved safety: IIoT can enhance safety in industrial
environments by providing real-time monitoring of equipment and
processes. It can detect anomalies and potential hazards, allowing
for timely intervention.
4. Enhanced decision-making: IIoT generates a wealth of data that can be
analyzed to gain insights and make data-driven decisions. This can lead to
better decision-making and improved business outcomes.
UNIT 2 SENSORS AND INTERFACING

1. Draw and Explain Layered architecture of IoT ?

DEVICE LAYER :

 Provides a user interface for using IoT.


 Different applications for various sectors like Transportation, Healthcare, Agriculture, Supply
chains, Government, Retail etc.
 Devices and sensors used are:
 GPS
 Gyroscope
 Accelerometer
 Wifi
 Ethernet
 Bluetooth

NETWORK LAYER :
 Robust and High performance network infrastructure
 Supports the communication requirements for latency, bandwidth or security
 Allows multiple organizations to share and use the same network independently
 Encryption, signal processing, LTE, Wifi, Sim Module, GSM, Micro controller, Embedded-os
etc…are used in network layer.
 Also termed as Application service Layer.
 Capturing of periodic sensory data .
 Data Analytics (Extracts relevant information from massive amount of raw data).
 Streaming Analytics (Process real time data).
 Ensures security and privacy of data.

Service Layer :
 Also termed as Application service Layer.

 Capturing of periodic sensory data .

 Data Analytics (Extracts relevant information from massive amount of


raw data).

 Streaming Analytics (Process real time data).

 Ensures security and privacy of data.

Application Layer :

 Lowest Abstraction Layer.


 With sensors we are creating digital nervous system.
 Incorporated to measure physical quantities.
 Interconnects the physical and digital world.
 Collects and process the real time information.
 Transportation, Health care, Tracing people, Climatic conditions.etc
comes under application layer.

2. Draw and Explain IIoT architecture?


Figure 1. IIoT system architecture

Industrial Internet Consortium (IIC) also defines three-tier IIoT system


architecture with edge, platform, and enterprise tiers, as depicted in
Figure 1 . The tiers are mutually connected by three networks (proximity,
access and service networks), while there are two types of information
transferred, i.e. data and control flows.
The edge tier :It is comprised of edge nodes (sensors, actuators,
controllers, and other devices) that interact between each other and are
interconnected by independent local area networks (proximity networks)
to edge gateways that are bridges to larger networks (access network) of
the platform tier. Access network can be realized as a corporate network,
a private network over the public Internet or a 4G/5G network.

The platform tier :It is responsible for receiving, processing and


forwarding the data from edge tier to enterprise tier (data flow) and from
enterprise tier to edge tier (control flow). It performs data collection and
transformation as well as data analytics. Platform and enterprise tiers are
mutually connected via service network that enables connectivity among
services within both tiers. Service network can be Internet or a private
network over the public Internet. Platform tier analyzes data flows,
manages devices, integrates processes, and is usually realized as a cloud
service.

Enterprise tier: it is consisted of domain-specific applications and end-


user interfaces.

3. Explain The Industrial Internet of Things (IIoT) has several


advantages and disadvantages.

Answer:
Advantages of IIoT include:

1. Increased efficiency: IIoT allows for real-time monitoring and analysis of


data, leading to improved efficiency in industrial processes.
2. Cost savings: IIoT can help reduce operational costs by optimizing
resource usage and predicting maintenance needs.
3. Enhanced safety: IIoT enables the implementation of advanced safety
measures, such as remote monitoring and automated alerts.
4. Improved decision-making: IIoT provides valuable insights and data
analytics that can support better decision-making in industrial settings.

Disadvantages of IIoT include:

1. Security risks: IIoT devices are vulnerable to cyber attacks, which can
lead to data breaches and operational disruptions.
2. Complexity: Implementing IIoT systems can be complex and require
significant investment in infrastructure and training.
3. Privacy concerns: IIoT involves the collection and analysis of large
amounts of data, raising privacy concerns for individuals and
organizations.
4. Compatibility issues: Integrating different IIoT devices and systems
from various manufacturers can be challenging due to compatibility
issues.

4. What are the system components an IIoT and explain in


detail?

1. Sensors: These devices are used to collect data from the physical
environment. They can measure various parameters such as temperature,
pressure, humidity, and vibration.

2. Gateways: Gateways act as intermediaries between the sensors and


the cloud or central server. They collect data from the sensors and
transmit it to the cloud for further processing and analysis.

3. Cloud Platform: The cloud platform is where the data collected from the
sensors is stored and processed. It provides the necessary infrastructure
and tools for data analytics and visualization.

4. Communication Protocols: IIoT systems use various communication


protocols to enable seamless data exchange between devices. Some
common protocols include MQTT, CoAP, and OPC UA.
5. Edge Computing: In some cases, data processing and analysis are
performed at the edge of the network, closer to the sensors. This helps
reduce latency and enables real-time decision-making.

6. Analytics and Machine Learning: IIoT systems often employ advanced


analytics and machine learning algorithms to derive insights from the
collected data. This can help optimize processes, predict failures, and
improve overall efficiency.

5. Draw and Explain the Industrial Internet Reference


Architecture (IIRA)

Answer :

The Industrial Internet Reference Architecture (IIRA) is a framework that


provides a blueprint for designing and implementing Industrial Internet of
Things (IIoT) systems. It defines the key components and their
interactions within an IIoT system. The IIRA includes four layers: the
physical layer, the connectivity layer, the information layer, and the
application layer.

The physical layer consists of the physical devices and sensors that
collect data from the industrial environment. These devices can include
sensors, actuators, and other hardware components.

The connectivity layer is responsible for connecting the physical devices


to the network. It includes protocols and technologies such as Ethernet,
Wi-Fi, and cellular networks. This layer ensures that the data collected by
the physical devices can be transmitted to the information layer.

The information layer is where the data collected from the physical
devices is processed and analyzed. It includes components such as data
storage, data processing, and analytics tools. This layer is responsible for
transforming raw data into meaningful insights that can be used for
decision-making.

The application layer is where the insights generated by the information


layer are utilized. It includes applications and software that enable users
to monitor and control industrial processes. These applications can range
from simple dashboards to complex control systems.

Overall, the Industrial Internet Reference Architecture provides a


framework for designing and implementing IIoT systems that can improve
efficiency, productivity, and safety in industrial settings.
Fig. Industrial Internet Reference Architecture (IIRA)

6. Lit various types of Transducers and its illustrations : can


also be classified into various categories based on their functionality
and the type of energy they convert. Some common classifications
include:

1. Active vs. Passive Transducers: Active transducers require an external


power source to operate, while passive transducers do not. Active
transducers typically have built-in amplification circuits to enhance the
signal, while passive transducers rely on the input energy to generate an
output signal.

2. Analog vs. Digital Transducers: Analog transducers provide continuous


output signals that vary in magnitude, while digital transducers provide
discrete output signals that are represented by binary values (0s and 1s).

3. Input vs. Output Transducers: Input transducers convert physical


quantities into electrical signals, while output transducers convert
electrical signals into physical quantities.

4. Mechanical vs. Electrical Transducers: Mechanical transducers convert


mechanical energy (such as force, pressure, or displacement) into
electrical signals, while electrical transducers convert electrical energy
into other forms of energy (such as light or sound).

5. Primary vs. Secondary Transducers: Primary transducers directly


convert the input energy into an electrical signal, while secondary
transducers require an intermediate conversion process (such as
mechanical or thermal) before generating an electrical signal.
These are just a few examples of how transducers can be classified. The
specific classification of a transducer depends on its intended application
and the type of energy it is designed to convert.

7. List the types of Sensors and its explanation : into various


categories based on their functionality and the type of data they
collect. Some common classifications include:

1. Temperature Sensors

Temperature Sensors: These sensors measure the temperature of an


object or the surrounding environment. Examples include thermocouples,
resistance temperature detectors (RTDs), and thermistors.

2. Humidity Sensors

Humidity Sensors: These sensors measure the amount of moisture or


humidity in the air or a substance. Capacitive and resistive humidity
sensors are commonly used.

3. Vibration Sensors

A vibration sensor is a device that is used to detect and measure


vibrations or oscillations in an object or system. It can be used in various
applications such as monitoring the health of machinery, detecting
earthquakes, or even in musical instruments to detect the vibrations
produced by the strings. Vibration sensors typically work by converting
mechanical vibrations into electrical signals that can be analyzed and
interpreted. They are commonly used in industries such as manufacturing,
aerospace, and automotive to ensure the proper functioning and safety of
equipment.

4. Proximity Sensors

Proximity sensors are devices that are used to detect the presence or
absence of an object within a certain range. They work by emitting an
electromagnetic field or a beam of radiation and then measuring the
changes in that field or beam when an object enters or exits the sensor's
range. Proximity sensors are commonly used in various applications such
as industrial automation, robotics, and security systems.

5. GAS SENSORS

Gas sensors are devices that are used to detect and measure the
presence and concentration of various gases in the environment. They are
commonly used in industrial settings, homes, and vehicles to monitor air
quality and detect the presence of harmful gases such as carbon
monoxide, methane, and hydrogen sulfide. Gas sensors work by detecting
changes in electrical conductivity, optical properties, or electrochemical
reactions when exposed to specific gases. They are crucial in ensuring
safety and preventing potential hazards.

8. CURRENT MONITORING SENSORS:

There are two functions that current monitoring sensors can deliver. First,
they provide accurate power consumption readings that help keep utility
bills under control and facilitate sustainable operations. With current
monitoring sensors, whenever power consumption surpasses or goes
under expected readings, the system will alert your team. Thus, allowing
staff to schedule any necessary maintenance.

7. Security Sensors :

Security sensors are devices that are used to detect and monitor potential
security threats or breaches. They can include motion sensors,
door/window sensors, glass break sensors, and more. These sensors are
commonly used in home security systems and can trigger alarms or
notifications when unauthorized activity is detected.

8. Level Sensors

Level sensors are devices that are used to measure and monitor the level
of a substance, such as liquid or granular material, in a container or
system. They can be used in various industries, such as manufacturing,
agriculture, and environmental monitoring. Level sensors can utilize
different technologies, such as ultrasonic, capacitive, optical, or pressure-
based, to determine the level of the substance accurately.

9. Pressure Sensors

Pressure sensors are devices that are used to measure and monitor the
pressure of a substance, such as gas or liquid. They can be used in
various applications, such as industrial processes, automotive systems,
and medical devices. Pressure sensors work by converting the pressure
into an electrical signal, which can then be measured and interpreted by
other devices or systems. There are different types of pressure sensors,
including piezo resistive, capacitive, and optical sensors, each with its own
advantages and limitations.
10. Speed Sensors

A speed sensor is a type of position sensor which is used to measure rotational


speed. They are present in various types of commercial and motorsport vehicles.

Like many devices, a speed sensor is an integral part of onboard systems. They
work by providing a voltage measurement corresponding to the magnetic rotational
speed. They can be found in applications where contact-free speed measurement is
required in areas that can be hard to access.

11. INFRARED SENSORS

Infrared sensors can assess the surrounding environment through the


emission of infrared radiation and the detection of it. They can also be
prevalent in wireless tools that require remote controlling function.
Ex: TV remote

.12. ANTI-THEFT SENSORS

Anti-theft systems protect valuables such as vehicles and personal property


like wallets, phones, and jewellery. They are also used in retail settings to
protect merchandise in the form of security tags and labels. Anti-theft systems
include devices such as locks and keys, RFID tags, and GPS locators.

13. Air Quality Sensors


Air quality sensors monitor gases, such as ozone, and particulate matter,
which can harm human health and the environment. Unsurprisingly, air
quality sensors can also swiftly detect gas leaks. Thus, preventing
dangerous accidents and keeping the workplace in optimal conditions.

UNIT 3 PROTOCOLS &CLOUDS

Unit-3 :Syllabus :Protocols and Cloud : Need of protocols; ZigBee, Z wave, BLE,
IIoT protocols –COAP, MQTT, 6LoWPAN.

IIoT cloud platforms: Overview of COTS cloud platforms, PTC ThingWorx,


Microsoft Azure etc.

1. Draw and explain about ZigBee Protocol network diagram ?


 Zigbee Coordinator Device: It communicates with routers. This device is used for
connecting the devices.
 Zigbee Router: It is used for passing the data between devices.
 Zigbee End Device: It is the device that is going to be controlled.

2. Write the General Characteristics of Zigbee Standard?

 Low Power Consumption


 Low Data Rate (20- 250 kbps)
 Short-Range (75-100 meters)
 Network Join Time (~ 30 msec)
 Support Small and Large Networks (up to 65000 devices (Theory); 240 devices
(Practically))
 Low Cost of Products and Cheap Implementation (Open Source Protocol)
 Extremely low-duty cycle.
 3 frequency bands with 27 channels.

3. Write the Advantages and Dis advantages of Zigbee Protocol ?

1. Designed for low power consumption.


2. Provides network security and application support services operating on the top of
IEEE.
3. Zigbee makes possible completely networks homes where all devices are able to
communicate and be
4. Use in smart home
5. Easy implementation
6. Adequate security features.
7. Low cost: Zigbee chips and modules are relatively inexpensive, which makes it a
cost-effective solution for IoT applications.
8. Mesh networking: Zigbee uses a mesh network topology, which allows for devices to
communicate with each other without the need for a central hub or router. This makes it
ideal for use in smart home applications where devices need to communicate with each
other and with a central control hub.
9. Reliability: Zigbee protocol is designed to be highly reliable, with robust mechanisms
in place to ensure that data is delivered reliably even in adverse conditions.
Disadvantages of Zigbee :

1. Limited range: Zigbee has a relatively short range compared to other wireless
communications protocols, which can make it less suitable for certain types of applications
or for use in large buildings.
2. Limited data rate: Zigbee is designed for low-data-rate applications, which can make
it less suitable for applications that require high-speed data transfer.
3. Interoperability: Zigbee is not as widely adopted as other IoT protocols, which can
make it difficult to find devices that are compatible with each other.
4. Security: Zigbee’s security features are not as robust as other IoT protocols, making it
more vulnerable to hacking and other security threats.
4. What are the Zigbee Network Topologies ?

 Star Topology (ZigBee Smart Energy): Consists of a coordinator and several end
devices, end devices communicate only with the coordinator.
 Mesh Topology (Self Healing Process): Mesh topology consists of one coordinator,
several routers, and end devices.
 Tree Topology: In this topology, the network consists of a central node which is a
coordinator, several routers, and end devices. the function of the router is to extend the
network coverage.

5. Draw and explain Architecture of Zigbee ?

Physical Layer in Zigbee Architecture :Physical Layer in Zigbee ArchitectureThe physical


and electrical characteristics are defined by the Physical Layer. This layer is responsible for
data transmission and reception. Mapping bits of information and permits them to travel
through the air by modulation and spreading techniques which is the basic task of physical
layer.

Function of Physical Layer in Zigbee Architecture :


Physical Layer is responsible for the following functions:

 Activation and deactivation of transmission and reception.


 Channel selection and its assessment.
 Sending and receiving of packets.
 Energy detection within the channel.

Medium Access Control (MAC) Layer in Zigbee Architecture :


This layer provides interface between the physical and network layers. It defines how
multiple 802.15.4 radios operating in the same area will share the airwaves. Data handling
and data management are the two main functions of the MAC layer.

Data handling includes functions such as “Data Request” and “Data Confirm”. The MAC
layer adds destination address and transmits options for the outgoing data frames.

When the Zigbee network layer calls the “data request” function, the data gets formatted into
relevant MAC header and frame length is added which is the physical header. The data frame
is ready to be transmitted.

The purpose of “Data Confirm” function is to communicate the status of the transmitted data.
It sends a fail status when the transmission frames exceeds or when there is no response to
transmitted data.

Function of Medium Access Control (MAC) Layer in Zigbee Architecture :


Medium Access Control (MAC) Layer is responsible for the following:

 Beacon generation and management.


 CSMA-CA (Carrier Sense Multiple Access with Collision Avoidance) is implemented.

 Guaranteed Time Clot management (GTS).

 Data frame validation and acknowledgement.

 Data transfer for upper layers.

Network Layer in Zigbee Architecture :


Network Layer provides interface between MAC layer and the application layer. It is
responsible for routing and establishing different Zigbee network topologies namely Star,
Mesh and Tree topologies.

When a coordinator attempts to establish a Zigbee network, an energy scan is initiated to find
the best RF channel for its new network. When a channel has been chosen, the coordinator
assigns a PAN-ID which will be applied to all the devices that join the network.
PAN-ID is a 16 bit number that is used as a network identifier. A node is allowed to
communicate on a network only when it undergoes the association process. The association
function is used to join a node to a parent.

When a node loses its parent, it is considered as an orphan device. It usually occurs when the
end device is mobile and is out of range or through a failure on the parent. In such case, an
orphan scan is performed by broadcasting an “orphan notification” command frame which
helps the device to find its parent.

If the parent gets the notification command, it responds back to the device that it exists and
the orphan can rejoin the parent. Thus the authenticity and confidentiality of a transmission is
ensured by the network layer.

Function of Network Layer in Zigbee Architecture


Network Layer in Zigbee architecture is responsible for the following functions:

 Initiation of a network
 Assigning node addresses
 Configuring of new devices
 Providing secured transmission

Application Layer in Zigbee Architecture:


The Application Layer in Zigbee architecture consists of sub layers namely:

 Application Support Sub Layer


 Application Framework

Application Support Sub Layer (APS)


This layer is responsible for filtering of packets for end devices, checks for duplicity of
packets which is common in a network that supports automatic retries. To maximize the
chance of successful transmission, it performs automatic retries, when the acknowledgement
is requested by the sender.

It is involved in maintaining binding tables. Binding is the connection between the endpoint
on the node to one or more endpoints on other nodes. The address mapping associates a 64-
bit MAC address with a Zigbee 16-bit network address.

Function of Application Support Sub Layer (APS)


Application Support Sub Layer (APS) is responsible for the following functions:

 Maintaining binding tables.


 Address definition, mapping and management.

 Ensuring communication between devices.

 Filtering out packets for non-registered end devices or profiles that don’t match and
reassembling of the packets.

Application Framework
The Application Framework depends on the vendor who has chosen for specific applications
to interact with Zigbee protocol. This represents how end points are implemented, how data
requests and data confirmation is executed for that particular vendor.

6. Write the list of Zigbee Applications ?

1. Home Automation
2. Medical Data Collection
3. Industrial Control Systems
4. meter reading system
5. light control system
6. Commercial
7. Government Markets Worldwide
8. Home Networking

Z-Wave Protocol

1. Explain about Z-Wave Protocol with diagram ?

Z-Wave it is a wireless communication protocol used by automatic or automotive


appliances for the purpose of connection and communication. It is invented in 1999
by Zensys a Danish-American company. In this article we are going to see some
characteristics of Z-Wave, Components of Z-Wave, Z-Wave protocol stack, and
some applications of Z-Wave.

2. Draw the architecture of Z-Wave Protocol?


Z-Wave protocol stack contains five layers physical layer, MAC layer, transport layer,
network layer, and application layer.
 PHY layer: This layer has many functions but the important one is modulation and
coding. In this layer, data is transferred in 8-bit blocks and the most significant bit is
sent first.
 MAC layer: MAC layer as the name suggests takes care of medium access control
among slave nodes based on collision avoidance and backoff algorithms. also, it takes
care of network operations based on Home ID, Node ID, and other parameters in the z-
wave frame.
 Transport layer: Z-Wave transport layer is mainly responsible for retransmission,
packet acknowledgement, and packet origin authentication. the z-wave layer consists of
four basic frame types:
 Single cast frame
 ACK frame
 Multicast frame
 Broadcast frame
 Network layer: Z-Wave network layer controls the frame routing from one node
to another node.
 Application layer: This layer is responsible for decoding and execution of
commands in the z-wave network.

3. Draw the z-wave network and explain them in brief ?


 Controllers: A controller is a unit that has the ability to compile a routing table of
the network and can calculate routes to the different nodes. There are two types of
controllers –
 Primary controller: Primary controller is the device that contains a
description of the z-wave network and controls the output. It assigns network
ID or Home ID or Node ID to the z-wave during the enrollment process.
 Secondary controller: It also has a Network ID and it remains constant to
maintain routing tables.
 Slave nodes: Slave nodes are the nodes that do not contain routing tables but may
contain a network map. slave nodes have the ability to receive frames and respond to
them if necessary.
 Home ID: The ID used by z-Wave for the separation of the network from each
other is called Home ID. It is created by the primary controller and is 32-bit in size.
 Node ID: The identification number or an address that is given to every device
during the process of inclusion is called Node ID.
 Routing table: It is used by controllers for calculating routes.

4. What are the applications and characteristics of Z-Wave ?

Characteristics of Z-Wave :
 Uses RF for signaling and control
 Frequency : 900 MHz (ISM)
 Range : 30 meter
 Data rates : upto 100 kbps
 FSK Modulation

Applications of Z-Wave :
 Home automation
 Water management using flood sensors
 Fingerprint scanner

Bluetooth Low Energy (BLE) Protocol :

1.What are features of Bluetooth Low Energy (BLE) Protocol ?

• Wireless Personal Area Network technology

• Target for healthcare, fitness, beacons, security and home entertainment

• Provides considerably reduced power consumption

• Low Energy requirements, operating for “months or years” on a button cell

• Small size and low cost

• Compatibility with large installed base

• Starting point of automation in nearly all domain


2.Draw the Architecture of Bluetooth Low Energy (BLE) ?

BLE Radio Layer :

• Operates in 2.4 GHz ISM ( Industrial Scientific

Medical ) band 2402 MHz – 2480 MHz

• 40 RF Channels with 2 MHz Spacing

• 3 out of 40 channels are advertising

– Used for device discovery

– connection establishment

– broadcast

- Advertising channel frequencies are selected to minimize the interference

All physical channels use GFSK

– Gaussian Frequency Shift Keying modulation

– Allows reduced peak power consumption

– Physical layer data rate is 1 Mbps

•-Range is typically 0 – 50 meters from smart phone

BLE L2CAP :

Logical Link Control and Adaptation Protocol (L2CAP) is a protocol used in the Bluetooth
standard that provides adaption between higher layers and the baseband layer of the
Bluetooth stack

• Advertisement • Scanning • Connection Establishment


Provides a way for devices to broadcast their presence

• Allows connection to be established

• Broadcast data like the list of supported

services, device name and TX Power Level

• Device will send advertising broadcast packets

to one or multiple advertisement channels ,which remote devices will pick up.

BLE L2CAP – Advertisement Passive Scanning :

BLE L2CAP – Active Scanning :


BLE L2CAP – Connection :

BLE L2CAP – Network Topology

• Advertiser

– Broadcasts advertisement packets

• Scanner

– Only listen for advertisements, can connect to advertiser

• Slave

– Device connected to master

• Master

– Device connected with one or more slaves

– Master can connect upto 4 – 8 slaves at a time

• Hybrid

– Device advertise and scan at the same time

– Connected to a master and advertise or scan

Simultaneously
BLE L2CAP – Connection :

BLE L2CAP – Topology Change :

BLE Generic Attribute Profile :


• Provides access to the link layer operations related to
– Device discovery
– Connection establishment & termination
– Connection timing control
• GAP defines roles :
– Broadcaster : Sends advertising & broadcast data
– Observer : Listens for advertising events
– Peripheral : Always slave, is connectable & advertising
– Central : Always master, never advertise
– Device can have more than one role, only one role can be adopted at a given time.

Security Manager (SM) :It defines the pairing, authentication, and encryption procedures
between LE devices. It protects against passive eavesdropping, Man-in-the-Middle, and
tracking.

Tasks include key generation, key distribution (pairing), and random address generation and
resolution.

Attribute Protocol (ATT) :LE devices store data using a data type called an attribute. The
ATT defines the structure of an attribute and its access permissions (read, write, read-only,
etc.)

Generic Attribute Profile (GATT) :It provides a hierarchical data structure to arrange data in
a file-folder way. Hierarchically organizing data makes it easy for LE devices to access and
store data when interacting.
Constrained Application Protocol (CoAP) :

1 .Define Constrained Application Protocol (CoAP) ?

The CoAP protocol is specified in RFC 7252. It is a web transfer protocol which is
used in constrained nodes or networks such as WSN, IoT, M2M etc. Hence the name
Constrained Application Protocol. The protocol is targetted for Internet of Things (IoT)
devices having less memory and less power specifications.

As it is designed for web applications it is also known as "The Web of Things Protocol". It
can be used to transport data from few bytes to 1000s of bytes over web applications. It exists
between UDP layer and Application layer.

2. What are the features of CoAP Protocol:

• It is very efficient RESTful protocol.


• Easy to proxy to/from HTTP.
• It is open IETF standard
• It is Embedded web transfer protocol (coap://)
• It uses asynchronous transaction model.
• UDP is binding with reliability and multicast support.
• GET, POST, PUT and DELETE methods are used.
• URI is supported.
• It uses small and simple 4 byte header.
• Supports binding to UDP, SMS and TCP.
• DTLS based PSK, RPK and certificate security is used.
• uses subset of MIME types and HTTP response codes.
• Uses built in discovery mechanism.

3. Draw the architecture of COAP Protocol?


The figure-1 depicts CoAP Architecture. As shown it extends normal HTTP clients to clients
having resource constraints. These clients are known as CoAP clients. Proxy device bridges
gap between constrained environment and typical internet environment based on HTTP
protocols. Same server takes care of both HTTP and CoAP protocol messages.

Feature CoAP HTTP

Protocol It uses UDP. It uses TCP.

Network layer It uses IPv6 along with 6LoWPAN. It uses IP layer.

Multicast support It supports. It does not support.

Architecture model CoAP uses both client-Server & Publish- HTTP uses client and server
Subscribe models. architecture.

Synchronous
communication CoAP does not need this. HTTP needs this.

Less overhead and it is simple. More overhead compare to


CoAP and it is complex.
Overhead

Designed for internet devices


Designed for resource constrained where there is no issue of any
Application networking devices such as WSN/IoT/M2M. resources.
PROXY : A proxy server is a system or router that provides a gateway between users and the
internet. Therefore, it helps prevent cyber attackers from entering a private network. It is a
server, referred to as an “intermediary” because it goes between end-users and the web pages
they visit online.

4. Explain about CoAP Protocol Message Exchanges ?

CoAP message exchange :

There are two modes in which CoAP protocol messages get exchanged between CoAP client
and CoAP server viz. without separate response and with separate response.

With separate response, server notifies client about receipt of the request message. This will
increase processing time but help in avoiding unnecessary retransmissions.

CoAP IoT is unreliable protocol due to use of UDP. Hence CoAP messages reach un ordered
or will get lost when they arrive at destination.

To make CoAP as reliable protocol, stop and wait with exponential backoff retransmission
feature is incorporated in it. Duplicate detection is also introduced.

6LOWPAN PROTOCOL
6LoWPAN is an IPv6 protocol, and It’s extended from is IPv6 over Low Power Personal
Area Network. As the name itself explains the meaning of this protocol is that this
protocol works on Wireless Personal Area Network i.e., WPAN.
WPAN is a Personal Area Network (PAN) where the interconnected devices are centered
around a person’s workspace and connected through a wireless medium. You can read
more about WPAN at WPAN. 6LoWPAN allows communication using the IPv6 protocol.
IPv6 is Internet Protocol Version 6 is a network layer protocol that allows communication
to take place over the network. It is faster and more reliable and provides a large number
of addresses.
6LoWPAN initially came into existence to overcome the conventional methodologies that
were adapted to transmit information. But still, it is not so efficient as it only allows for the
smaller devices with very limited processing ability to establish communication using one
of the Internet Protocols, i.e., IPv6. It has very low cost, short-range, low memory usage,
and low bit rate.
It comprises an Edge Router and Sensor Nodes. Even the smallest of the IoT devices can
now be part of the network, and the information can be transmitted to the outside world as
well. For example, LED Streetlights.

 It is a technology that makes the individual nodes IP enabled.


 6LoWPAN can i
Network. For example, Wi-Fi.
 It uses AES 128 link layer security, which AES is a block cipher having key size of
128/192/256 bits and encrypts data in blocks of 128 bits each. This is defined in IEEE
802.15.4 and provides link authentication and encryption.
Basic Requirements of 6LoWPAN:
1. The device should be having sleep mode in order to support the battery saving.
2. Minimal memory requirement.
3. Routing overhead should be lowered.
Features of 6LoWPAN:
1. It is used with IEEE 802.15,.4 in the 2.4 GHz band.
2. Outdoor range: ~200 m (maximum)
3. Data rate: 200kbps (maximum)
4. Maximum number of nodes: ~100
Advantages of 6LoWPAN:
1. 6LoWPAN is a mesh network that is robust, scalable, and can heal on its own.
2. It delivers low-cost and secure communication in IoT devices.
3. It uses IPv6 protocol and so it can be directly routed to cloud platforms.
4. It offers one-to-many and many-to-one routing.
5. In the network, leaf nodes can be in sleep mode for a longer duration of time.
Disadvantages of 6LoWPAN:
1. It is comparatively less secure than Zigbee.
2. It has lesser immunity to interference than that Wi-Fi and Bluetooth.
3. Without the mesh topology, it supports a short range.
Applications of 6LoWPAN:
1. It is a wireless sensor network.
2. It is used in home-automation,
3. It is used in smart agricultural techniques, and industrial monitoring.
4. It is utilised to make IPv6 packet transmission on networks with constrained power
and reliability resources possible.

Security and Interoperability with 6LoWPAN:


 Security: 6LoWPAN security is ensured by the AES algorithm, which is a link
layer security, and the transport layer security mechanisms are included as well.
 Interoperability: 6LoWPAN is able to operate with other wireless devices as well
which makes it interoperable in a network.

MQTT PROTOCOL

1. MQTT PROTOCOL ARCHITECTURE?

2. Explain About MQTT Model Diagram?

It is simple, lightweight messaging protocol used to establish communication between


multiple devices. It is TCP-based protocol relying on the publish-subscribe model. This
communication protocol is suitable for transmitting data between resource-constrained
devices having low bandwidth and low power requirements. Hence this messaging protocol is
widely used for communication in IoT Framework.
Publish-Subscribe Model :

This model involves multiple clients interacting with each other, without having any direct
connection established between them. All clients communicate with other clients only via
third party known as Broker.

MQTT Client and Broker :

Clients publish messages on different topics to broker. The broker is the central server that
receives these messages and filters them based on their topics. It then sends these messages to
respective clients that have subscribed to those different topics. Hence client that has
subscribed to a specific topic receives all messages published on that topic.

Figure – Publish-Subscribe Model

Here the broker is central hub that receives messages, filters them, and distributes them to
appropriate clients, such that both message publishers, as well as subscribers, are clients.
Advantages :

Easy Scalability –
This model is not restricted to one-to-one communication between clients. Although the
publisher client sends a single message on specific topic, broker sends multiple messages to
all different clients subscribed to that topic. Similarly, messages sent by multiple such
publisher clients on multiple different topics will be sent to all multiple clients subscribed to
those topics.
Hence one-to-many, many-to-one, as well as many-to-many communication is possible using
this model. Also, clients can publish data and at the same time receive data due to this two-
way communication protocol. Hence MQTT is considered to be bi-directional protocol. The
default unencrypted MQTT port used for data transmission is 1883. The encrypted port for
secure transmission is 8883.
Eliminates insecure connections –
In a complex system where multiple devices are connected with each other, each device not
only has to manage its connections with other devices but also has to ensure that these
connections are secure. But in the publish-subscribe model, the broker becomes central server
managing all security aspects. It is responsible for the authentication and authorization of all
connected clients.
Lightweight Communication –
Data transmission is quick, efficient, and lightweight because MQTT messages have small
code footprint. These control messages have a fixed header of size 2 bytes and payload
message up to size 256 megabytes.

3. How does MQTT work ?

Aimed at maximizing the available bandwidth, MQTT's publish/subscribe (pub/sub)


communication model is an alternative to traditional client-server architecture that
communicates directly with an endpoint. By contrast, in the pub/sub model, the client that
sends a message (the publisher) is decoupled from the client or clients that receive the
messages (or the subscribers). Because neither the publishers nor the subscribers contact each
other directly, third parties -- the brokers -- take care of the connections between them.

MQTT clients include publishers and subscribers, terms that refer to whether the client is
publishing messages or subscribed to receive messages. These two functions can be
implemented in the same MQTT client. When a device (or client) wants to send data to a
server (or broker) it is called a publish. When the operation is reversed, it is called a
subscribe. Under the pub/sub model, multiple clients can connect to a broker and subscribe to
topics in which they are interested.

If the connection from a subscribing client to a broker is broken, then the broker will buffer
messages and push them out to the subscriber when it is back online. If the connection from
the publishing client to the broker is disconnected without notice, then the broker can close
the connection and send subscribers a cached message with instructions from the publisher.

An IBM writeup describes the pub/sub model: "Publishers send the messages, subscribers
receive the messages they are interested in, and brokers pass the messages from the
publishers to the subscribers. Publishers and subscribers are MQTT clients, which only
communicate with an MQTT broker. MQTT clients can be any device or application (from
microcontrollers like the Arduino to a full application server hosted in the Cloud) that runs an
MQTT library."

4. What is an MQTT broker?

An MQTT broker acts as a go-between for the clients who are sending messages and the
subscribers who are receiving those messages. In a post office analogy, the broker is the post
office itself. All messages have to go through the broker before they can be delivered to the
subscriber.

Brokers may have to handle millions of concurrently connected MQTT clients, so when
choosing an MQTT broker, enterprises should rate them based on their scalability,
integration, monitoring and failure-resistance capabilities.

5. Types of MQTT messages


An MQTT session is divided into four stages: connection, authentication, communication and
termination. A client starts by creating a Transmission Control Protocol/Internet Protocol
(TCP/IP) connection to the broker by using either a standard port or a custom port defined by
the broker's operators. When creating the connection, it is important to recognize that the
server might continue an old session if it is provided with a reused client identity.

The standard ports are 1883 for non encrypted communication and 8883 for encrypted
communication -- using Secure Sockets Layer (SSL)/Transport Layer Security (TLS). During
the SSL/TLS handshake, the client validates the server certificate and authenticates the
server. The client may also provide a client certificate to the broker during the handshake.
The broker can use this to authenticate the client. While not specifically part of the MQTT
specification, it has become customary for brokers to support client authentication with
SSL/TLS client-side certificates.

Because the MQTT protocol aims to be a protocol for resource-constrained and IoT devices,
SSL/TLS might not always be an option and, in some cases, might not be desired. On such
occasions, authentication is presented as a clear text username and password, which are sent
by the client to the server -- this, as part of the CONNECT/CONNACK packet sequence. In
addition, some brokers, especially open brokers published on the internet, will accept
anonymous clients. In such cases, the username and password are simply left blank.

MQTT is considered a lightweight protocol because all its messages have a small code
footprint. Each message consists of a fixed header -- 2 bytes -- an optional variable header, a
message payload that is limited to 256 megabytes (MB) of information and a quality of
service (QoS) level.

During the communication phase, a client can perform publish, subscribe, unsubscribe and
ping operations. The publish operation sends a binary block of data -- the content -- to a topic
that is defined by the publisher.

MQTT supports message binary large objects (BLOBs) up to 256 MB in size. The format of
the content will be application-specific. Topic subscriptions are made using a
SUBSCRIBE/SUBACK packet pair, and unsubscribing is similarly performed using an
UNSUBSCRIBE/UNSUBACK packet pair.

Topic strings form a natural topic tree with the use of a special delimiter character, the
forward slash (/). A client can subscribe to -- and unsubscribe from -- entire branches in the
topic tree with the use of special wildcard characters. There are two wildcard characters: a
single-level wildcard character, the plus character (+); and a multilevel wildcard character,
the hash character (#). A special topic character, the dollar character ($), excludes a topic
from any root wildcard subscriptions. Typically, $ is used to transport server-specific or
system messages.

Another operation a client can perform during the communication phase is to ping the broker
server using a PINGREQ/PINGRESP packet sequence. This packet sequence roughly
translates to ARE YOU ALIVE/YES I AM ALIVE. This operation has no other function than
to maintain a live connection and ensure the TCP connection has not been shut down by a
gateway or router.

When a publisher or subscriber wants to terminate an MQTT session, it sends a


DISCONNECT message to the broker and then closes the connection. This is called a
graceful shutdown because it gives the client the ability to easily reconnect by providing its
client identity and resuming where it left off.

Should the disconnect happen suddenly without time for a publisher to send a
DISCONNECT message, the broker may send subscribers a message from the publisher that
the broker has previously cached. The message, which is called a last will and testament,
provides subscribers with instructions for what to do if the publisher dies unexpectedly.

6. What are the benefits of using MQTT?

The lightweight properties and minimum overhead of the MQTT protocol architecture help
ensure smooth data transfer with low bandwidth and reduce the load on the CPU and RAM.

Among MQTT's advantages over competing protocols are the following:

Efficient data transmission and quick to implement, due to its being a lightweight protocol;
low network usage, due to minimized data packets; efficient distribution of data; successful
implementation of remote sensing and control; fast, efficient message delivery; uses small
amounts of power, which is good for the connected devices; and optimizes network
bandwidth.
7. What are the drawbacks of MQTT?

Potential down sides to MQTT include the following:

MQTT has slower transmit cycles compared to Constrained Application Protocol (CoAP).
MQTT's resource discovery works on flexible topic subscription, whereas CoAP uses a stable
resource discovery system.
MQTT is unencrypted. Instead, it uses TLS/SSL (Transport Layer Security/Secure Sockets
Layer) for security encryption.
It is difficult to create a globally scalable MQTT network.
Other MQTT challenges relate to security, interoperability and authentication.

Because the MQTT protocol was not designed with security in mind, the protocol has
traditionally been used in secure back-end networks for application-specific purposes.
MQTT's topic structure can easily form a huge tree, and there is no clear way to divide a tree
into smaller logical domains that can be federated. This makes it difficult to create a globally
scalable MQTT network because, as the size of the topic tree grows, the complexity
increases.

Another negative aspect of MQTT is its lack of interoperability. Because message payloads
are binary, with no information as to how they are encoded, problems can arise -- especially
in open architectures where different applications from different manufacturers are supposed
to work seamlessly with each other.
As touched upon previously, MQTT has minimal authentication features built into the
protocol. Usernames and passwords are sent in cleartext, and any form of secure use of
MQTT must employ SSL/TLS, which, unfortunately, is not a lightweight protocol.

Authenticating clients with client-side certificates is not a simple process, and there is no way
in MQTT to control who owns a topic and who can publish information on it, except using
proprietary, out-of-band means. This makes it easy to inject harmful messages into the
network, either willfully or by mistake.

Furthermore, there is no way for the message receiver to know who sent the original message
unless that information is contained in the actual message. Security features that must be
implemented on top of MQTT in a proprietary fashion increase the code footprint and make
implementations more difficult.
7. MQTT protocol applications and use cases :

Due to its lightweight properties MQTT works well for applications involving remote
monitoring, including the following:

Synchronization of sensors, such as fire detectors or motion sensors for theft detection, to
determine if a hazard is valid; monitoring health parameters using sensors for patients leaving
a hospital; and sensors alerting people of danger.
Another application is a text-based messaging application for real-time communication that
capitalizes on MQTT's low data and energy usage.
Example :
Facebook uses MQTT for its Messenger app, not only because the protocol conserves
battery power during mobile phone-to-phone messaging, but also because the protocol
enables messages to be delivered efficiently in milliseconds, despite inconsistent internet
connections across the globe.

You might also like