0% found this document useful (0 votes)
32 views37 pages

Unit-3 Iot (Q&a)

Uploaded by

Manohar Manu
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)
32 views37 pages

Unit-3 Iot (Q&a)

Uploaded by

Manohar Manu
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/ 37

1

IOT and Applications


UNIT-3
JNTUK Previous Question & Answers

Q.1.Explain the benefits of using Python programming language in IoT. [8M]

A. Python is increasingly being adopted in IoT (Internet of Things) development due to several benefits
it offers:

1. Ease of Learning and Readability: Python's simple and clean syntax makes it easy to learn,
understand, and write code. This is particularly advantageous for IoT developers who may come
from diverse backgrounds, including hardware engineering or data science.
2. Wide Range of Libraries and Frameworks: Python boasts a vast ecosystem of libraries and
frameworks that cater to various IoT needs.
3. making it easier to work with embedded systems. Additionally, libraries such as PySerial
facilitate serial communication, while Requests and Flask enable web-based communication
for IoT devices.
4. Cross-Platform Compatibility: Python runs on multiple platforms, including Linux, Windows,
macOS, and various embedded systems. This cross-platform compatibility is crucial in IoT
development, where devices may have diverse operating environments.
5. Community Support: Python has a large and active community of developers contributing to its
growth.
6. Rapid Prototyping and Development: Python's high-level abstractions and dynamic typing
facilitate rapid prototyping and development cycles
7. Integration with Data Analytics and Machine Learning: Python's popularity in data analytics
and machine learning makes it a natural choice for IoT projects that involve data processing,
analysis, and machine learning at the edge. Libraries like NumPy, Pandas, TensorFlow, and
scikit-learn seamlessly integrate with IoT applications, enabling advanced analytics and
decision-making capabilities.
8. Support for Asynchronous Programming: Asynchronous programming is crucial for IoT
applications to handle concurrent tasks efficiently without blocking operations. Python's
asyncio library provides built-in support for asynchronous programming, making it easier to
develop IoT systems that can handle multiple concurrent tasks effectively.
9. Scalability: While Python is often criticized for its performance compared to lower-level
languages like C or C++, advancements such as Just-In-Time (JIT) compilation and
optimizations in Python interpreters have improved its performance significantly.

DEPARTMENT OF DATASCIENCE
2

Q.2.List and explain some python packages of internet for IOT.[8M]

There are several Python packages tailored for IoT development that facilitate various aspects of
internet connectivity, communication protocols, device management, and data processing. Here are
some notable ones:

1. MQTT (Message Queuing Telemetry Transport):


o Paho-MQTT: Paho is a popular MQTT client library for Python. It allows devices to
communicate with MQTT brokers, enabling lightweight and efficient messaging
between IoT devices and servers. MQTT is commonly used in IoT for its low overhead
and support for asynchronous communication.
2. HTTP and RESTful APIs:
o Requests: Requests is a simple and elegant HTTP library for Python, allowing easy
integration of IoT devices with web services and RESTful APIs. It simplifies making
HTTP requests, handling responses, and managing sessions, making it ideal for IoT
applications requiring web connectivity.
o Flask/Django: Flask and Django are web frameworks for Python that facilitate building
web applications and RESTful APIs. They are commonly used in IoT projects for
developing server-side applications to interact with and manage IoT devices.
3. CoAP (Constrained Application Protocol):
o CoAPthon: CoAPthon is a Python library for implementing CoAP servers and clients.
CoAP is a lightweight protocol designed for constrained devices and low-power
networks, making it suitable for IoT applications where resources are limited.
4. WebSockets:
o Websockets: The websockets library provides a simple and efficient implementation of
WebSockets for Python, allowing real-time bidirectional communication between IoT
devices and servers. WebSockets are commonly used in IoT for applications requiring
low-latency and real-time updates.
5. Bluetooth and BLE (Bluetooth Low Energy):
o PyBluez: PyBluez is a Python library for Bluetooth and BLE communication. It enables
Python applications to interact with Bluetooth-enabled devices, making it suitable for
IoT projects involving proximity-based interactions or device-to-device communication
over Bluetooth.
6. Device Management:
o AWS IoT SDK for Python (boto3): The AWS IoT SDK for Python (boto3) provides
Python APIs for managing IoT devices, sending and receiving messages, and interacting
with AWS IoT services. It enables seamless integration of IoT devices with the AWS
ecosystem, facilitating device provisioning, authentication, and management.
o Azure IoT SDK for Python: Similar to AWS IoT SDK, the Azure IoT SDK for Python
provides APIs for developing IoT solutions on the Microsoft Azure platform. It includes
modules for device communication, data ingestion, and integration with Azure IoT
services.
7. Sensor Data Processing:
o NumPy and Pandas: NumPy and Pandas are powerful libraries for numerical computing
and data manipulation in Python. They are commonly used in IoT projects for

DEPARTMENT OF DATASCIENCE
3

processing sensor data, performing data analysis, and extracting insights from IoT-
generated data streams.

These packages cover a range of functionalities necessary for IoT development, from communication
protocols and web connectivity to device management and data processing, enabling developers to
build sophisticated and scalable IoT solutions using Python.

Q.3.Write a Python program for blinking an LED.

The below is a simple Python program using the gpiozero library to control a GPIO pin on a
Raspberry Pi to blink an LED. Ensure you have the gpiozero library installed. If not, you can install it
using pip install gpiozero.

python
from gpiozero import LED
from time import sleep

# Define the GPIO pin number where the LED is connected


led_pin = 17 # Change this to the GPIO pin number you are using

# Create an LED object


led = LED(led_pin)

# Blink the LED 5 times


for i in range(5):
led.on() # Turn on the LED
sleep(1) # Wait for 1 second
led.off() # Turn off the LED
sleep(1) # Wait for 1 second

# Cleanup GPIO resources


led.close()

Make sure to connect the positive (anode) leg of the LED to the GPIO pin defined in led_pin (in this
case, pin 17), and the negative (cathode) leg to the ground (GND) pin of the Raspberry Pi.

This program will blink the LED connected to the specified GPIO pin five times, with each blink
lasting for one second. Adjust the pin number and the number of blinks as needed.

Q.4.Why the python is the first choice for the Raspberry Pi language than C or C++?

