MODULE – 3
IoT Connectivity Technologies
7.1.2 IoT Networking Basics
7.2 IEEE 802.15.4 (Overview)
IEEE 802.15.4 is a wireless communication standard specifically designed for low-power, short-range applications, and it serves as the foundation for many IoT protocols. It focuses on low-cost, low-data-rate communications, making it ideal for sensor and actuator devices that only need to transmit small packets of data. Operating primarily in the 2.4 GHz ISM band, and sometimes in sub-GHz frequencies like 868 MHz and 915 MHz, it supports data rates between 20 kbps and 250 kbps. This is sufficient for IoT tasks such as transmitting temperature, humidity, or occupancy data.
Figure 7.1 – Protocol Stack
Figure 7.1 shows how the IEEE 802.15.4 protocol stack fits into the OSI model. It defines only the physical (PHY) and medium access control (MAC) layers, while higher-level protocols such as Zigbee, 6LoWPAN, and Thread build on top of it. This layered structure provides flexibility and allows IEEE 802.15.4 to support different IoT applications efficiently.
Figure 7.1 Explanation (Part 1)
Figure 7.1 Explanation (Part 2)
To interact with upper layers, IEEE 802.15.4 adds two sub-layers:
1. Logical Link Control (LLC)
2. Service-Specific Convergence Sublayer (SSCS)
Higher layers such as Networking, Transport, and Application are not part of IEEE 802.15.4. Instead, protocols like Zigbee, 6LoWPAN, or Thread provide these layers on top of 802.15.4.
Technical Details
• Modulation: Direct Sequence Spread Spectrum (DSSS)
- BPSK for low speed, O-QPSK for higher speed.
• Channel access: CSMA-CA to avoid collisions.
• Energy saving: very short packets, duty cycles less than
1%.
• Typical range: 10–75 m indoors, up to 1000 m outdoors.
This makes 802.15.4 ideal for IoT devices like smart meters and environmental sensors.
Example – Smart Home Sensor
Consider a temperature sensor in a smart home:
• The sensor uses IEEE 802.15.4 PHY and MAC to transmit
data packets.
• LLC and SSCS adapt these packets to upper protocols.
• A Zigbee network layer routes the data to the home gateway.
• The transport and application layers forward the temperature
reading to a mobile app.
This example shows how Figure 7.1 works in practice, with 802.15.4 at the bottom and upper protocols completing the OSI stack.
Figure 7.2 – Device and Network Types
Overview of IEEE 802.15.4 Device and Network Types
Full Function Devices (FFD)
FFDs can communicate with all types of devices (both FFDs and RFDs). They support the complete IEEE 802.15.4 protocol stack, enabling them to act as coordinators, routers, or general devices. However, FFDs consume more energy and are costlier due to higher processing and memory requirements.
Reduced Function Devices (RFD)
RFDs are simple, low-power devices with minimal memory and processing needs. They can only communicate with FFDs and are designed for end-device roles in the network. Examples include simple sensors that periodically send data to a coordinator.
Beacon-Enabled Networks
In beacon-enabled networks, the PAN coordinator transmits periodic beacons for synchronization. Communication uses slotted CSMA/CA with a superframe structure, which organizes transmissions efficiently. This method ensures better synchronization and power saving for end devices.
Non-Beacon-Enabled Networks
In non-beacon-enabled networks, unslotted CSMA/CA is used for communication. Here, devices communicate without periodic synchronization, leading to contention-based access. Beacons are used only for link discovery rather than for periodic coordination.
Figure 7.3 – Frame Types
Figure 7.3 presents the different frame types defined in IEEE 802.15.4. These include beacon frames, data frames, acknowledgment frames, and MAC command frames. Each frame type has a specific role in ensuring efficient communication, synchronization, and reliable data transfer across the network.
Overview of Frame Types
The IEEE 802.15.4 standard defines different types of frames to ensure reliable and synchronized communication. These frames provide functions for data transfer, acknowledgment, synchronization, and network management. Figure 7.3 illustrates the major frame types supported by the standard.
Beacon Frame
Beacon frames are broadcast by the PAN coordinator in beacon-enabled networks. They are used for synchronization, ensuring that devices wake up at the correct time to send or receive data. This allows devices to save battery power by sleeping during inactive periods.
Data Frame
Data frames carry the actual payload between devices. This could include sensor readings or control commands. They are the most essential frame type and are used in both beacon-enabled and non-beacon-enabled networks.
Acknowledgment (ACK) Frame
Acknowledgment frames are sent by a receiver to confirm that it successfully received a data frame. This ensures reliability in communication by enabling retransmission in case of errors or loss.
MAC Command Frames
MAC command frames are used for management functions within the network. These include association requests, dissociation requests, beacon requests, coordinator realignment, and orphan notifications. They help in establishing and maintaining the network structure.
Example: Smart Home Network
In a smart home network:
- A temperature sensor (RFD) sends a Data Frame with readings to
the gateway (FFD).
- The gateway replies with an Acknowledgment Frame to confirm
reception.
- The gateway periodically broadcasts Beacon Frames to
synchronize all devices.
- A new smart switch joining the system sends an Association
Request (Command Frame).
This shows how Beacon, Data, ACK, and Command frames work together for reliable IoT communication.
End-to-End Communication: Thread vs Zigbee Smart Home Network
Common Beginning – Office to Cloud
Thread Network Story (6LoWPAN)
At home, the message reaches your Thread Border Router (like a Nest Hub). The router converts the IPv6 packet using 6LoWPAN—compressing and fragmenting it to fit IEEE 802.15.4 frames. The fragments travel via Thread’s mesh network using RPL routing. The AC’s Thread module reassembles and decompresses them, reads the CoAP/Matter 'off' command, and cuts power to the relay. An acknowledgment returns through the same mesh, expanded to full IPv6, confirming AC off.
Zigbee Network Story (Non-IP)
If your home uses Zigbee, the same IPv6 'AC off' command reaches your Zigbee gateway via Wi-Fi. Since Zigbee does not understand IPv6, the gateway translates it into a Zigbee frame using the Zigbee Cluster Library (ZCL). The Zigbee frame travels over the 2.4 GHz LR-WPAN mesh. The AC’s Zigbee module decodes it, switches off power, and sends a short acknowledgment. The gateway converts this back to IPv6 and notifies your app that the AC is off.
Comparison: Thread vs Zigbee
End-to-End Flow Summary
1. Phone (5G IPv6 Packet) → Cloud → Home Router
2. Thread: IPv6 compressed (6LoWPAN) → Mesh → AC (native IPv6)
3. Zigbee: IPv6 translated to Zigbee frame → Mesh → AC (non-IP)
Wi-Fi and 5G carry full IPv6; Thread compresses it; Zigbee converts it.
7.3 Zigbee Communication in IoT
Based on IEEE 802.15.4 Standard
Introduction to Zigbee
Zigbee Technical Characteristics
Figure 7.4: Zigbee Network Topologies
Zigbee Network Configurations
Device Types in Zigbee Network
Figure 7.5: Zigbee Protocol Stack
Power Management in Zigbee
Zigbee Protocol Architecture
Physical Layer
MAC Layer
Network Layer
Application Support Sub-Layer (APS)
Application Framework
from application objects.
message structures.
Zigbee Operational Modes
Non-Beacon Mode
Beacon Mode
Summary
7.7 RFID (Radio Frequency Identification)
Introduction to RFID
RFID vs Barcode
RFID System Components
RFID is part of the Automatic Identification and Data Capture (AIDC) family.
- Identifying tags
- Reading data
- Feeding data directly into computer systems via radio
waves.
1. RFID Tag or Smart Label
2. RFID Reader
3. Antenna
Figure 7.12: RFID System Components
RFID Tags
1. Passive Tags – Low cost, powered by RFID reader
signal.
2. Active Tags – Have built-in power source, higher
range and cost.
RFID Reader and Host Communication
- Wi-Fi
- Ethernet
Applications of RFID
- Inventory management
- Asset tracking
- Personnel tracking
- Supply chain management
Summary
7.8 Near Field Communication (NFC)
Introduction to NFC
Working Principle
NFC Device Types
Passive NFC Devices
Active NFC Devices
Data Transmission via NFC
NFC Communication Modes
1. Peer-to-Peer Mode
2. Read/Write Mode
3. Card Emulation Mode
Peer-to-Peer Mode
Read/Write Mode
Card Emulation Mode
Applications of NFC
Summary
Sigfox: Low-Power Connectivity Solution
Section 7.12 Overview
Introduction to Sigfox
Sigfox is a low-power connectivity solution designed for applications such as building automation, security, smart metering, and agriculture. It uses ultra-narrowband (UNB) technology (192 kHz) for spectrum access, achieving data rates of 100–600 bits per second. Binary Phase Shift Keying (BPSK) is used for encoding, with each message being 100 Hz wide.
Spectrum and Communication Features
Figure 7.19 – Sigfox Network Architecture
Cooperative Reception and Diversity
Sigfox base stations use cooperative reception, monitoring the 192 kHz spectrum for ultra-narrowband transmissions. Messages are received by any nearby base station, following spatial diversity. Combined with time and frequency diversity, this ensures excellent quality of service and reliability.
Explanation of Figure 7.20 – Sigfox Protocol Stack vs OSI Stack
Conceptual Overview and End-to-End Communication Example
What is Sigfox?
Sigfox is a Low-Power Wide-Area Network (LPWAN) communication technology designed for IoT devices that send small amounts of data infrequently over long distances. It operates on unlicensed sub-GHz frequency bands such as 868 MHz in Europe and 902–928 MHz in other regions. Sigfox uses ultra-narrowband modulation for long-range and low-power communication, ideal for smart metering, asset tracking, and agriculture.
Overview of Figure 7.20 – Sigfox vs OSI Stack
Figure 7.20 compares the Sigfox protocol stack to the traditional OSI model. The OSI stack contains seven layers ranging from physical to application, while Sigfox simplifies this structure to just four layers: Physical, Medium Access Control (MAC), Frame, and Application. This simplification minimizes processing and power usage for IoT devices.
OSI Stack Explanation
In the OSI model, communication is divided into seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application. Each layer handles a specific function such as physical transmission, error control, routing, session management, and application-level interaction. This structure is ideal for complex and high-speed data communication systems like the Internet and cellular networks.
Sigfox Stack Simplification
Sigfox simplifies the OSI model by merging several layers. It retains only the essential ones for IoT communication. The Physical layer handles modulation and signal transmission, MAC manages access control, the Frame layer combines network and transport functions, and the Application layer holds sensor data. This lightweight stack is power-efficient and supports small, periodic data transmissions.
Layer-wise Description of Sigfox Stack
• Physical Layer – Responsible for transmitting data using BPSK or GFSK
modulation across 868/902 MHz bands.
• Medium Access Control (MAC) – Controls channel access and
prevents collisions during message transmission.
• Frame Layer – Packages the payload with device ID, CRC, and
timestamp, ensuring message integrity.
• Application Layer – Contains the actual sensor data and application
logic for user interaction.
End-to-End Example – Smart Agriculture System
In a smart agriculture setup, a soil moisture sensor uses Sigfox to transmit data to a cloud dashboard.
1. The microcontroller collects soil moisture data and
sends it to the Sigfox module.
2. The Sigfox module creates a frame (device ID + sensor value
+ CRC).
3. The message is transmitted three times on different
frequencies to ensure reliability.
4. A nearby Sigfox base station receives it and forwards it to
the Sigfox cloud.
5. The cloud decodes the data and displays it on a user
dashboard for farm monitoring.
Data Flow Representation
Advantages of Sigfox Protocol Stack
• Extremely low power consumption – ideal for battery-
powered IoT devices.
• Simplified architecture – only four lightweight layers.
• Long-range communication (up to 50 km in rural areas).
• High reliability due to time-frequency and spatial
diversity.
• Minimal device complexity and maintenance.
• Secure communication using AES-based authentication
and encryption.
Summary of Figure 7.20 – Sigfox Stack
The Sigfox stack achieves efficient IoT communication by removing redundant OSI layers and focusing on minimal, energy-efficient data exchange. Its four-layer structure (Physical, MAC, Frame, Application) ensures reliability, security, and scalability for IoT applications. Sigfox’s design philosophy of simplicity makes it one of the most power-efficient LPWAN technologies for smart city, industrial, and agricultural deployments.
Communication and Message Characteristics
Sigfox supports bi-directional asynchronous communication, but uplink (device to base station) is faster due to simpler device hardware. Message length is limited to 12 bytes, supporting sensor data, event status, GPS coordinates, and application data.
Security and Application Scope
Sigfox ensures authentication, integrity, and anti-replay security using AES. It is ideal for low-data-rate applications that require infrequent small data transmissions. Best suited for indoor deployments and dense networks; mobility support is limited.
LoRa: Long Range Communication Technology
Section 7.13 Overview
Introduction to LoRa
LoRa (Long Range) is a patented wireless communication technology developed by Cycleo, France, for providing cellular-type connectivity to M2M and IoT applications. It operates in sub-GHz frequency bands—169 MHz, 433 MHz, 868 MHz, and 915 MHz—and supports bi-directional links using a 125 kHz spread spectrum for communication.
Key Features and Applications
LoRa supports long-distance communication ranging from 15–20 km with millions of connected devices. It is ideal for smart grid monitoring, asset tracking, and asset management applications. Using chirp spread spectrum modulation, LoRa achieves high receiver sensitivity and extended battery life.
Figure 7.21 – LoRa Network Architecture
Comparison with NB-IoT
Compared to NB-IoT, LoRa provides higher battery life but lower data rates (27–50 kbps) and longer latency. LoRa's chirp coding gain provides resilience to interference. Both LoRa and LoRaWAN enable WAN-level communication, but LoRaWAN adds network routing and message redundancy.
Figure 7.22 – LoRa Protocol Stack
LoRaWAN Overview
LoRaWAN routes messages between end nodes and destinations through gateways. It follows a star topology comprising four main components: End nodes, Gateways, Network Server, and Remote Computer. Messages are received by all nearby base stations, increasing redundancy and network resilience.
Network Entities and Connectivity
End nodes handle sensing and control. Gateways forward messages to the network server via wired or wireless links. The server manages message acknowledgment, data rate adaptation, and redundancy elimination. Remote computers act as control systems and data sinks for collected information.
Security in LoRa Networks
LoRa Example and Comparison with Sigfox
End-to-End Example and Comparative Analysis
LoRa Example – Smart City Waste Management
In a smart city scenario, LoRa-based smart dustbins are deployed across various locations to monitor waste levels. Each dustbin has an ultrasonic sensor that measures how full the bin is and transmits this data through a LoRa module. The communication flow is as follows:
1. The ultrasonic sensor detects the waste level and converts it into digital data.
2. The data is transmitted via LoRa modulation (Chirp Spread Spectrum) to the nearest
gateway.
3. The gateway forwards the data over the Internet to the LoRaWAN network server.
4. The network server processes and decrypts the data, removing duplicates.
5. The application server displays the fill levels on a dashboard and alerts the
municipal team when bins are full.
This enables efficient waste collection, reduced operational costs, and cleaner urban environments.
LoRa End-to-End Communication Flow
Comparison Between LoRa and Sigfox
Feature | LoRa | Sigfox |
Developed By | Cycleo (Semtech) | Sigfox (France) |
Operating Frequency | Sub-GHz (433/868/915 MHz) | Sub-GHz (868/902 MHz) |
Modulation Type | Chirp Spread Spectrum (CSS) | Ultra Narrow Band (UNB) |
Network Architecture | LoRaWAN (Star-of-stars) | Star topology |
Range | Up to 20 km (rural), 5 km (urban) | Up to 50 km (rural), 10 km (urban) |
Data Rate | 0.3 – 50 kbps | 100 – 600 bps |
Payload Size | Up to 255 bytes | Up to 12 bytes |
Communication Type | Bi-directional (uplink/downlink) | Primarily uplink (limited downlink) |
Use Cases | Smart cities, agriculture, metering | Asset tracking, metering, monitoring |
Summary
Both LoRa and Sigfox are LPWAN technologies enabling long-range IoT communication with minimal power consumption. Sigfox emphasizes ultra-narrowband simplicity, focusing on minimal data transmission with long range and high reliability. LoRa provides higher flexibility, supports greater data payloads, and allows two-way communication. The selection depends on the specific IoT application’s data requirements, frequency, and cost constraints.
NB-IoT: Narrowband Internet of Things
Section 7.14 Overview
Key Features and Advantages
NB-IoT improves reliability, spectrum efficiency, and system capacity using Orthogonal Frequency Division Multiplexing (OFDM) modulation. OFDM enhances data throughput and spectral efficiency, though device complexity remains high. It supports essential security features such as confidentiality, authentication, and integrity.
Overview of the Figure
Figure 7.23 depicts the placement of the NB-IoT frequency band within the LTE spectrum. It demonstrates how NB-IoT coexists with GSM (2G) and LTE(4G) systems using a narrow 200 kHz channel, ensuring efficient use of spectrum and backward compatibility with existing networks.
GSM Band Representation
The upper section represents GSM bands, where each block denotes a 200 kHz carrier. NB-IoT can be deployed in Standalone Mode by reusing one of these GSM carriers. This allows operators to repurpose legacy GSM spectrum for IoT connectivity without requiring new spectrum licenses.
LongTermEvaluation(LTE) Band and Guard Band Allocation
OFDM Modulation and Its Role
Summary of Figure 7.23 Concepts
Key Takeaways:
• NB-IoT efficiently uses 200 kHz within LTE or GSM
bands.
• Supports three deployment modes: Standalone, In-
band, Guard-band.
• Utilizes OFDM for downlink and SC-FDMA for uplink.
• Coexists seamlessly with LTE, enabling massive IoT
device connectivity.
• Provides deep indoor coverage with minimal power
consumption.
Communication and Coverage
NB-IoT supports deployments in indoor environments and dense urban areas. It ensures higher quality of service and reduced latency compared to LoRa. However, NB-IoT is less efficient for large data transmissions and better suited for static use cases like smart metering.
Figure 7.24 – NB-IoT Protocol Stack
Overview of NB-IoT Protocol Stack
Figure 7.24 illustrates the NB-IoT protocol stack across three major entities — User Equipment (UE), Evolved Node B (eNB), and Mobility Management Entity (MME). Each layer in this stack plays a crucial role in managing communication, reliability, and control signaling for IoT devices operating over cellular networks.
User Equipment (UE) Layers
The UE represents IoT end devices such as smart meters or sensors. Its stack layers are:
• PHY (Physical Layer): Handles radio transmission using OFDM/SC-
FDMA.
• MAC (Medium Access Control): Allocates resources and manages
retransmissions.
• RLC (Radio Link Control): Segments and reassembles data for
reliability.
• PDCP (Packet Data Convergence Protocol): Provides header
compression and encryption.
• RRC (Radio Resource Control): Manages connections and signaling.
• NAC (Non-Access Control): Interacts with the MME for session control.
Evolved Node B (eNB) – Base Station
Mobility Management Entity (MME)
Working Principle Illustrated in Figure 7.24
Summary of NB-IoT Protocol Stack
• UE, eNB, and MME form the three pillars of NB-IoT
communication.
• Protocol layers ensure data reliability, integrity, and
efficient resource use.
• NAC enables control signaling between UE and MME.
• NB-IoT architecture is optimized for small data
volumes, long coverage, and low power consumption.
• It forms the backbone for smart city and industrial IoT
applications.
Deployment and Integration
Data Handling and Applications
NB-IoT supports non-IP applications transmitting small data volumes, typically a few tens to hundreds of bytes daily. It is ideal for static deployments such as energy metering, fixed sensors, and environmental monitoring. Its OFDM modulation provides higher data handling capacity than Sigfox and LoRa.
Security and Reliability
NB-IoT includes advanced security mechanisms ensuring confidentiality, integrity, and authentication. Its reliability and robustness make it suitable for industrial, smart city, and infrastructure IoT applications.
NB-IoT: Narrowband Internet of Things
Example and Comparison with LoRa and Sigfox
What is NB-IoT?
NB-IoT Example – Smart Energy Metering
1. Each meter measures and stores energy consumption data.
2. The NB-IoT module transmits the data via the LTE base station using
200 kHz bandwidth.
3. The data is routed through the mobile operator’s core network to a
cloud-based utility server.
4. The server stores, processes, and displays energy usage in real-time
dashboards.
NB-IoT ensures reliable communication even in basements and dense urban environments.
Comparison: NB-IoT vs LoRa vs Sigfox
Feature | NB-IoT | LoRa | Sigfox |
Spectrum | Licensed (700–900 MHz) | Unlicensed (868/915 MHz) | Unlicensed (868/902 MHz) |
Bandwidth | 200 kHz | 125 kHz | 100 Hz (Ultra Narrow Band) |
Modulation | OFDM / SC-FDMA | Chirp Spread Spectrum (CSS) | BPSK (Binary Phase Shift Keying) |
Data Rate | Up to 250 kbps | 0.3 – 50 kbps | 100 – 600 bps |
Range | Up to 35 km | Up to 20 km | Up to 50 km |
Topology | Cellular Star | Star-of-stars | Star |
Payload Size | Up to 1600 bytes | Up to 255 bytes | Up to 12 bytes |
Communication | Bi-directional | Bi-directional | Primarily Uplink |
Battery Life | Up to 10 years | Up to 10 years | Up to 10 years |
Security | LTE-grade AES + Authentication | AES-128 | AES-128 |
Summary
NB-IoT, LoRa, and Sigfox are leading LPWAN technologies with distinct strengths. NB-IoT provides reliable, secure, and licensed cellular connectivity ideal for industrial and utility applications. LoRa offers private network flexibility and moderate data capacity, while Sigfox emphasizes simplicity, long range, and extremely low data usage. Each technology is suited to different IoT use cases based on cost, range, and data needs.
Wi-Fi (IEEE 802.11): Wireless Local Area Networking
Section 7.15 Overview
Introduction to Wi-Fi
Wi-Fi, technically referred to by its IEEE 802.11 standard, is a wireless communication technology that enables local area networking among devices. It operates on 2.4 GHz and 5.8 GHz ISM frequency bands, providing connectivity through multiple channels using time-division multiplexing (TDMA) and CSMA/CA for channel access.
Summary of Figure 7.25
Wi-Fi Standards and Frequency Bands
IEEE 802.11 Versions and Data Rates
Overview of Wi-Fi Deployment Architecture
Figure 7.26 illustrates a typical Wi-Fi deployment architecture involving multiple routers, access points, and Internet connectivity. The figure demonstrates how multiple hosts (computers or devices) connect wirelessly to routers, which are in turn linked to access points (APs). These APs provide the gateway between the local wireless network and the Internet.
Components of Wi-Fi Deployment
Communication Flow in Wi-Fi Architecture
1. Hosts (A/B) connect wirelessly to their nearest
router using IEEE 802.11 standards.
2. Each router transmits the data to a connected
access point using wired or wireless backhaul
links.
3. The access points are linked to the Internet
backbone, which allows all hosts to exchange
data globally.
4. The architecture ensures smooth communication
between multiple local networks and the Internet.
Wi-Fi Operation Modes in Deployment
Advantages of Wi-Fi Deployment Architecture
Summary of Figure 7.26
Figure 7.26 depicts how Wi-Fi networks enable multi-device communication via routers and access points. The routers manage local wireless connectivity, while the access points link to the Internet, forming a complete wireless LAN infrastructure. This model is the foundation for modern Wi-Fi networks used in homes, offices, and public spaces.
Wi-Fi Network Architecture and Communication
Summary of Wi-Fi (IEEE 802.11)
Bluetooth (IEEE 802.15.1): Short-Range Wireless Communication
Section 7.16 Overview
Introduction to Bluetooth
Bluetooth, defined under IEEE 802.15.1, is a low-power, short-range wireless communication technology. It was initially developed as a cable replacement for connecting devices like smartphones and laptops. Operating in the 2.4 GHz ISM (Industrial, Scientific, and Medical) band, Bluetooth enables both voice and data transmission over distances of about 10 meters.
Technical Characteristics of Bluetooth
- π/4 DQPSK (2 Mbps)
- 8-DPSK (3 Mbps)
Bluetooth Master–Slave Architecture
Bluetooth follows a master–slave topology where one master device can connect to up to seven slave devices, forming a small network called a piconet. All slave devices synchronize with the master’s clock and frequency hopping pattern. Multiple piconets can interconnect via a bridge device, forming a larger network called a scatternet. Each slave can belong to only one piconet at a time.
Bluetooth Low Energy (BLE)
Bluetooth Low Energy (BLE) is an advanced version designed for lower power consumption and extended range. It operates using 40 channels, each 2 MHz wide. BLE provides low energy usage, low cost, high interoperability, and improved operational range , ideal for IoT and wearable devices.
Overview of the Bluetooth Protocol Stack
Figure 7.28 illustrates the Bluetooth protocol stack, which defines how Bluetooth devices communicate and manage data exchange. The stack consists of multiple layers — from the physical radio interface to application-level protocols — ensuring interoperability, reliability, and efficient communication between Bluetooth-enabled devices.
1. PHY and Baseband Layers
2. L2CAP (Logical Link Control and Adaptation Protocol)
L2CAP is the core data link layer that multiplexes logical connections between devices. It performs packet segmentation, reassembly, flow control, and Quality of Service (QoS) management. L2CAP ensures data integrity and acts as a bridge between upper and lower layers, enabling multiple simultaneous connections.
3. Middleware and Control Layers
4. Audio and Control Channels
5. Application Layer
The topmost layer of the Bluetooth stack supports various applications and user services. It interacts with the underlying stack to provide features such as file transfer, audio streaming, device pairing, and peripheral connectivity. Applications rely on standardized profiles built on top of lower-level Bluetooth protocols.
Summary of Figure 7.28 – Bluetooth Stack
Bluetooth Protocol Stack Overview
Core Bluetooth Protocols Explained
Service and Communication Protocols
Security and Applications of Bluetooth
Feature | Wi-Fi | Bluetooth |
Full Form | Wireless Fidelity | Bluetooth |
Frequency Band | 2.4 GHz, 5 GHz, 6 GHz (Wi-Fi 6E) | 2.4 GHz ISM Band |
Standard | IEEE 802.11 a/b/g/n/ac/ax/be | IEEE 802.15.1 |
Range | Up to 100m indoor, 300m outdoor | Up to 10m (Class 2), 100m (Class 1) |
Data Transfer Rate | Up to 9.6 Gbps (Wi-Fi 6E) | Up to 50 Mbps (Bluetooth 5.3 LE Audio) |
Power Consumption | High | Very Low |
Latency | 10–20 ms | 100–200 ms |
Network Topology | Infrastructure or Mesh | Piconet / Scatternet |
Connected Devices | 50+ (depending on router) | 7 active + 255 parked |
Security | WPA3, Firewalls | AES-128, Secure Simple Pairing |
Interference | Possible with microwaves, Bluetooth | Less due to adaptive frequency hopping |
Mobility | Supports roaming between APs | Limited mobility |
Setup Cost | Moderate to High | Low |
Applications | Internet, streaming, IoT hubs | Audio, wearables, peripherals |
Examples | Routers, laptops, IoT hubs | Headphones, smartwatches, speakers |
Energy Efficiency | Moderate | High |
Backward Compatibility | Supported across standards | Supported across versions |
Data Encryption | WPA3 standard | AES-CCM |
Typical Use | High-volume data transfer | Short-range device communication |
Deployment | Needs configuration | Plug-and-play |
Application Layer Protocols
8.4.1: MQTT
Introduction to MQTT
MQTT is a simple, lightweight messaging protocol designed for communication between devices in constrained environments. It follows a publish–subscribe architecture, allowing one-to-many message distribution. The protocol is designed to operate efficiently in networks with limited bandwidth or high latency.
MQTT Architecture
The MQTT architecture includes three main components:1. Publishers, 2.Brokers, and 3.Subscribers. Publishers send data in the form of topics to a central broker. The broker then forwards these topics to all devices or applications (subscribers) that have subscribed to those topics. This allows for a decoupled and scalable communication network.
Operational Principle
MQTT works on top of the TCP protocol, ensuring reliable message delivery. When a publisher sends data, it includes both control and data messages. The broker updates its topic list and delivers new messages to all active subscribers. Messages for unsubscribed topics are usually discarded, optimizing data flow and reducing redundancy.
Reliability Features
MQTT includes a 'Last Will and Testament' feature that ensures system continuity. If a publisher disconnects unexpectedly, a pre-defined message can be sent to inform subscribers. Additionally, multiple brokers can interconnect to enhance data delivery reliability.
MQTT Message Structure
MQTT messages vary in size from 2 bytes to 256 MB, with a fixed 2-byte header. The protocol defines 14 control message types, such as CONNECT, PUBLISH, SUBSCRIBE, and DISCONNECT. These messages manage connection establishment, publishing, acknowledgments, and keep-alive signals.
*note there are 14 control messages and you are expected to read and understand from the text book
Quality of Service (QoS) Levels
1. At most once – Best-effort delivery, possible
message loss.
2. At least once – Guaranteed delivery but may
cause duplicates.
3. Exactly once – Assured and duplicate-free
message delivery.
MQTT in IoT Applications
Security Considerations
Figure: MQTT Operation and Its Stakeholders
Diagram: MQTT Operation
The diagram illustrates the three main components: publishers, brokers, and subscribers. Publishers (like refrigerators or tablets) send topic data to the broker. The broker manages these topics and routes them to subscribers (like control panels, lights, and smart home devices). This architecture ensures efficient, asynchronous communication between multiple devices.
Summary
8.4.2 MQTT-SN
MQTT-SN (Message Queue Telemetry Transport for Sensor Networks) is a lightweight version of MQTT, specifically designed for wireless sensor networks. It is optimized for constrained devices operating under low bandwidth, high latency, and high packet loss conditions. MQTT-SN ensures reliable communication among low-power sensor nodes in IoT environments.MQTT-SN is UDP based
Key Features of MQTT-SN
Differences between MQTT and MQTT-SN
MQTT-SN differs from MQTT in several key aspects:
1. The CONNECT message in MQTT-SN is divided into three
types, with optional testament communication.
2. MQTT-SN replaces long topic names with 2-byte topic identifiers,
reducing network traffic.
3. A topic registration mechanism exists to map topic names with
identifiers.
4. Predefined topic identifiers eliminate the need for dynamic
registration in certain cases.
5. Discovery process helps nodes find the broker dynamically if no
preconfigured address is available.
6. MQTT-SN supports sleeping clients with buffered message delivery
upon wake-up, unlike standard MQTT.
MQTT-SN Architecture
MQTT-SN acts as a bridge between MQTT and sensor network nodes. The MQTT-SN gateway handles conversion between MQTT-SN and MQTT message formats. It translates communication between sensor nodes and the MQTT broker, ensuring interoperability across different network layers.
Gateway Types in MQTT-SN
There are two primary types of MQTT-SN gateways:
1. Transparent Gateway: Each MQTT-SN node
establishes its own direct connection to the
MQTT broker via the gateway.
2. Aggregating Gateway: All MQTT-SN nodes
communicate with the MQTT broker through a
single shared connection managed by the
gateway.
These two types define how efficiently multiple sensor nodes share network resources.
Figure: MQTT-SN Types (Transparent and Aggregating Gateways)
Diagram Explanation: MQTT-SN Gateway Types
Smart Home Story: MQTT vs MQTT-SN
This presentation explains MQTT and MQTT-SN protocols through a simple smart home example. It highlights how MQTT connects smart devices through a broker and how MQTT-SN enables low-power wireless sensors to communicate via gateways.
MQTT in a Smart Home: The Reliable Messenger
Imagine your smart home: Refrigerator, Thermometer, Microwave, and TV are connected through a Smart Home Hub (Broker). Each device sends messages (publishes) to the broker on specific topics like home/kitchen/temp or home/livingroom/tv.
The Broker delivers these messages to subscribers, such as your smartphone app or smart assistant.
Example Flow:
1. Refrigerator → Broker: 'Temperature is 4°C.'
2. Broker → Mobile App: 'Temperature is 4°C.'
3. Microwave → Broker: 'Cooking started.'
4. Broker → Control Panel: 'Cooking started.'
How MQTT Works (Analogy)
Think of the Broker as a Post Office:
MQTT is built on TCP — ensuring reliability and guaranteed message delivery with QoS levels.
Transition to MQTT-SN: The Lightweight Whisperer
MQTT-SN Architecture in a Smart Home
1 Transparent Gateway — each sensor node has its
own session with the broker.
2 Aggregating Gateway — all sensors share one
gateway connection to the broker.
Story: MQTT-SN in Action (Transparent Gateway)
Story: MQTT-SN in Action (Aggregating Gateway)
Summary of Smart Home Communication
Summary
MQTT-SN extends MQTT functionality to constrained wireless networks, providing optimized message delivery, low power consumption, and efficient bandwidth use. Its two gateway types – transparent and aggregating – enable flexible integration of sensor nodes with existing MQTT infrastructures, ensuring interoperability in large-scale IoT deployments.
Introduction to CoAP
The Constrained Application Protocol (CoAP) is a specialized web transfer protocol designed for use in constrained devices and networks. It operates efficiently even in lossy networks with minimal resources such as 8-bit microcontrollers and limited RAM. CoAP ensures reliable communication with low overhead, making it ideal for IoT and M2M environments.
CoAP Characteristics
1. Web protocol suitable for IoT integration.
2. UDP-based communication with optional reliability.
3. Asynchronous message exchanges.
4. Small header size for low overhead and reduced
complexity.
5. Supports URIs and Internet media types.
6. Includes Datagram Transport Layer Security (DTLS) binding
for secure communication.
7. Proxy and caching mechanisms to overcome lossy network
issues.
8. Stateless mapping with HTTP for easy integration.
Figure 8.17: Position of CoAP Protocol in a Stack
Position of CoAP in Network Stack
Figure 8.17 shows the position of CoAP in the protocol stack. It sits at the application layer above UDP, functioning with message and request layers. Below UDP lies the Internet protocol and the constrained PHY layer. This structure allows CoAP to operate efficiently on devices with limited power and connectivity.
CoAP Messaging Types
1. Confirmable (CON): Requires acknowledgment for reliable
delivery.
2. Non-confirmable (NON): No acknowledgment; used for
non-critical data.
3. Acknowledgment (ACK): Confirms receipt of a CON
message.
4. Reset (RST): Sent when a device cannot process a received
message.
Operational Principle
CoAP operates through asynchronous exchanges between UDP endpoints. Each message includes a 4-byte binary header followed by optional payloads. A 2-byte message ID helps detect duplicates. Confirmable (CON) messages ensure reliability through retries and ACKs. Non-confirmable (NON) messages are faster but do not require acknowledgment. If a server cannot process a CON message, it responds with a RESET message.
Figure 8.18: CoAP Response–Response Models (CON, Piggyback, Separate)
Response Models in CoAP
CoAP supports three response models as shown in Figure 8.18:
A) CON and NON Messages: The client sends a
confirmable or non-confirmable message, and the
server responds with ACK or no reply.
B) Piggybacked Messages: The server includes response
data directly in the ACK message, reducing
communication steps.
C) Separate Messages: When the response is delayed,
the server sends an empty ACK followed by a separate
CON message containing data.
Multicast and Token Mechanism
Summary
Smart Home Story: CoAP Response Models
Model A: Confirmable (CON) and Non-Confirmable (NON) Messages
• The app sends a Confirmable (CON) message: 'Hey Light, turn ON!'
• The light bulb receives it, switches ON, and replies with an
Acknowledgment (ACK): 'ACK! Light is ON now.'
Model B: Piggyback Messages
Scenario: You tap 'Light OFF' on your app.
💡 This model is efficient because acknowledgment and data are
sent together.
💡 Ideal when devices can process and respond immediately.
It’s like your smart bulb replying instantly with confirmation and result in one go.
Model C: Separate Messages
Scenario: You send 'Light ON,' but the light bulb is busy.
💡 Used when the server needs more time to process the request.
💡 ACK is sent first to stop retransmission; actual response follows
later.
This ensures reliability and avoids unnecessary network congestion.
8.4.4 :AMQP
Why AMQP Exists
Core Features
AMQP Layering
Frames and Control Flow
Operational Principle (Sessions, Links, Transfer)
Operational Principle (Connections and Sessions)
Figure 8.19: AMQP Components and Their Relationships
Explaination for Figure 8.19
Request–Response and Pub–Sub in AMQP
Smart Home Story: AMQP in Action
Story Flow – From Event to Action
Why AMQP Fits the Smart Home
Key Takeaways
8.4.5: XMPP
XMPP Architecture and Functioning
Explaining Figure 8.20: XMPP Components
Core XMPP Technologies
1 Core: Provides XML streaming, TLS encryption, SASL authentication, and UTF-8 encoding for secure, presence-aware communication.
2 Jingle: Enables voice, video, and file transfer through SIP-compatible signaling over TCP, UDP, or RTP.
3 Multi-User Chat (MUC): Supports group chat with moderation and role management.
4 Pub–Sub: Implements publish–subscribe for real-time event updates and notifications in IoT systems.
5 BOSH: Uses HTTP to carry XMPP data streams for real-time browser-based communication.
Operational Principle of XMPP
Figure 8.20: XMPP Components and Connections
Smart Home Story: XMPP in Action
Smart Home Story: Example Message Flow
Scenario: You use your mobile app to turn ON the living room light.
1 The app sends an XML message to the XMPP server:
'turn light1 ON'.
2 The server authenticates the message and forwards it
to light1@home.local.
3 The light switches ON and sends back a confirmation:
'Light ON confirmed'.
4 The server relays this confirmation to your app and
also publishes a notification to all subscribers of
'home/lighting' using the Pub–Sub feature.
Peer-to-Peer Communication via Jingle
Summary and Key Insights
Detailed Comparison of IoT Communication Protocols (8.4.1 – 8.4.5)
Protocols: MQTT, MQTT-SN, CoAP, AMQP, XMPP
Comparison based on architecture, transport, reliability, and IoT application domain.
MQTT, MQTT-SN, and CoAP Protocols
Protocol | Transport | Architecture | QoS / Reliability | Security | Ideal IoT Use Case |
MQTT | TCP | Broker-based (Publish–Subscribe) | 3 QoS levels (At most once, At least once, Exactly once) | Depends on TCP/TLS layer; authentication via username/password | Smart homes, telemetry data, cloud-connected sensors |
MQTT-SN | UDP / 6LoWPAN | Gateway-based (Wireless Sensor Network) | At least once and at most once delivery; low overhead | Gateway-managed; optional DTLS over UDP | Battery-powered IoT sensors, agriculture monitoring |
CoAP | UDP | Client–Server (Request–Response) | Confirmable / Non-confirmable messages, ACK-based reliability | DTLS encryption and authentication supported | Smart lighting, device control, RESTful IoT interactions |
AMQP and XMPP Protocols
Protocol | Transport | Architecture | QoS / Reliability | Security | Ideal IoT Use Case |
AMQP | TCP | Broker–Queue (Message-Oriented Middleware) | Guaranteed delivery; message settlement with ACKs; flow control | SSL/TLS encryption, SASL authentication | Enterprise IoT, smart home alert routing, industrial automation |
XMPP | TCP | Client–Server (Federated Network) | Persistent connection with message acknowledgment | TLS encryption, SASL authentication, secure federation | Real-time IoT communication, messaging, presence detection |