Iot Pyq 2023
Iot Pyq 2023
me/wbdetc
INTERNET OF THINGS _BROAD QUESTIONS & ANSWER (2023)
➨MQTT uses TCP protocol which requires more processing power and more memory. TCP uses handshake
protocol which requires frequent wake up and communica on me intervals. This affects ba ery
consump on. Moreover TCP connected devices tend to keep sockets open for each other which adds
memory/power requirements.
➨Centralized broker limits the scalability as each client devices take up some overhead. In order to avail
scalability, local broker hub is used.
➨Centralized broker can be point of failure as client connec ons with broker are open all the me.
➨It is not easy to implement compare to HTTP.
➨It does not support advanced features such as flow control.
➨In MQTT protocol, clients must have to support TCP/IP.
• Link Layer : This layer sits above the Physical layer. It is responsible for adver sing, scanning, and
crea ng/maintaining connec ons. The role of BLE devices changes in peer to peer (i.e. Unicast) or broadcast
modes. The common roles are Adver ser/Scanner (Ini ator),
Slave/Master or Broadcaster/Observer. Link layer states are
defined in the figure below.
The device will be in any one of these states which include
Standby state, Adver sing state, Scanning state, Ini a ng
state, Connec on State and Synchroniza on state.
• L2CAP :This layer offers data encapsula on services to upper layers. This allows logical end to end data
communica on.
• SMP :This security Manager layer provides methods for device pairing and key distribu ons. It offers services
to other protocol stack layers in order to securely connect and exchange data between BLE devices.
GAP : This layer directly interfaces with applica on layer and/or profiles on it. It handles device discovery and
connec on related services for BLE device. It also takes care of ini a on of security features.
• GATT : This layer is service framework which specifies sub-procedures to use ATT. Data communica ons
between two BLE devices are handled through these sub-procedures. The applica ons and/or profiles will use
GATT directly.
• ATT : This layer allows BLE device to expose certain pieces of data or a ributes.
•Applica on Layer :
• The BLE protocol stack layers interact with applica ons and profiles as desired. Applica on interoperability in
the Bluetooth system is accomplished by Bluetooth profiles.
• The profile defines the ver cal interac ons between the layers as well as the peer-to-peer interac ons of
specific layers between devices.
• A profile composed of one or more services to address par cular use case. A service consists of
characteris cs or references to other services.
• Any profiles/applica ons run on top of GAP/GATT layers of BLE protocol stack. It handles device discovery
and connec on related services for the BLE device.
References:-
B ) Advantages of Zigbee:
1. Designed for low power consump on.
2. Provides network security and applica on support services opera ng 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 implementa on
6. Adequate security features.
7. Low cost: Zigbee chips and modules are rela vely inexpensive, which makes it a cost-effec ve solu on
for IoT applica ons.
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
applica ons 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 condi ons.
C) Disadvantages of Zigbee :
1. Limited range: Zigbee has a rela vely short range compared to other wireless communica ons
protocols, which can make it less suitable for certain types of applica ons or for use in large buildings.
2. Limited data rate: Zigbee is designed for low-data-rate applica ons, which can make it less suitable for
applica ons 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 compa ble 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.
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 func on of the router is to extend the network coverage.
Architecture of Zigbee:
Zigbee architecture is a combina on of 6 layers.
1. Applica on Layer
2. Applica on Interface Layer
3. Security Layer
4. Network Layer
5. Medium Access Control Layer
6. Physical Layer
Physical layer: The lowest two layers i.e the physical and the MAC (Medium Access Control) Layer are
defined by the IEEE 802.15.4 specifica ons. The Physical layer is closest to the hardware and directly
controls and communicates with the Zigbee radio. The physical layer translates the data packets in the
over-the-air bits for transmission and vice-versa during the recep on.
Medium Access Control layer (MAC layer): The layer is responsible for the interface between the
physical and network layer. The MAC layer is also responsible for providing PAN ID and also network
discovery through beacon requests.
Network layer: This layer acts as an interface between the MAC layer and the applica on layer. It is
responsible for mesh networking.
Applica on layer: The applica on layer in the Zigbee stack is the highest protocol layer and it consists
of the applica on support sub-layer and Zigbee device object. It contains manufacturer-defined
applica ons.
6. A) What are the different component of IoT? 4
Internet of Things (IoT) is an ecosystem of connected physical objects that are accessible through the
Internet (formal defini on). So, in simple terms IOT means anything that can be connected to internet
and can be controlled / monitored using Internet from our smart devices or PCs.
These are explained as following below.
Major Components of IOT :
1. Things or Device
These are fi ed with sensors and actuators. Sensors collect data from the environment and give to
gateway where as actuators performs the ac on (as directed a er processing of data).
2. Gateway
The sensors give data to Gateway and here some kind of pre-processing of data is even done. It also
acts as a level of security for the network and for the transmi ed data.
3. Cloud
The data a er being collected is uploaded to cloud. Cloud in simple terms is basically a set of servers
connected to internet 24*7.
4. Analy cs
The data a er being received in the cloud processing is done . Various algorithms are applied here for
proper analysis of data (techniques like Machine Learning etc are even applied).
5. User Interface
User end applica on where user can monitor or control the data.
There are many different types of sensors used in the Internet of Things (IoT) system, including:
Temperature sensors: Measure the heat generated by an object or area, and are used in smart homes,
agriculture, and industrial processes
Proximity sensors: Detect the presence of an object or person without physical contact
Pressure sensors: Detect changes in a gas or liquid, and are used in leak tes ng and water system
manufacturing
Water quality sensors: Monitor the quality of water
Chemical and gas sensors: Monitor air quality for hazardous or toxic gases
Infrared sensors: Detect or emit infrared radia on to sense changes in the surrounding area
Smoke sensors: Detect smoke, and are commonly used in homes and businesses
Mo on sensors: Detect physical movement in an area
Level sensors: Detect the level of various substances, such as liquids, granular material, and powder
Image sensors: Convert op cal images into signals, and are generally used to store or display files
electronically
Humidity sensors: Measure the moisture content in the air, and are used in greenhouses, HVAC
systems, and weather monitoring
Electro-op cal sensors: Use visible and infrared light detec on to measure a ributes like size, shape,
and color, and take pictures
7. A) What is Raspberry pi? Name of the different components in raspberry pi board. 2+2
Raspberry Pi is a small single-board computer (SBC). It is a credit card-sized computer that can
be plugged into a monitor. It acts as a minicomputer by connec ng the keyboard, mouse, and
display. Raspberry Pi has an
ARM processor and 512MB
of RAM.
A GPIO pin designated as an output pin can be set to high (3.3V) or low (0V). Components are usually
a ached so that se ng the output to high will allow current to flow to them, while se ng the output to
low won't. A GPIO pin that is designated as an input will allow a signal to be received by the Raspberry Pi.
DSI stands for Display Serial Interface, a high-speed serial interface between a host processor and a display
module. It's also known as MIPI DSI, which stands for mobile industry processor interface display serial
interface.
Advantages of IoT
Execute mul ple tasks at a me like a computer.
Easiest internet connec vity
Works on GUI (Graphical User Interface) mode because of HDMI port.
More reliable for so ware applica ons.
Disadvantages of IoT
Security concerns and poten al for hacking or data breaches.
Privacy issues related to the collec on and use of personal data.
Dependence on technology and poten al for system failures.
Limited standardiza on and interoperability among devices.
10.A) Write a program in python to detect the all prime number from 10 to 100 and store
them to a set. 5
def is_prime(number):
if number < 2:
return False
for i in range(2, int(number**0.5) + 1):
if number % i == 0:
return False
return True
def find_primes(start, end):
prime_set = set()
for num in range(start, end + 1):
if is_prime(num):
prime_set.add(num)
return prime_set
# Detect prime numbers from 10 to 100 and store them in a set
prime_numbers_set = find_primes(10, 100)
# Print the set (op onal)
print("Prime numbers between 10 and 100:")
print(prime_numbers_set)
B) Block diagram of a sensor in a WSN. 3
Wireless Sensor Network (WSN), is an infrastructure-less wireless network that is deployed in a large number
of wireless sensors in an ad-hoc manner that is used to monitor the system, physical, or environmental
condi ons.
Sensor nodes are used in WSN with the onboard processor that manages and monitors the environment in a
par cular area. They are connected to the Base Sta on which acts as a processing unit in the WSN System. The
base Sta on in a WSN System is connected through the Internet to share data. WSN can be used for
processing, analysis, storage, and mining of the data.