Python is often the first choice for Raspberry Pi development over languages like C or C++ for several
reasons:

1. Ease of Learning and Use: Python has a simple and clean syntax that is easy to read and
understand, making it accessible to beginners and experienced programmers alike. This ease of
learning and use lowers the barrier to entry for Raspberry Pi enthusiasts, hobbyists, and students
who may not have a background in programming.
2. Rapid Prototyping and Development: Python's high-level abstractions and dynamic typing
enable rapid prototyping and development cycles. With Python, developers can quickly iterate
DEPARTMENT OF DATASCIENCE
4

on ideas and projects, making it ideal for experimenting and building projects on the Raspberry
Pi platform.
3. Vast Ecosystem of Libraries: Python boasts a vast ecosystem of libraries and frameworks for
various purposes, including web development, data analysis, machine learning, and IoT. Many
of these libraries are well-supported on the Raspberry Pi platform, allowing developers to
leverage existing tools and resources to expedite development.
4. Community Support: Python has a large and active community of developers who contribute
to its growth and provide support through forums, online resources, and open-source projects.
This extensive community support means that Raspberry Pi developers can easily find help,
documentation, and solutions to their problems.
5. Cross-Platform Compatibility: Python runs on multiple platforms, including Linux, Windows,
macOS, and various embedded systems. This cross-platform compatibility is crucial for
Raspberry Pi development, where developers may need to deploy their projects on different
environments.
6. Integration with Hardware and IoT: Python has libraries like gpiozero and picamera that
facilitate interaction with GPIO pins, sensors, actuators, and other hardware components
commonly used with the Raspberry Pi. Python's flexibility and ease of integration make it well-
suited for IoT and hardware-related projects.
7. Performance: While Python is often criticized for its performance compared to lower-level
languages like C or C++, advancements such as Just-In-Time (JIT) compilation and
optimizations in Python interpreters have improved its performance significantly. For many
Raspberry Pi projects, the performance difference may not be critical, and the productivity gains
from using Python outweigh the performance considerations.

Q.5. What is sensor? Explain the Types of Sensors.[8M]

Generally, sensors are used in the architecture of IOT devices.

Sensors are used for sensing things and devices etc.

A device that provides a usable output in response to a specified measurement.


The sensor attains a physical parameter and converts it into a signal suitable for processing (e.g. electrical,
mechanical, optical) the characteristics of any device or material to detect the presence of a particular
physical quantity.
The output of the sensor is a signal which is converted to a human-readable form like changes in
characteristics, changes in resistance, capacitance, impedance, etc.

DEPARTMENT OF DATASCIENCE
5

IOT HARDWARE

Transducer :

• A transducer converts a signal from one physical structure to another.


• It converts one type of energy into another type.
• It might be used as actuator in various systems.

Sensors characteristics :

1. Static
2. Dynamic

1. Static characteristics :
It is about how the output of a sensor changes in response to an input change after steady state
condition.

• Accuracy: Accuracy is the capability of measuring instruments to give a result close to the true
value of the measured quantity. It measures errors. It is measured by absolute and relative
errors. Express the correctness of the output compared to a higher prior system. Absolute error
= Measured value – True value
Relative error = Measured value/True value
• Range: Gives the highest and the lowest value of the physical quantity within which the sensor
can actually sense. Beyond these values, there is no sense or no kind of response.
e.g. RTD for measurement of temperature has a range of -200`c to 800`c.
• Resolution: Resolution is an important specification for selection of sensors. The higher the
resolution, better the precision.
• Precision: It is the capacity of a measuring instrument to give the same reading when
repetitively measuring the same quantity under the same prescribed conditions.
• Sensitivity: Sensitivity indicates the ratio of incremental change in the response of the system
with respect to incremental change in input parameters
• Linearity: The deviation of the sensor value curve from a particularly straight lineA curve’s
slope resemblance to a straight line describes linearity.
• Drift: The difference in the measurement of the sensor from a specific reading when kept at that
value for a long period of time.
• Repeatability: The deviation between measurements in a sequence under the same conditions.
The measurements have to be made under a short enough time duration so as not to allow
significant long-term drift.

Dynamic Characteristics :
Properties of the systems

• Zero-order system: The output shows a response to the input signal with no delay. It does not
include energy-storing elements.
Ex. potentiometer measure, linear and rotary displacements.

DEPARTMENT OF DATASCIENCE
6

• First-order system: When the output approaches its final value gradually.
Consists of an energy storage and dissipation element.
• Second-order system: Complex output response. The output response of the sensor oscillates
before steady state.

Sensor Classification :

• Passive & Active


• Analog & digital
• Scalar & vector

1. Passive Sensor –
Can not independently sense the input. Ex- Accelerometer, soil moisture, water level and
temperature sensors.
2. Active Sensor –
Independently sense the input. Example- Radar, sounder and laser altimeter sensors.
3. Analog Sensor –
The response or output of the sensor is some continuous function of its input parameter. Ex-
Temperature sensor, LDR, analog pressure sensor and analog hall effect.
4. Digital sensor –
Response in binary nature. Design to overcome the disadvantages of analog sensors. Along with
the analog sensor, it also comprises extra electronics for bit conversion. Example – Passive
infrared (PIR) sensor and digital temperature sensor(DS1620).
5. Scalar sensor –
Detects the input parameter only based on its magnitude. The answer for the sensor is a function
of magnitude of some input parameter. Not affected by the direction of input parameters.
Example – temperature, gas, strain, color and smoke sensor.
6. Vector sensor –
The response of the sensor depends on the magnitude of the direction and orientation of input
parameter. Example – Accelerometer, gyroscope, magnetic field and motion detector sensors.

Types of sensors –

• Electrical sensor :

Electrical proximity sensors may be contact or non contact.

Simple contact sensors operate by making the sensor and the component complete an electrical circuit.

Non- contact electrical proximity sensors rely on the electrical principles of either induction for
detecting metals or capacitance for detecting non metals as well.

• Light sensor:

Light sensor is also known as photo sensors and one of the important sensor.

DEPARTMENT OF DATASCIENCE
7

Light dependent resistor or LDR is a simple light sensor available today.

The property of LDR is that its resistance is inversely proportional to the intensity of the ambient light
i.e when the intensity of light increases, it’s resistance decreases and vise versa.

