Unit III - Protocols for IoT
IoT Architecture and Protocols: Guide to Access, Network, Transport, and Application Layers
The Internet of Things (IoT) is a massive network of physical devices that collect, share, and act on data. For an IoT system to work reliably, thousands of tiny devices must talk to each other and to cloud servers. However, traditional internet protocols designed for powerful desktop computers and high-speed fiber-optic lines do not work well on small, battery-powered microcontrollers with limited memory.
To solve this problem, engineers created a specialized, lightweight communication protocol stack for IoT. This article breaks down these IoT access technologies, network protocols, short-range suites, and application protocols layer by layer.
1. IoT Access Technologies: Physical and MAC Layers
The Physical (PHY) and Medium Access Control (MAC) layers form the foundation of the network stack. The Physical layer determines how raw digital data (0s and 1s) is converted into physical radio waves, electrical voltages, or light pulses. The MAC layer manages the access rules, deciding when a specific device is allowed to transmit data over the shared wireless airwaves without colliding with other signals.
IEEE 802.15.4 Standard
Definition and Features
IEEE 802.15.4 is a technical standard maintained by the Institute of Electrical and Electronics Engineers (IEEE) that defines the physical layer and MAC layer operations for low-rate wireless personal area networks (LR-WPANs). It is designed specifically for pocket-sized devices that need to transmit tiny amounts of data over short distances while running on small batteries for years.
Frequency Bands: Operates globally at the 2.4 GHz Industrial, Scientific, and Medical (ISM) radio band, as well as 868 MHz in Europe and 915 MHz in North America.
Data Rates: Low throughput transmission speeds ranging from 20 kbps to 250 kbps (kilobits per second).
Low Power Design: Features aggressive power-saving sleep states that allow devices to draw minimal current when idle.
Working Mechanism
To avoid data collisions when multiple devices talk at once, IEEE 802.15.4 uses a mechanism called Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA). Before a device transmits data, it performs a clear channel assessment by listening to the radio airwaves. If it hears another device talking, it waits for a random period before checking again. If the channel is clear, it transmits its data frame.
Advantages: Low cost, ultra-low power consumption, and highly reliable for basic sensor monitoring.
Disadvantages: Very short range (typically 10 to 100 meters) and incapable of handling heavy files or video streams.
Real-Life Example: Home security window sensors that transmit an alert only when a window is physically opened.
Conceptual Clarification
Hinglish Explanation: IEEE 802.15.4 ek aisa standard hai jo chote, kam battery wale devices ke liye banaya gaya hai. Yeh bohot kam speed (max 250 kbps) par data bhejta hai taaki battery barbad na ho. Yeh data bhejne se pehle hawa mein signals check karta hai (CSMA/CA) taaki doosre device ke signal se takraav (collision) na ho.
IEEE 802.11ah (Wi-Fi HaLow)
Definition and Features
IEEE 802.11ah, marketed commercially as Wi-Fi HaLow, is an amendment to the standard Wi-Fi system designed to meet the long-range, low-power demands of IoT deployments. Traditional Wi-Fi (operating at 2.4 GHz and 5 GHz) drains batteries rapidly and struggles to penetrate walls. Wi-Fi HaLow solves this by operating in the sub-1 GHz frequency spectrum (around 900 MHz).
Extended Range: Provides a coverage radius of up to 1 kilometer, which is roughly double the range of traditional Wi-Fi.
Excellent Penetration: Sub-GHz radio waves travel through concrete walls, dense foliage, and physical barriers far more effectively than higher frequencies.
Massive Device Density: A single Wi-Fi HaLow access point can manage up to 8,191 individual IoT devices simultaneously.
Advantages: Long range, high wall-penetration capabilities, low power consumption, and scalable architecture.
Disadvantages: Lower maximum data throughput compared to standard home Wi-Fi; frequency bands vary by country regulations.
Applications: Industrial manufacturing complexes, smart agricultural fields, and smart city infrastructure links.
LoRaWAN (Long Range Wide Area Network)
Definition and Features
LoRaWAN is a Low Power Wide Area Network (LPWAN) protocol designed to connect battery-operated wireless devices to the internet over long distances. LoRa refers to the physical layer technology (developed by Semtech), while LoRaWAN defines the communication protocol and network architecture managed by the LoRa Alliance.
Long Range Transmission: Signals can travel up to 5 kilometers in dense urban environments and up to 15 kilometers in open rural areas.
Extended Battery Life: Because nodes only transmit data periodically, their batteries can last for 5 to 10 years.
Chirp Spread Spectrum (CSS): LoRa uses CSS modulation, which varies the frequency of the radio wave over time. This makes the signal highly resistant to noise and radio interference.
Working and Architecture
LoRaWAN uses a Star-of-Stars network topology rather than a mesh configuration. The architecture consists of four primary components:
End Devices (Nodes): Sensors that collect data and transmit it wirelessly using LoRa RF signals.
Gateways (Base Stations): Hardware units that listen for LoRa signals from nodes, capture them, and forward the data packets over a standard IP backhaul link (like Cellular or Ethernet) to a central server.
Network Server: The central computing brain that filters duplicate data packets, manages adaptive data rates (ADR), schedules acknowledgments, and routes data to application systems.
Application Server: The cloud software system where the raw sensor data is analyzed, decrypted, and displayed on user dashboards.
Advantages: Long range, lower infrastructure costs, high security through AES-128 encryption, and deep concrete penetration.
Disadvantages: Extremely low payload sizes (typically 51 to 222 bytes per packet) and unsuitable for real-time, low-latency control systems.
Real-Life Example: Underground smart water meters scattered across an entire city that transmit water consumption logs once every 24 hours.
Conceptual Clarification
Hinglish Explanation: LoRaWAN ka main focus hai "Long Range aur Low Power". Iske signals kai kilometers tak ja sakte hain kyunki yeh specialized Chirp Spread Spectrum technique ka use karta hai. Isme sensors direct internet se nahi judte; pehle data Gateway tak jata hai, phir Gateway use internet ke zariye cloud server par bhejta hai. Yeh sensors ke liye perfect hai jo din mein ek-do baar chota data bhejte hain.
2. Network Layer Protocols: IP Versions and Adaptation
The Network layer handles logical addressing and data routing across the internet, ensuring that a data packet from an IoT sensor find its way to the correct cloud server.
IP versions 4 (IPv4) vs. IP version 6 (IPv6) in IoT
Every device connected to the internet needs a unique logical identifier called an Internet Protocol (IP) address.
IPv4 Limitations: IPv4 uses a 32-bit addressing scheme, which provides a maximum pool of roughly 4.3 billion unique addresses (Example: 192.168.1.50). Because the number of smart appliances, industrial sensors, and smartphones has grown exponentially, the world has run out of unallocated IPv4 addresses.
IPv6 Capabilities: IPv6 uses a 128-bit addressing scheme, which provides 3.4 x 10^38 unique addresses (written in hexadecimal format, e.g., 2001:db8::ff00:42:8329). This massive address pool ensures that every single atom on earth could technically be assigned its own unique IP address. IPv6 also includes built-in IPSec security features and eliminates the need for Network Address Translation (NAT) overhead.
For modern IoT systems, IPv6 is essential. It gives every individual sensor node its own native public internet identity, allowing for true end-to-end device communication without needing complex translation gateways.
6LoWPAN Protocol
Definition and Features
6LoWPAN stands for IPv6 over Low-Power Wireless Personal Area Networks. It is an adaptation layer protocol designed by the Internet Engineering Task Force (IETF) to allow resource-constrained devices running on IEEE 802.15.4 wireless links to communicate directly using native IPv6 internet packets.
The Core Problem and Working Mechanism
A standard IPv6 internet packet requires a minimum MTU (Maximum Transmission Unit) packet size of 1280 bytes. However, a single raw data packet in an IEEE 802.15.4 radio network is limited to a maximum size of 125 bytes. This creates a clear incompatibility issue.
┌──────────────────────────────────────────────┐
│ Standard IPv6 Packet (Min 1280 Bytes) │
└──────────────────────┬───────────────────────┘
│
▼ (Incompatible Sizes)
┌──────────────────────────────────────────────┐
│ IEEE 802.15.4 Radio Data Frame (Max 125 Bytes)│
└──────────────────────────────────────────────┘
The 6LoWPAN protocol functions as an intermediate layer sitting between the MAC layer and the standard Network layer. It fixes this size mismatch using three techniques:
Header Compression: Standard IPv6 headers take up 40 bytes of data. 6LoWPAN assumes common network conditions and compresses this header down to 2 to 4 bytes by stripping away redundant field data.
Fragmentation and Reassembly: If a large IPv6 data packet arrives from the internet, 6LoWPAN cuts it up into small chunks that fit into 125-byte radio frames. On the receiving end, the pieces are stitched back together in the correct order.
Layer 3 Mesh Routing: It provides lightweight routing mechanics so data packets can hop across a local mesh network of sensor nodes efficiently.
┌────────────────────────────────┐
│ IPv6 Application Layer │
├────────────────────────────────┤
│ Transport Layer │
├────────────────────────────────┤
│ Network Layer (IPv6) │
├────────────────────────────────┤
│ 6LoWPAN Adaptation Layer │ ◄── Compress, Fragment & Route
├────────────────────────────────┤
│ IEEE 802.15.4 MAC │
├────────────────────────────────┤
│ IEEE 802.15.4 PHY │
└────────────────────────────────┘
Advantages: Allows small sensors to talk directly to standard internet servers without needing an intermediate protocol translation gateway.
Disadvantages: Introduces extra processing and computational overhead on the sensor nodes due to compression algorithms.
Applications: Smart electric meters, environmental monitoring grids, and large-scale industrial wireless networks.
Conceptual Clarification
Hinglish Explanation: IPv6 ke packets bade hote hain (1280 bytes), par chote IoT radios (802.15.4) ek baar mein sirf 125 bytes bhej sakte hain. 6LoWPAN is dikkat ko solve karta hai. Yeh ek "adaptation layer" hai jo bade IPv6 headers ko dabaakar chota (compress) kar deta hai aur bade packets ko chote tukdon mein baant kar bhejta hai taaki chote sensors bhi direct internet se baatein kar sakein.
3. Communication Frameworks and Protocol Suites
Many IoT networks use integrated protocol suites that define everything from the radio frequencies up to the data formatting layers. These are often referred to as transport standards or short-range communication frameworks.
Zigbee
Definition and Features
Zigbee is a high-level communication suite built on top of the IEEE 802.15.4 standard, managed by the Connectivity Standards Alliance (CSA). It is designed to create self-healing, low-power mesh networks for home and industrial control environments.
Mesh Topology: In a Zigbee mesh network, nodes do not just send their own data; they also act as relays, passing data packets along for neighboring nodes. This allows the network's overall range to expand organically as more devices are added.
Three Device Roles:
Zigbee Coordinator (ZC): The root device that initializes, manages, and stores security keys for the network. There is only one coordinator per network.
Zigbee Router (ZR): Intermediary nodes that relay data packets from other devices across the mesh network. They must be continuously powered.
Zigbee End Device (ZED): Low-power battery-operated units (like a light switch or temperature sensor) that talk only to their parent router. They sleep most of the time to save power.
Advantages: Self-healing routing pathways (if one router node breaks, data reroutes automatically), support for up to 65,000 nodes, and low power usage.
Disadvantages: Lower data rates, susceptible to interference from 2.4 GHz home Wi-Fi networks, and requires a dedicated hub gateway to connect to the internet.
Applications: Smart home automation systems (smart bulbs, switches), indoor climate control, and warehouse inventory tracking.
Bluetooth and Bluetooth Low Energy (BLE)
Traditional Bluetooth and Bluetooth Low Energy are completely different protocol architectures, despite sharing the same brand name.
Bluetooth Classic
Originally designed as a wireless cable replacement for high-throughput continuous streaming applications, such as wireless headsets, speakers, and file transfers.
Network Style: Uses a Piconet system where one master unit links with up to seven active slave units. It uses Frequency Hopping Spread Spectrum (FHSS) to reduce signal collisions.
IoT Drawback: It maintains a continuous connection state with high current draw, which quickly drains small coin-cell batteries.
Bluetooth Low Energy (BLE)
Introduced in the Bluetooth 4.0 specification, BLE was designed from scratch for the ultra-low-power requirements of the IoT landscape.
Working Principle: Unlike Classic Bluetooth, which stays connected continuously, a BLE device remains in a low-power sleep state until an event occurs. It wakes up, transmits a tiny data packet within a few milliseconds, and immediately goes back to sleep.
Architecture Profiles:
GAP (Generic Access Profile): Governs how BLE devices broadcast their presence (advertising) and establish connections with other units.
GATT (Generic Attribute Profile): Defines how data is structured and exchanged using Hierarchical Services and Characteristics once a connection is active.
Advantages: Can run for months or years on a single CR2032 coin-cell battery, features low hardware costs, and connects natively to standard consumer smartphones.
Disadvantages: Limited data payload capacity and short transmission range (typically under 30 meters).
Applications: Smart fitness trackers, heart rate monitors, localized indoor navigation beacons, and wireless medical equipment.
Conceptual Clarification
Hinglish Explanation: Classic Bluetooth continuously connected rehta hai, isliye woh battery zyada khata hai (jaise wireless headphones). BLE (Bluetooth Low Energy) ko specially IoT ke liye banaya gaya hai. Yeh hamesha sota rehta hai aur jab koi naya data bhejni ho, toh kuch milliseconds ke liye jaagta hai, data bhejta hai, aur turant so jata hai. Is wajah se yeh ek chote button-cell par bhi saalon chal jata hai.
Z-Wave
Definition and Features
Z-Wave is a proprietary, wireless mesh network communication protocol owned by Silicon Labs and managed by the Z-Wave Alliance. It is developed specifically for residential home automation and smart appliance ecosystems.
Sub-GHz Operation: Unlike Zigbee and Bluetooth, which fight for bandwidth in the crowded 2.4 GHz spectrum, Z-Wave operates in the sub-1 GHz frequency band (868 MHz in Europe and 908 MHz in the USA). This eliminates interference from home Wi-Fi networks and microwave ovens.
Deterministic Mesh Routing: It supports a maximum of 232 devices within a single mesh network loop, using source routing to find the most efficient path through the home.
Advantages: Excellent wall penetration, zero interference from home Wi-Fi systems, and high device interoperability guaranteed by a strict product certification process.
Disadvantages: Proprietary licensing model increases manufacturing costs, lower raw data speeds (up to 100 kbps), and a smaller total device count limit per network compared to Zigbee.
Applications: Residential smart locks, automated window blinds, home smoke alarms, and smart lighting switches.
4. IoT Application Layer Protocols
The Application layer defines the syntax and messaging formats that software applications use to interpret sensor data and issue automation commands.
MQTT (Message Queuing Telemetry Transport)
Definition and Features
MQTT is an ultra-lightweight, open-source messaging protocol managed by OASIS. It is designed for constraint-heavy remote locations where network bandwidth is limited or unreliable. It runs on top of the connection-oriented Transport layer protocol, TCP.
Architecture and Working
MQTT uses an asymmetrical Publish-Subscribe network architecture instead of the traditional Client-Server model. It features three core elements:
Publisher Client: An IoT edge node containing sensors that publishes data to a specific string path called a Topic (Example:
home/kitchen/temperature).Subscriber Client: An application dashboard or database that registers interest in specific topics to receive data updates automatically.
MQTT Broker: The central server that manages the network. It receives incoming messages from publishers, filters them by topic, and distributes them to all subscribed clients.
Quality of Service (QoS) Levels
MQTT includes three distinct QoS levels to guarantee message delivery across unreliable networks:
QoS 0 (At most once): The message is sent once with no confirmation check. It has minimal overhead but risks data loss if the connection drops.
QoS 1 (At least once): The broker sends an acknowledgment back. If the publisher doesn't receive it, the message is sent again, which can result in duplicate deliveries.
QoS 2 (Exactly once): Uses a four-step handshake sequence to guarantee that the message is delivered exactly once without duplicates. This provides maximum reliability with higher network overhead.
Advantages: Extremely small packet overhead (fixed header is only 2 bytes), built-in message queuing, and real-time data delivery via persistent open connections.
Disadvantages: Runs over TCP, which can consume more power and memory than UDP-based protocols due to connection maintenance requirements.
CoAP (Constrained Application Protocol)
Definition and Features
CoAP is a specialized web transfer protocol designed by the IETF for resource-constrained internet devices. It translates the traditional web model into a lightweight version optimized for embedded systems.
Working Mechanism
CoAP uses a standard Request-Response architecture that mirrors the design of HTTP. It uses familiar commands like GET (to read data), POST (to create data), PUT (to update data), and DELETE.
However, unlike HTTP which relies on connection-heavy TCP streams, CoAP runs over the lightweight, connectionless UDP (User Datagram Protocol). It replaces verbose text headers with small, efficient 4-byte binary headers.
┌─────────────────────────────────────────────────────────────┐
│ HTTP Model: Text Headers + Heavy TCP Connection │
└──────────────────────────────┬──────────────────────────────┘
│
(Optimized for Embedded Systems)
▼
┌─────────────────────────────────────────────────────────────┐
│ CoAP Model: 4-Byte Binary Headers + Lightweight UDP Packets │
└─────────────────────────────────────────────────────────────┘
CoAP easily bridges to standard web servers through a simple translation proxy, allowing developers to interact with a tiny sensor using a standard RESTful API.
Advantages: Native RESTful integration with standard web architecture, very low protocol overhead, and handles multicast addressing natively.
Disadvantages: Because UDP does not guarantee packet delivery natively, CoAP must handle packet confirmations inside its own application layer using Confirmable (CON) and Non-confirmable (NON) message flags.
Conceptual Clarification
Hinglish Explanation: Web browsers jis tarah HTTP use karte hain, CoAP bilkul waisa hi hai par chote devices ke liye custom-made hai. HTTP bohot bada hota hai aur TCP par chalta hai, jabki CoAP bohot chote binary headers ka use karta hai aur bina connection setup ke jaldi se UDP par kaam karta hai. MQTT mein ek central broker hota hai, par CoAP mein direct Request-Response (Client-Server) model hota hai.
5. Technology Protocol Matrices
The tables below provide structural comparison overviews for each functional layer of the IoT network stack.
Access Layer Technologies
Technical Parameter | IEEE 802.15.4 | IEEE 802.11ah (Wi-Fi HaLow) | LoRaWAN |
Operational Band | 2.4 GHz, 868/915 MHz | Sub-GHz (900 MHz) | Sub-GHz (868/915 MHz) |
Maximum Range | 10 - 100 Meters | Up to 1 Kilometer | 5 - 15 Kilometers |
Data Throughput | 250 kbps | 150 kbps to 15 Mbps | 250 bps to 50 kbps |
Payload Capacity | Max 127 Bytes | Highly Scalable | Max 222 Bytes |
Short-Range Transport Frameworks
Selection Metric | Zigbee | Bluetooth Low Energy (BLE) | Z-Wave |
Network Topology | Mesh Network | Star / Point-to-Point | Mesh Network |
Frequency Spectrum | 2.4 GHz | 2.4 GHz | Sub-GHz (868 / 908 MHz) |
Max Device Limit | 65,000 Nodes | Dependent on implementation | 232 Devices |
Interference Risk | High (Shares Wi-Fi Band) | Medium (Uses adaptive hopping) | Very Low / None |
Application Layer Protocols
Architectural Parameter | MQTT | CoAP |
Communication Model | Publish / Subscribe | Request / Response (RESTful) |
Underlying Transport | TCP | UDP |
Header Footprint | 2 Bytes Fixed Header | 4 Bytes Fixed Binary Header |
Delivery Guarantee | Three QoS Levels (0, 1, 2) | Managed via CON/NON message types |
Connection State | Persistent open connection | Connectionless stateless bursts |
6. Important Exam and Interview Discussion Points
Question: Why is UDP preferred over TCP for highly constrained IoT application layer protocols like CoAP?
Answer: TCP requires a multi-step connection handshake process (SYN, SYN-ACK, ACK) and continuously tracks connection states, which consumes significant memory, processing cycles, and battery power. UDP sends data packets immediately without connection overhead, making it ideal for low-power devices that need to transmit data quickly and go back to sleep.
Question: How does 6LoWPAN bridge the gap between IPv6 networks and IEEE 802.15.4 link constraints?
Answer: 6LoWPAN acts as an intermediate adaptation layer that compresses large 40-byte IPv6 headers down to 2-4 bytes. It also handles fragmentation, breaking large 1280-byte internet packets down into smaller pieces that fit into 125-byte radio frames, reassembling them at the receiving end.
Summary and Key Takeaways
Access Technologies: IEEE 802.15.4 defines low-rate, short-range wireless communication. Wi-Fi HaLow extends standard Wi-Fi into the sub-GHz spectrum for better wall penetration, while LoRaWAN uses Chirp Spread Spectrum modulation to provide long-range communication over several kilometers.
Network Layer: IPv6 provides the massive address space needed for billions of unique IoT devices. 6LoWPAN functions as an adaptation layer, compressing and fragmenting IPv6 headers to run on low-power wireless radios.
Transport Frameworks: Zigbee provides self-healing mesh networking at 2.4 GHz; BLE optimizes localized short-range communication by staying in a sleep state until triggered; Z-Wave uses sub-GHz frequencies to eliminate interference in home automation systems.
Application Layer: MQTT uses an efficient Publish-Subscribe architecture over TCP, using a central broker to coordinate messages. CoAP brings the RESTful Request-Response model of the web down to embedded devices, running efficiently over UDP with small binary headers.
SEO Keywords
Internet of Things notes,
IoT Access Technologies physical MAC layer,
IEEE 802.15.4 standard features,
Wi-Fi HaLow 802.11ah protocol,
LoRaWAN architecture network topology,
IPv6 vs IPv4 in IoT networks,
6LoWPAN adaptation layer header compression,
Zigbee mesh network coordinator router,
Bluetooth Low Energy BLE GATT GAP,
Z-Wave sub-GHz home automation,
MQTT protocol publish subscribe broker,
CoAP RESTful web transfer UDP,
Computer Engineering communication protocols notes,
SPPU 2024 Pattern IoT layer exam preparation,
IoT application layer protocol comparison table
Download PDF Notes & Get Updates
Join our WhatsApp channel for free PDF downloads and instant notifications when new notes drop.
Advertisement
Comments (0)
Sign in to join the discussion
