%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#7F8C8D'}}}%%
graph LR
subgraph PAYLOAD["Application Data"]
DATA["Sensor Value<br/>10 bytes"]
end
subgraph MQTT_STACK["MQTT over TCP/IPv6/Wi-Fi"]
M1["MQTT: +5 bytes"]
M2["TCP: +20 bytes"]
M3["IPv6: +40 bytes"]
M4["Wi-Fi: +36 bytes"]
MTOTAL["Total: 111 bytes<br/>Efficiency: 9%"]
end
subgraph COAP_STACK["CoAP over UDP/6LoWPAN/802.15.4"]
C1["CoAP: +4 bytes"]
C2["UDP: +8 bytes"]
C3["6LoWPAN: +6 bytes"]
C4["802.15.4: +25 bytes"]
CTOTAL["Total: 53 bytes<br/>Efficiency: 19%"]
end
DATA --> MQTT_STACK
DATA --> COAP_STACK
style DATA fill:#E67E22,stroke:#2C3E50,color:#fff
style MTOTAL fill:#7F8C8D,stroke:#2C3E50,color:#fff
style CTOTAL fill:#16A085,stroke:#2C3E50,color:#fff
673 IoT Protocol Review: Visual Summaries and Decision Framework
673.1 Learning Objectives
By the end of this chapter, you will be able to:
- Visualize Protocol Stacks: Understand layered IoT protocol architecture through diagrams
- Apply Decision Frameworks: Select appropriate protocols using systematic criteria
- Compare Protocol Efficiency: Evaluate overhead ratios for different protocol combinations
- Navigate Selection Trade-offs: Balance power, bandwidth, range, and reliability requirements
673.2 Prerequisites
Required Chapters: - IoT Protocols Overview - Protocol landscape - IoT Protocols Fundamentals - Core concepts - Application Protocols - Selection criteria
Estimated Time: 15 minutes
What is a protocol stack? A protocol stack is like a layered cake where each layer has a specific job. Data travels down through layers when sending (adding “wrapping” at each layer) and up through layers when receiving (removing “wrapping” at each layer).
Why does layer structure matter for IoT? Each layer adds overhead (extra bytes). For tiny IoT sensors sending small readings, this overhead can dominate the total packet size. Understanding the stack helps you choose efficient protocol combinations.
Key Insight: For a 4-byte temperature reading, protocol headers can add 60+ bytes of overhead - making header efficiency crucial for battery-powered devices.
673.3 IoT Protocol Stack Architecture
Understanding the layered structure of IoT protocols is essential for protocol selection and troubleshooting. The following diagram shows how protocols work together from the physical radio layer up to the application.
673.4 Protocol Selection Decision Tree
Choosing the right protocol stack depends on device constraints, network topology, power budget, and application requirements. This decision tree guides protocol selection based on key system characteristics.
This quadrant chart visualization shows protocol selection based on two key trade-off dimensions: power consumption (vertical) and data throughput requirements (horizontal). Each quadrant represents a different protocol family best suited to those constraints.
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#2C3E50', 'primaryBorderColor': '#16A085', 'quadrant1Fill': '#E8F6F3', 'quadrant2Fill': '#FDF2E9', 'quadrant3Fill': '#EBF5FB', 'quadrant4Fill': '#FDEDEC'}}}%%
quadrantChart
title Protocol Selection: Power vs Throughput Trade-offs
x-axis Low Throughput --> High Throughput
y-axis High Power --> Low Power
quadrant-1 "LPWAN: LoRaWAN, Sigfox"
quadrant-2 "Cellular IoT: NB-IoT, LTE-M"
quadrant-3 "Wi-Fi, Ethernet"
quadrant-4 "Mesh: Zigbee, Thread, BLE"
"Smart Meters": [0.25, 0.85]
"Asset Tracking": [0.35, 0.75]
"Env Sensors": [0.20, 0.90]
"Video Stream": [0.90, 0.15]
"Smart Home": [0.55, 0.60]
"Wearables": [0.40, 0.70]
"Industrial": [0.75, 0.35]
"Fleet GPS": [0.50, 0.55]
673.5 Protocol Efficiency Comparison
Understanding protocol overhead is critical for battery-powered IoT devices. This comparison shows total packet size and payload efficiency for different protocol stacks when transmitting a 4-byte sensor reading.
673.6 Common IoT Acronyms Reference
| Acronym | Full Name | Layer | Purpose |
|---|---|---|---|
| 6LoWPAN | IPv6 over Low-power WPAN | Adaptation | IPv6 header compression |
| AMQP | Advanced Message Queuing Protocol | Application | Enterprise messaging |
| CoAP | Constrained Application Protocol | Application | RESTful for constrained devices |
| DTLS | Datagram Transport Layer Security | Transport | Secure UDP |
| HTTP | Hypertext Transfer Protocol | Application | Web protocol |
| ICMPv6 | Internet Control Message Protocol v6 | Network | Network diagnostics |
| IPv6 | Internet Protocol version 6 | Network | 128-bit addressing |
| LLN | Low-Power and Lossy Network | - | Constrained network type |
| LoRaWAN | Long Range WAN | Data Link | LPWAN protocol |
| LPWAN | Low-Power Wide Area Network | - | Network category |
| MQTT | Message Queue Telemetry Transport | Application | Pub/sub messaging |
| NB-IoT | Narrowband IoT | Data Link | Cellular LPWAN |
| RPL | IPv6 Routing Protocol for LLN | Network | IoT routing |
| TLS | Transport Layer Security | Transport | Secure TCP |
| UDP | User Datagram Protocol | Transport | Connectionless transport |
| WPAN | Wireless Personal Area Network | - | Network category |
673.7 Visual Reference Gallery
The IoT protocol stack provides the conceptual framework for understanding how different protocols work together to enable device-to-cloud communication.
Understanding CoAP’s message types and flow patterns is essential for implementing efficient RESTful communication on constrained devices.
MQTT’s publish-subscribe pattern decouples data producers from consumers, enabling scalable IoT data collection through a central broker.
673.8 Summary
Protocol Stack Structure: - Protocols operate in layers: Physical, Data Link, Network, Transport, Application - Each layer adds overhead (header bytes) to the total packet - 6LoWPAN adaptation layer compresses IPv6 headers by 85-95%
Selection Framework: - Range < 100m: Use mesh (Zigbee/Thread) or star (BLE) with CoAP - Range 100m-1km: Wi-Fi with MQTT (cloud) or CoAP (local) - Range > 1km: LoRaWAN (no cellular) or NB-IoT/LTE-M (with cellular)
Efficiency Comparison (4-byte payload): - LoRaWAN: 17 bytes total, 23.5% efficiency (best for LPWAN) - CoAP/UDP/6LoWPAN: 26 bytes total, 15.4% efficiency (best for mesh) - MQTT/TCP: 40 bytes total, 10% efficiency (best for cloud) - HTTP/TCP/IPv4: 108 bytes total, 3.7% efficiency (gateways only)
Decision Factors: - Power budget (battery vs powered) - Throughput requirements (kbps vs Mbps) - Latency constraints (real-time vs tolerant) - Network topology (star vs mesh)
673.9 What’s Next
Continue with the protocol review series:
- Protocol Review: Hands-On Labs: Build packet analyzers and protocol tools
- Protocol Review: Assessment: Test your knowledge with comprehensive quizzes
For protocol deep dives: - MQTT: Publish-subscribe messaging - CoAP Architecture: RESTful protocol for IoT