• Touch sensor:

Detection of something like a touch of finger or a stylus is known as touch sensor.

It’s name suggests that detection of something.

They are classified into two types:

1. Resistive type
2. Capacitive type

Today almost all modern touch sensors are of capacitive types.

Because they are more accurate and have better signal to noise ratio.

• Range sensing:

Range sensing concerns detecting how near or far a component is from the sensing position, although
they can also be used as proximity sensors.

Distance or range sensors use non-contact analog techniques. Short range sensing, between a few
millimetres and a few hundred millimetres is carried out using electrical capacitance, inductance and
magnetic technique.

Longer range sensing is carried out using transmitted energy waves of various types eg radio waves,
sound waves and lasers.

• Mechanical sensor:

Any suitable mechanical / electrical switch may be adopted but because a certain amount of force is
required to operate a mechanical switch it is common to use micro-switches.

• Pneumatic sensor:

These proximity sensors operate by breaking or disturbing an air flow.

The pneumatic proximity sensor is an example of a contact type sensor. These cannot be used where
light components may be blown away.

DEPARTMENT OF DATASCIENCE
8

• Speed Sensor:

Sensor used for detecting the speed of any object or vehicle which is in motion is known as speed
sensor .For example – Wind Speed Sensors, Speedometer ,UDAR ,Ground Speed Radar .

• Temperature Sensor:

Devices which monitors and tracks the temperature and gives temperature’s measurement as an
electrical signal are termed as temperature sensors .These electrical signals will be in the form of
voltage and is directly proportional to the temperature measurement .

• PIR Sensor:

PIR stands for passive infrared sensor and it is an electronic sensor that is used for the tracking and
measurement of infrared (IR) light radiating from objects in its field of view and is also known as
Pyroelectric sensor .It is mainly used for detecting human motion and movement detection .

• Ultrasonic Sensor:

The principle of ultrasonic sensor is similar to the working principle of SONAR or RADAR in which
the interpretation of echoes from radio or sound waves to evaluate the attributes of a target by
generating the high frequency sound waves .

Q.6.What is an Actuator? Explain its Types[8m].

An actuator is a machine component or system that moves or controls the mechanism of the system.
Sensors in the device sense the environment, then control signals are generated for the actuators
according to the actions needed to perform.

A servo motor is an example of an actuator. They are linear or rotatory actuators, can move to a given
specified angular or linear position. We can use servo motors for IoT applications and make the motor
rotate to 90 degrees, 180 degrees, etc., as per our need.

The following diagram shows what actuators do, the controller directs the actuator based on the sensor
data to do the work.

DEPARTMENT OF DATASCIENCE
9

Working of IoT devices and use of Actuators

The control system acts upon an environment through the actuator. It requires a source of energy and a
control signal. When it receives a control signal, it converts the source of energy to a mechanical

operation. On this basis, on which form of energy it uses, it has different types given below.

Types of Actuators :

1. Hydraulic Actuators –

A hydraulic actuator uses hydraulic power to perform a mechanical operation. They are actuated by a
cylinder or fluid motor. The mechanical motion is converted to rotary, linear, or oscillatory motion,
according to the need of the IoT device. Ex- construction equipment uses hydraulic actuators because
hydraulic actuators can generate a large amount of force.

Advantages :

• Hydraulic actuators can produce a large magnitude of force and high speed.
• Used in welding, clamping, etc.
• Used for lowering or raising the vehicles in car transport carriers.

Disadvantages :

• Hydraulic fluid leaks can cause efficiency loss and issues of cleaning.
• It is expensive.
• It requires noise reduction equipment, heat exchangers, and high maintenance systems.

2. Pneumatic Actuators –

A pneumatic actuator uses energy formed by vacuum or compressed air at high pressure to convert into
either linear or rotary motion. Example- Used in robotics, use sensors that work like human fingers by
using compressed air.

Advantages :

• They are a low-cost option and are used at extreme temperatures where using air is a safer
option than chemicals.
• They need low maintenance, are durable, and have a long operational life.
• It is very quick in starting and stopping the motion.

Disadvantages :

• Loss of pressure can make it less efficient.


• The air compressor should be running continuously.
• Air can be polluted, and it needs maintenance.

DEPARTMENT OF DATASCIENCE
10

3. Electrical Actuators –

An electric actuator uses electrical energy, is usually actuated by a motor that converts electrical energy
into mechanical torque. An example of an electric actuator is a solenoid based electric bell.

Advantages :

• It has many applications in various industries as it can automate industrial valves.


• It produces less noise and is safe to use since there are no fluid leakages.
• It can be re-programmed and it provides the highest control precision positioning.

Disadvantages :

• It is expensive.
• It depends a lot on environmental conditions.

Other actuators are –

• Thermal/Magnetic Actuators –
These are actuated by thermal or mechanical energy. Shape Memory Alloys (SMAs) or
Magnetic Shape‐Memory Alloys (MSMAs) are used by these actuators. An example of a
thermal/magnetic actuator can be a piezo motor using SMA.
• Mechanical Actuators –
A mechanical actuator executes movement by converting rotary motion into linear motion. It
involves pulleys, chains, gears, rails, and other devices to operate. Example – A crankshaft.
• Soft Actuators
• Shape Memory Polymers
• Light Activated Polymers

Q.7.Explain with example MQTT protocol.What is the role of MQTT protocol in IOT?

MQTT stands for Message Queuing Telemetry Transport. MQTT is a machine to machine internet
of things connectivity protocol. It is an extremely lightweight and publish-subscribe messaging
transport protocol. It is used in IOT and M2M Applications.This protocol is useful for the connection
with the remote location where the bandwidth is a premium. These characteristics make it useful in
various situations, including constant environment such as for communication machine to machine and
internet of things contexts. It is a publish and subscribe system where we can publish and receive the
messages as a client. It makes it easy for communication between multiple devices. It is a simple
messaging protocol designed for the constrained devices and with low bandwidth, so it's a perfect
solution for the internet of things applications.

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:

DEPARTMENT OF DATASCIENCE
11

ADVERTISEMENT
ADVERTISEMENT

• It is a machine to machine protocol, i.e., it provides communication between the devices.


