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.

Graph diagram

Graph diagram
Figure 673.1: Layered IoT protocol stack diagram showing seven layers: Physical layer contains 2.4GHz/Sub-GHz radio. Data Link layer includes IEEE 802.15.4 with 25-byte header, Bluetooth LE with 10-byte header, and LoRaWAN with 13-byte header. Adaptation layer shows 6LoWPAN compression reducing IPv6 from 40 bytes to 2-6 bytes (85-95% reduction). Network layer displays IPv6 with 40 bytes uncompressed. Transport layer splits into TCP (20+ bytes, reliable, connection-oriented) and UDP (8 bytes, connectionless, lightweight). Application layer shows MQTT (2-byte header plus topic, pub/sub over TCP in orange) and CoAP (4-byte header, RESTful over UDP in navy). Arrows flow upward showing data encapsulation. Orange indicates MQTT/IPv6, navy indicates CoAP, teal indicates UDP, gray indicates TCP. Stack demonstrates how protocols combine for IoT communication with header overhead at each layer.

%%{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

Figure 673.2: Alternative View: Protocol Overhead Comparison - Rather than showing abstract layers, this diagram quantifies the actual byte overhead of two common IoT stacks for a simple 10-byte sensor reading. MQTT over TCP/IPv6/Wi-Fi adds 101 bytes of headers (9% payload efficiency). CoAP over UDP/6LoWPAN/802.15.4 adds only 43 bytes (19% efficiency - 2x better). For constrained devices sending small payloads frequently, this 2x efficiency difference directly translates to longer battery life and reduced network congestion. {fig-alt=“Side-by-side protocol overhead comparison for 10-byte sensor payload. MQTT stack: MQTT adds 5 bytes, TCP adds 20 bytes, IPv6 adds 40 bytes, Wi-Fi adds 36 bytes, total 111 bytes with 9% efficiency. CoAP stack: CoAP adds 4 bytes, UDP adds 8 bytes, 6LoWPAN adds 6 bytes, 802.15.4 adds 25 bytes, total 53 bytes with 19% efficiency. Shows CoAP stack has 2x better efficiency for small payloads.”}

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.

Graph diagram

Graph diagram
Figure 673.3: Flowchart decision tree for selecting IoT protocols based on communication range. Root node asks “Range Requirement?” with three paths: Short (less than 100m) leads to “Mesh Needed?” question - Yes path recommends Zigbee/Thread plus 6LoWPAN plus CoAP (teal box), No path suggests BLE or 802.15.4 plus CoAP for star topology (teal box). Medium range (100m-1km) leads to “Wi-Fi Available?” question - Yes path asks “Use Case?” with Cloud option recommending Wi-Fi plus MQTT pub/sub to cloud (orange box), Local option suggesting Wi-Fi plus CoAP for local gateway (teal box), No path recommends considering LPWAN or Wi-Fi extension. Long range (over 1km) leads to “Cellular Coverage?” question - Yes path recommends NB-IoT or LTE-M plus CoAP or MQTT (orange box), No path suggests LoRaWAN for ultra-low power (navy box). Navy boxes indicate primary recommendations, teal indicates alternative efficient options, orange indicates cloud-connected solutions. Decision tree guides protocol stack selection for constrained IoT devices based on deployment constraints.

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]

Figure 673.4: Protocol selection quadrant showing IoT use cases plotted by power budget (vertical axis from high power at bottom to low power at top) and throughput needs (horizontal axis from low to high). Upper-left quadrant (LPWAN: LoRaWAN, Sigfox) contains environmental sensors and smart meters requiring ultra-low power with minimal data. Upper-right quadrant (Cellular IoT: NB-IoT, LTE-M) shows asset tracking and fleet GPS needing moderate throughput with good power efficiency. Lower-left quadrant (Mesh: Zigbee, Thread, BLE) displays smart home and wearables with moderate power and throughput. Lower-right quadrant (Wi-Fi, Ethernet) shows video streaming and industrial applications requiring high throughput at higher power cost. This visualization complements the decision tree by showing how different use cases cluster around optimal protocol families based on their specific power and bandwidth constraints.

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.

Graph diagram

Graph diagram
Figure 673.5: Protocol overhead comparison diagram showing four protocol stacks transmitting 4-byte temperature sensor reading (23 degrees Celsius). Left box shows 4-byte payload in navy. Four protocol paths branch right: (1) LoRaWAN in teal shows 13-byte header, 17 bytes total, 23.5% efficiency - most efficient using MAC-layer only without IP stack. (2) CoAP/UDP/6LoWPAN in teal shows 22-byte overhead (6LoWPAN compression plus UDP plus CoAP), 26 bytes total, 15.4% efficiency - good balance for mesh networks. (3) MQTT/TCP/6LoWPAN in orange shows 36-byte overhead (6LoWPAN plus TCP 20 bytes plus MQTT 2 bytes), 40 bytes total, 10% efficiency - reliable delivery with connection overhead. (4) HTTP/TCP/IPv4 in red shows 104-byte overhead (IPv4 20 bytes plus TCP 20 bytes plus HTTP 50+ bytes text headers), 108 bytes total, 3.7% efficiency - highest overhead suitable only for gateway-to-cloud. Note box indicates lower overhead equals longer battery life, less airtime, more devices per gateway. Teal represents efficient options, orange moderate overhead, red high overhead. Demonstrates dramatic efficiency differences for tiny IoT payloads where protocol headers dominate packet size.

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.8 Summary

TipKey Takeaways

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:

For protocol deep dives: - MQTT: Publish-subscribe messaging - CoAP Architecture: RESTful protocol for IoT