• It is designed as a simple and lightweight messaging protocol that uses a publish/subscribe
system to exchange the information between the client and the server.
• It does not require that both the client and the server establish a connection at the same time.
• It provides faster data transmission, like how WhatsApp/messenger provides a faster delivery.
It's a real-time messaging protocol.
• It allows the clients to subscribe to the narrow selection of topics so that they can receive the
information they are looking for.

MQTT Architecture

To understand the MQTT architecture, we first look at the components of the MQTT.

• Message
• Client
• Server or Broker
• 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:

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.
DEPARTMENT OF DATASCIENCE
12

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

MQTT Message Format

DEPARTMENT OF DATASCIENCE
13

The MQTT uses the command and the command acknowledgment format, which means that each
command has an associated acknowledgment. As shown in the above figure that the connect command
has connect acknowledgment, subscribe command has subscribe acknowledgment, and publish
command has publish acknowledgment. This mechanism is similar to the handshaking mechanism as in
TCP protocol.

Now we will look at the packet structure or message format of the MQTT.

Advantages:

• lightweight and battery-friendly,


• it connects devices during unreliable networks
• it enables communication between the cloud and devices
• and it has extensive programming support.

Disadvantages:

• There are, however, some drawbacks to MQTT, such as its inability to support video
streaming and its latency problems.

Applications;

• MQTT is now used in many industries, including automobile,


• Industrial
• communications, oil and gas, and so on.

Q.8.Explain COAP in detail [8M]

CoAP is an IoT protocol. CoAP stands for Constrained Application Protocol and it is defined in RFC
7252. CoAP is a simple protocol with low overhead specifically designed for constrained devices (such
as microcontrollers) and constrained networks. This protocol is used in M2M data exchange and it is
very similar to HTTP .

DEPARTMENT OF DATASCIENCE
14

The main features of CoAP protocols are:

• Web protocol used in M2M with constrained requirements


• Asynchronous message exchange
• Low overhead and very simple to parse
• URI and content-type support
• Proxy and caching capabilities

CoAP supports four different message types:

• Confirmable
• Non-confirmable
• Acknowledgment
• Reset

Sender: The entity that sends a message

Recipient: The destination of a message

Client: The entity that sends a request and the destination of the response

Server: The entity that receives a request from a client and sends back a response to the client

A confirmable message is a reliable message. When exchanging messages between two endpoints,
these messages can be reliable. In CoAP a reliable message is obtained using a Confirmable message
(CON). Using this kind of message, the client can be sure that the message will arrive at the server. A
Confirmable message is sent again and again until the other party sends an acknowledge message
(ACK). The ACK message contains the same ID of the confirmable message (CON).

The picture below shows the message exchange process:

DEPARTMENT OF DATASCIENCE
15

If the server has troubles managing the incoming request it can send back a Rest message (RST) instead
of the Acknowledge message (ACK):

The other message category is the Non-confirmable (NON) messages. These are messages that don’t
require an Acknowledge by the server. They are unreliable messages or in other words messages that
do not contain critical information that must be delivered to the server. To this category belongs
messages that contain values read from sensors.

Even if these messages are unreliable, they have a unique ID.

CoAp Request/Response Model

The CoAP Request/Response is the second layer in the CoAP abstraction layer. The request is sent
using a Confirmable (CON) or Non-Confirmable (NON) message. There are several scenarios
depending on if the server can answer immediately to the client request or the answer if not available:

If the server can answer immediately to the client request then if the request is carried using a
Confirmable message (CON) then the server sends back to the client an Acknowledge message
containing the response or the error code:

DEPARTMENT OF DATASCIENCE
16

CoAp Message Format

This paragraph covers the CoAP Message format. By now we have discussed different kinds of
messages exchanged between the client and the server, now it is time to analyze the message format.
The constrained application protocol is meat for constrained environments and for this reason, it uses
compact messages. To avoid fragmentation, a message occupies the data section of a UDP datagram. A
message is made by several parts:

Where:

Ver: It is a 2 bit unsigned integer indicating the version

T: it is a 2 bit unsigned integer indicating the message type: 0 confirmable, 1 non-confirmable

TKL: Token Length is the token 4 bit length

Code: It is the code response (8 bit length)

Message ID: It is the message ID expressed with 16 bit

DEPARTMENT OF DATASCIENCE
17

Advantages:

• It is simple protocol and uses less overhead due to operation over UDP.
• Synchronous communication is not necessity in CoAP protocol.
• It has lower latency compare to HTTP.
• It consumes less power than HTTP.

Disadvantages:

• CoAP is unreliable protocol due to use of UDP


• CoAP has communication issues for devices behind NAT (Network Address Translation).

Applications:

It is generally used for machine-to-machine (M2M) applications such as smart energy and building
automation.

Q.9.What is Zigbee? Explain [8M]

Zigbee is a low-power wireless communication protocol specifically designed for short-range


communication between devices in IoT (Internet of Things) and M2M (Machine to Machine)
applications. It operates on the IEEE 802.15.4 standard, defining the physical and MAC (Media Access
Control) layers, while Zigbee itself defines the higher network and application layers.

Types of ZigBee Devices:

• 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.

DEPARTMENT OF DATASCIENCE
18

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.

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.

Architecture of Zigbee:

Zigbee architecture is a combination of 6 layers.

1. Application Layer
2. Application Interface Layer
3. Security Layer
4. Network Layer
5. Medium Access Control Layer
6. Physical Layer

DEPARTMENT OF DATASCIENCE
19

• 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 specifications. The Physical layer is closest to the
hardware and directly controls and communicates with the Zigbee radio
• Medium Access Control layer (MAC layer): The layer is responsible for the interface between
the physical and network layer.
• Network layer: This layer acts as an interface between the MAC layer and the application layer.
It is responsible for mesh networking.
• Application layer: The application layer in the Zigbee stack is the highest protocol layer and it
consists of the application support sub-layer and Zigbee device object. It contains manufacturer-
defined applications.

Advantages of Zigbee:

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:.
8. Mesh networking
9. Reliability

Disadvantages of Zigbee :

1. Limited range: Zigbee has a relatively short range compared to other wireless communications
protocols,
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.

Zigbee Applications:

1. Home Automation
2. Medical Data Collection
3. Industrial Control Systems
4. meter reading system

DEPARTMENT OF DATASCIENCE
20

Q.10. Explain the differences between MQTT and COAP. [8M]

1. Constrained Application Protocol (COAP): The constrained application protocol is a client server-
based protocol. With this protocol, the COAP packet can be shared between different client nodes
which are commanded by the COAP server. The server is responsible to share the information
depending on its logic but has not acknowledged it. This is used with the applications which support the
state transfer model.

2. Message Queuing Telemetry Transport (MQTT): The message query telemetry transport protocol
is a communication-based protocol that is used for IoT devices. This protocol is based on the publish-
subscribe methodology in which clients receive the information through a broker only to the subscribed
topic. A broker is a mediator who categorizes messages into labels before being delivered.

Difference between COAP and MQTT protocols:

Basis of COAP MQTT

Message Queuing Telemetry


Abbreviation Constrained Application Protocol
Transport

Communication
It uses Request-Response model. It uses Publish-Subscribe model
Type

This uses both Asynchronous and


Messaging Mode This uses only Asynchronous
Synchronous.

Transport layer This mainly uses User Datagram This mainly uses Transmission
protocol protocol(UDP) Control protocol(TCP)

Header size It has 4 bytes sized header It has 2 bytes sized header

RESTful based Yes it uses REST principles No it does not uses REST principles

It supports and best used for live


Persistence support It does not has such support
data communication

It provides by adding labels to the


Message Labelling It has no such feature.
messages.

It is used in Utility area networks and It is used in IoT applications and is


Usability/Security
has secured mechanism. secure

Effectiveness Effectiveness in LNN is excellent. Effectiveness in LNN is low.

Communication Communication model is many-


Communication model is one-one.
Model many.

DEPARTMENT OF DATASCIENCE
21

Q.11.Explain in breif about TCP .[8M]

Transmission Control Protocol is a connection-oriented protocol for communications that helps in the
exchange of messages between different devices over a network. The Internet Protocol (IP), which
establishes the technique for sending data packets between computers, works with TCP.

The position of TCP is at the transport layer of the OSI model. TCP also helps in ensuring that information
is transmitted accurately by establishing a virtual connection between the sender and receiver.

Working of Transmission Control Protocol (TCP)

To make sure that each message reaches its target location intact, the TCP/IP model breaks down the data
into small bundles and afterward reassembles the bundles into the original message on the opposite end.
Sending the information in little bundles of information makes it simpler to maintain efficiency as
opposed to sending everything in one go.

After a particular message is broken down into bundles, these bundles may travel along multiple routes
if one route is jammed but the destination remains the same.

TCP

For Example: When a user requests a web page on the internet, somewhere in the world, the server
processes that request and sends back an HTML Page to that user. The server makes use of a protocol

DEPARTMENT OF DATASCIENCE
22

called the HTTP Protocol. The HTTP then requests the TCP layer to set the required connection and send
the HTML file.

Now, the TCP breaks the data into small packets and forwards it toward the Internet Protocol (IP) layer.
The packets are then sent to the destination through different routes.

The TCP layer in the user’s system waits for the transmission to get finished and acknowledges once all
packets have been received.

TCP Header Format:

Features of TCP/IP

Some of the most prominent features of Transmission control protocol are mentioned below.

• Segment Numbering System: TCP keeps track of the segments being transmitted or received
by assigning numbers to each and every single one of them. A specific Byte Number is assigned
to data bytes that are to be transferred while segments are assigned sequence numbers.
Acknowledgment Numbers are assigned to received segments.

• Connection Oriented: It means sender and receiver are connected to each other till the
completion of the process. The order of the data is maintained i.e. order remains same before
and after transmission.

• Full Duplex: In TCP data can be transmitted from receiver to the sender or vice – versa at the
same time. It increases efficiency of data flow between sender and receiver.

DEPARTMENT OF DATASCIENCE
23

• Flow Control: Flow control limits the rate at which a sender transfers data. This is done to
ensure reliable delivery. The receiver continually hints to the sender on how much data can be
received (using a sliding window).

• Error Control: TCP implements an error control mechanism for reliable data transfer. Error
control is byte-oriented. Segments are checked for error detection
• Congestion Control: TCP takes into account the level of congestion in the network.
Congestion level is determined by the amount of data sent by a sender.

Advantages of TCP

• It is a reliable protocol.

• It provides an error-checking mechanism as well as one for recovery.

• It gives flow control.

• It makes sure that the data reaches the proper destination in the exact order that it was sent.

• Open Protocol, not owned by any organization or individual.

• It assigns an IP address to each computer on the network and a domain name to each site thus
making each device site to be distinguishable over the network.

Disadvantages of TCP

• TCP is made for Wide Area Networks, thus its size can become an issue for small networks
with low resources.

• TCP runs several layers so it can slow down the speed of the network.

• It is not generic in nature. Meaning, it cannot represent any protocol stack other than the TCP/IP
suite. E.g., it cannot work with a Bluetooth connection.

Q.12.Give the brief introduction about Internet Protocol (IP),TCP.[7M]

The brief introduction to Internet Protocol (IP) and TCP (Transmission Control Protocol):

1. Internet Protocol (IP):


o Definition: Internet Protocol (IP) is a fundamental communication protocol used for
transmitting data packets across networks, including the Internet. It provides the
addressing and routing mechanisms necessary for data to be transmitted from a source
device to a destination device over interconnected networks.
o Functions:

DEPARTMENT OF DATASCIENCE
24

▪Addressing: IP assigns unique numerical addresses, known as IP addresses, to


devices connected to a network. These addresses enable devices to identify each
other and communicate within the network.
▪ Routing: IP routers use destination IP addresses to determine the best path for
forwarding data packets from the source device to the destination device across
multiple interconnected networks.
▪ Fragmentation and Reassembly: IP can fragment large data packets into
smaller segments to accommodate the maximum transmission unit (MTU) size
of the network. At the destination, IP reassembles these segments into the
original data packet.
o Versions: The two main versions of IP are IPv4 and IPv6. IPv4, the most widely used
version, uses 32-bit addresses and supports approximately 4.3 billion unique IP
addresses. IPv6, designed to address the limitations of IPv4, uses 128-bit addresses,
providing significantly more address space.
2. Transmission Control Protocol (TCP):
o Definition: Transmission Control Protocol (TCP) is a connection-oriented transport
protocol that operates at the transport layer of the OSI (Open Systems Interconnection)
model. It provides reliable, ordered, and error-checked delivery of data packets between
devices over IP networks.
o Functions:
▪ Connection Establishment: TCP establishes a connection between the sender
and receiver before data transmission begins. This process involves a three-way
handshake (SYN, SYN-ACK, ACK) to negotiate communication parameters and
synchronize sequence numbers.
▪ Reliable Data Delivery: TCP ensures reliable delivery of data packets by using
sequence numbers, acknowledgments, and retransmissions. It guarantees that
data packets arrive at the destination in the correct order and without errors.
▪ Flow Control: TCP implements flow control mechanisms to regulate the rate of
data transmission between sender and receiver, preventing data loss or
congestion. It uses sliding window algorithms to adjust the transmission rate
based on network conditions and receiver's buffer capacity.
▪ Congestion Control: TCP employs congestion control algorithms to manage
network congestion and avoid network congestion collapse. It dynamically
adjusts the transmission rate based on congestion signals, such as packet loss and
round-trip time, to optimize network utilization and fairness.
o Connection Lifecycle: TCP follows a connection-oriented lifecycle consisting of
connection establishment, data transmission, and connection termination phases. This
lifecycle ensures reliable and orderly communication between devices.

Q.13.Explain in Brief about UDP[8M]

User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the Internet Protocol
suite, referred to as UDP/IP suite. Unlike TCP, it is an unreliable and connectionless protocol. So, there
is no need to establish a connection before data transfer. The UDP helps to establish low-latency and
loss-tolerating connections over the network. The UDP enables process-to-process communication.

DEPARTMENT OF DATASCIENCE
25

UDP Header

UDP header is an 8-byte fixed and simple header, while for TCP it may vary from 20 bytes to 60 bytes.
The first 8 Bytes contain all necessary header information and the remaining part consists of data. UDP
port number fields are each 16 bits long, therefore the range for port numbers is defined from 0 to 65535;
port number 0 is reserved. Port numbers help to distinguish different user requests or processes.

1. Source Port: Source Port is a 2 Byte long field used to identify the port number of the source.

2. Destination Port: It is a 2 Byte long field, used to identify the port of the destined packet.

3. Length: Length is the length of UDP including the header and the data. It is a 16-bits field.

4. Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s complement of the one’s
complement sum of the UDP header, the pseudo-header of information from the IP header, and
the data, padded with zero octets at the end (if necessary) to make a multiple of two octets.

Advantages of UDP

• Speed: UDP is faster than TCP because it does not have the overhead of establishing a
connection and ensuring reliable data delivery.

DEPARTMENT OF DATASCIENCE
26

• Lower latency: Since there is no connection establishment, there is lower latency and faster
response time.

• Simplicity: UDP has a simpler protocol design than TCP, making it easier to implement and
manage.

• Broadcast support: UDP supports broadcasting to multiple recipients, making it useful for
applications such as video streaming and online gaming.

• Smaller packet size: UDP uses smaller packet sizes than TCP, which can reduce network
congestion and improve overall network performance.

• User Datagram Protocol (UDP) is more efficient in terms of both latency and bandwidth.

Disadvantages of UDP

• No reliability: UDP does not guarantee delivery of packets or order of delivery, which can lead
to missing or duplicate data.

• No congestion control: UDP does not have congestion control, which means that it can send
packets at a rate that can cause network congestion.

• No flow control: UDP does not have flow control, which means that it can overwhelm the
receiver with packets that it cannot handle.

• Vulnerable to attacks: UDP is vulnerable to denial-of-service attacks, where an attacker can


flood a network with UDP packets, overwhelming the network and causing it to crash.

• Limited use cases: UDP is not suitable for applications that require reliable data delivery, such
as email or file transfers, and is better suited for applications that can tolerate some data loss,
such as video streaming or online gaming.

Applications:

• It is a suitable protocol for multicasting as UDP supports packet switching.


• UDP is used for some routing update protocols like RIP(Routing Information Protocol).
• UDP is widely used in online gaming, where low latency and high-speed communication is essential
for a good gaming experience.
• Streaming media applications, such as IPTV, online radio, and video conferencing
• VoIP (Voice over Internet Protocol) services, such as Skype and WhatsApp,
• DNS (Domain Name System) also uses UDP for its query/response messages. DNS queries are
typically small and require a quick response time, making UDP a suitable protocol for this application.

DEPARTMENT OF DATASCIENCE
27

Q.14.Explain the role of UDP and MAC Adress in IOT.

1. UDP (User Datagram Protocol):


o Definition: UDP is a connectionless transport protocol that operates at the transport
layer of the OSI model. Unlike TCP, UDP does not establish a connection before
transmitting data. Instead, it sends data packets, known as datagrams, independently,
without ensuring reliability or ordering.
o Role in IoT:
▪ Low Overhead: UDP has lower overhead compared to TCP because it does not
include mechanisms for connection establishment, acknowledgment, and
retransmission. This makes UDP more lightweight and suitable for applications
where real-time communication or minimal latency is essential.
▪ Real-Time Communication: UDP is commonly used in IoT applications that
require real-time communication, such as streaming audio/video, voice over IP
(VoIP), online gaming, and sensor data streaming. It provides faster transmission
of data packets, albeit with the risk of occasional packet loss.
▪ Broadcast and Multicast: UDP supports broadcast and multicast
communication, allowing a single datagram to be sent to multiple recipients
simultaneously. This feature is useful in IoT scenarios where one-to-many or
many-to-many communication patterns are required, such as group messaging or
device discovery.
2. MAC Address (Media Access Control):
o Definition: A MAC address, also known as a hardware address or physical address, is a
unique identifier assigned to a network interface controller (NIC) by the manufacturer. It
is used at the data link layer of the OSI model to uniquely identify devices within a local
network.
o Role in IoT:
▪ Device Identification: MAC addresses uniquely identify IoT devices connected
to a local network. Each device's NIC is assigned a globally unique MAC
address during manufacturing, ensuring that no two devices have the same
address.
▪ Ethernet Communication: In Ethernet-based IoT deployments, MAC addresses
are used for addressing and routing data packets within the local network.
Switches and routers use MAC addresses to forward packets to the correct
destination device.
▪ Security: MAC addresses can be used for access control and security purposes in
IoT networks. Network administrators can configure routers or access points to
allow or deny network access based on the MAC addresses of connected devices,
enhancing network security.
▪ Device Management: MAC addresses can aid in device management and
inventory tracking in IoT deployments. Network management software can use
MAC addresses to identify, monitor, and manage connected devices, facilitating
troubleshooting and maintenance tasks.

DEPARTMENT OF DATASCIENCE
28

Q.15.Explain the diffrences between TCP and UDP.[8M]\

DEPARTMENT OF DATASCIENCE
29

Q.16.Explain the differences between Bluetooth and Zigbee.[7m]

Q.17.What is Bluetooth? Explain its architecture.[8M]?

Bluetooth is used for short-range wireless voice and data communication. It is a Wireless Personal
Area Network (WPAN) technology and is used for data communications over smaller distances. This
generation changed into being invented via Ericson in 1994. It operates within the unlicensed,
business, scientific, and clinical (ISM) bands from 2.4 GHz to 2.485 GHz. Bluetooth stages up to 10
meters. Depending upon the version, it presents information up to at least 1 Mbps or 3 Mbps. The
spreading method that it uses is FHSS (Frequency-hopping unfold spectrum). A Bluetooth network is
called a piconet and a group of interconnected piconets is called a scatternet.

DEPARTMENT OF DATASCIENCE
30

Key Features of Bluetooth

• The transmission capacity of Bluetooth is 720 kbps.

• Bluetooth is a wireless device.

• Bluetooth is a Low-cost and short-distance radio communications standard.

• Bluetooth is robust and flexible.

• The basic architecture unit of Bluetooth is a piconet.

Architecture of Bluetooth

The architecture of Bluetooth defines two types of networks:

Piconet: Piconet is a type of Bluetooth network that contains one primary node called the master node
and seven active secondary nodes called slave nodes. Thus, we can say that there is a total of 8 active
nodes which are present at a distance of 10 meters. The communication between the primary and
secondary nodes can be one-to-one or one-to-many. Possible communication is only between the
master and slave; Slave-slave communication is not possible. It also has 255 parked nodes, these are
secondary nodes and cannot take participation in communication unless it gets converted to the active
state.

Bluetooth Architecture

Scatternet: It is formed by using various piconets. A slave that is present in one piconet can act as master or
we can say primary in another piconet. This kind of node can receive a message from a master in one piconet
and deliver the message to its slave in the other piconet where it is acting as a master. This type of node is
referred to as a bridge node. A station cannot be mastered in two piconets.

DEPARTMENT OF DATASCIENCE
31

Bluetooth Protocol Stack

1. Radio (RF) layer: It specifies the details of the air interface, including frequency, the use of
frequency hopping and transmit power. It performs modulation/demodulation of the data into
RF signals. It defines the physical characteristics of Bluetooth transceivers. It defines two
types of physical links: connection-less and connection-oriented.

2. Baseband Link layer: The baseband is the digital engine of a Bluetooth system and is
equivalent to the MAC sublayer in LANs. It performs the connection establishment within a
piconet, addressing, packet format, timing and power control.

3. Link Manager protocol layer: It performs the management of the already established links
which includes authentication and encryption processes. It is responsible for creating the
links, monitoring their health, and terminating them gracefully upon command or failure.

4. Logical Link Control and Adaption (L2CAP) Protocol layer: It is also known as the heart
of the Bluetooth protocol stack. It allows the communication between upper and lower layers
of the Bluetooth protocol stack. It packages the data packets received from upper layers into
the form expected by lower layers. It also performs segmentation and multiplexing.

5. Service Discovery Protocol (SDP) layer: It is short for Service Discovery Protocol. It allows
discovering the services available on another Bluetooth-enabled device.

6. RF comm layer: It is a cabal replacement protocol. It is short for Radio Frontend


Component. It provides a serial interface with WAP and OBEX. It also provides emulation of
serial ports over the logical link control and adaption protocol(L2CAP). The protocol is based
on the ETSI standard TS 07.10.

7. OBEX: It is short for Object Exchange. It is a communication protocol to exchange objects


between 2 devices.

8. WAP: It is short for Wireless Access Protocol. It is used for internet access.

9. TCS: It is short for Telephony Control Protocol. It provides telephony service. The basic
function of this layer is call control (setup & release) and group management for the gateway
serving multiple devices.

10. Application layer: It enables the user to interact with the application.

DEPARTMENT OF DATASCIENCE
32

Bluetooth Protocol Stack

Types of Bluetooth

Various types of Bluetooth are available in the market nowadays. Let us look at them.

• In-Car Headset: One can make calls from the car speaker system without the use of mobile
phones.

• Stereo Headset: To listen to music in car or in music players at home.

• Webcam: One can link the camera with the help of Bluetooth with their laptop or phone.

• Bluetooth-equipped Printer: The printer can be used when connected via Bluetooth with
mobile phone or laptop.

• Bluetooth Global Positioning System (GPS): To use Global Positioning System (GPS) in
cars, one can connect their phone with car system via Bluetooth to fetch the directions of the
address.

DEPARTMENT OF DATASCIENCE
33

Q.18.What are the advantages ,disadvantages and applications of Bletooth? [8M].

Advantages of Bluetooth

• It is a low-cost and easy-to-use device.

• It can also penetrate through walls.

• It creates an Ad-hoc connection immediately without any wires.

• It is used for voice and data transfer.

Disadvantages of Bluetooth

• It can be hacked and hence, less secure.

• It has a slow data transfer rate of 3 Mbps.

• Bluetooth communication does not support routing.

Applications of Bluetooth

• It can be used in wireless headsets, wireless PANs, and LANs.

• It can connect a digital camera wireless to a mobile phone.

• It can transfer data in terms of videos, songs, photographs, or files from one cell phone to
another cell phone or computer.

• It is used in the sectors of Medical healthcare, sports and fitness, Military.

Q.19.List Bluetooth Key Versions. What are the difficulties associated with them,[7M].

Bluetooth Key Versions (BR/EDR and LE) refer to different versions of the Bluetooth protocol, each
introducing advancements and improvements over previous versions. As of my last update, here are
the key versions of Bluetooth:

1. Bluetooth 1.x and 2.x: These early versions of Bluetooth, collectively known as Bluetooth
Classic or BR/EDR (Basic Rate/Enhanced Data Rate), introduced basic wireless connectivity
for audio streaming, file transfer, and peripheral device connections. They had limited data
transfer speeds and were primarily designed for short-range communication between devices.
2. Bluetooth 3.0: Bluetooth 3.0 introduced the High-Speed (HS) mode, which utilized Wi-Fi
technology for faster data transfer rates when needed. It maintained backward compatibility
with previous versions but added the option for faster data transfer for compatible devices.

DEPARTMENT OF DATASCIENCE
34

3. Bluetooth 4.0: Bluetooth 4.0 introduced the Low Energy (LE) mode, also known as
Bluetooth Smart, alongside the classic BR/EDR mode. LE mode optimized power
consumption for devices with low data transfer requirements, such as sensors, wearables, and
smart home devices. Bluetooth 4.0 also introduced features like Bluetooth Smart Ready and
Bluetooth Smart, allowing devices to support both classic and low-energy modes.
4. Bluetooth 5.0: Bluetooth 5.0 introduced significant enhancements over previous versions,
including increased data transfer speeds, longer range, and improved coexistence with other
wireless technologies. It also introduced features like Bluetooth Low Energy (LE) advertising
extensions, which allow for more efficient data exchange and improved performance in
crowded wireless environments.

Difficulties associated with these Bluetooth key versions include:

1. Compatibility Issues: Newer versions of Bluetooth may not be fully backward compatible
with older versions, leading to interoperability issues between devices. For example, a
Bluetooth 5.0 device may not be able to connect to a Bluetooth 2.x device due to differences
in protocols and features.
2. Complexity of Development: Supporting multiple Bluetooth versions and modes in devices
can add complexity to development efforts. Developers need to ensure compatibility across
different versions while optimizing power consumption, data transfer speeds, and other
performance metrics.
3. Security Concerns: Each Bluetooth version may introduce new security vulnerabilities or
require additional security measures to protect devices and data. Implementing robust security
features can be challenging and may require ongoing updates to address emerging threats.
4. Power Consumption: While Bluetooth Low Energy (LE) mode significantly reduces power
consumption compared to classic Bluetooth, optimizing power usage for specific use cases
and ensuring compatibility with different devices can still be challenging for developers.
5. Interference and Coexistence: In environments with multiple Bluetooth devices or other
wireless technologies, interference and coexistence issues may arise, impacting the
performance and reliability of Bluetooth connections. Addressing these challenges requires
careful planning and implementation of mitigation strategies.

Q.20.Draw and Explain Bluetooth Low Energy architecture.[7M]

BLE (Bluetooth Low Energy) is wireless PAN technology designed and maintained by Bluetooth
Special Interest Group (SIG). There are various versions of bluetooth.

The version 4.2 and above is referred as BLE. The latest in the series are v5.0 and v5.1. BLE
specifications are intended to reduce power consumption and cost of devices while maintaining
coverage range. BLE is known as "Bluetooth Smart" where as previous version is known as
"bluetooth classic".

• BLE is not backward compatible with BR/EDR protocols.


• BLE uses 2.4 GHz ISM frequency band either in dual mode or single mode. Dual mode supports

DEPARTMENT OF DATASCIENCE
35

both bluetooth classic and low energy peripherals.


• All BLE devices use the GATT profile (Generic Attribute Profile). The GATT protocol provides
series of commands for the client to discover information about BLE server.
• The BLE protocol stack architecture consists of two parts viz. controller and host. Both are
interfaced using HCI (Host to Controller Interface).
• Any profiles and applications run on top of GAP & GATT protocol layers.

BLE Protocol Stack | BLE System Architecture

The figure-2 depicts BLE system architecture. Let us understand functions of different layers of
this BLE protocol stack.

• Physical Layer :
• The transmitter uses GFSK modulation and operates at unlicensed 2.4 GHz frequency band.
• Using this PHY layer, BLE offers data rates of 1 Mbps (Bluetooth v4.2)/2 Mbps (Bluetooth v5.0).
• It uses frequency hopping transceiver.
• Two modulation schemes are specified to deliver 1 Msym/s and 2 Msym/s.
• Two PHY layer variants are specified viz. uncoded and coded.
• A Time Division Duplex (TDD) topology is employed in both of the PHY modes.

• Link Layer : This layer sits above the Physical layer. It is responsible for advertising, scanning,
and creating/maintaining connections. The role of BLE devices changes in peer to peer (i.e. Unicast)
or broadcast modes. The common roles are Advertiser/Scanner (Initiator), Slave/Master or

DEPARTMENT OF DATASCIENCE
36

Broadcaster/Observer. Link layer states are defined in the figure below.

The figure-1 depicts BLE device states >>. The device will be in any one of these states which
include Standby state, Advertising state, Scanning state, Initiating state, Connection State and
Synchronization state.

• HCI : It provides communication between controller and host through standard interface types.
This HCI layer can be implemented either using API or by interfaces such as UART/SPI/USB.
Standard HCI commands and events are defined in the bluetooth specifications.

• L2CAP :This layer offers data encapsulation services to upper layers. This allows logical end to
end data communication.

• SMP :This security Manager layer provides methods for device pairing and key distributions. 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 application layer and/or profiles on it. It handles device
discovery and connection related services for BLE device. It also takes care of initiation of security
features.

• GATT : This layer is service framework which specifies sub-procedures to use ATT. Data
communications between two BLE devices are handled through these sub-procedures. The
applications and/or profiles will use GATT directly.

• ATT : This layer allows BLE device to expose certain pieces of data or attributes.

• Application Layer :
• The BLE protocol stack layers interact with applications and profiles as desired. Application
interoperability in the Bluetooth system is accomplished by Bluetooth profiles.
• The profile defines the vertical interactions between the layers as well as the peer-to-peer
interactions of specific layers between devices.
• A profile composed of one or more services to address particular use case. A service consists of
characteristics or references to other services.
• Any profiles/applications run on top of GAP/GATT layers of BLE protocol stack. It handles device
discovery and connection related services for the BLE device.

DEPARTMENT OF DATASCIENCE
37

Q.21. Explain about PSOC4BLE protocol [8M]

DEPARTMENT OF DATASCIENCE

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy