667 IoT Protocols: Labs and Selection
667.1 Learning Objectives
By the end of this chapter series, you will be able to:
- Compare IPv4 and IPv6: Evaluate address space requirements and transition strategies for IoT
- Apply Protocol Selection Criteria: Choose protocols based on power, bandwidth, latency, and reliability
- Design Protocol Stacks: Plan complete communication stacks from physical to application layers
- Implement Protocol Labs: Build hands-on projects demonstrating protocol operations
- Evaluate Trade-offs: Balance competing requirements when selecting communication technologies
- Test Protocol Performance: Measure throughput, latency, and reliability in IoT deployments
What is this chapter? An index to hands-on labs and protocol selection guidance for IoT projects.
When to use: - After studying IoT protocols overview - When choosing protocols for your project - For practical implementation exercises
Key Decision Factors:
| Factor | Consideration |
|---|---|
| Power Budget | Battery vs mains powered |
| Data Rate | Sensor telemetry vs video |
| Range | Indoor vs outdoor deployment |
| Latency | Real-time vs batch processing |
Prerequisites: - Understanding of IoT protocol landscape - Basic networking knowledge - Familiarity with protocol trade-offs
Recommended Path: 1. Review IoT Protocols Overview 2. Complete labs in this chapter series 3. Reference during project planning
667.2 Chapter Overview
This chapter series provides comprehensive hands-on coverage of IoT protocol selection and implementation. The content is organized into focused modules:
667.2.1 IPv6 and 6LoWPAN
Deep dive into network layer technologies essential for scalable IoT:
- IPv6 addressing for unlimited device connectivity
- 6LoWPAN header compression enabling IPv6 on constrained 802.15.4 networks
- Thread protocol stack as a real-world 6LoWPAN implementation
- Smart city deployment analysis for million-device scenarios
667.2.2 CoAP vs MQTT
Comprehensive comparison of the two dominant IoT application protocols:
- CoAP characteristics: RESTful design, UDP transport, 4-byte headers
- MQTT characteristics: Publish-subscribe, QoS levels, broker architecture
- Selection criteria: When to use each protocol based on device constraints
- Hybrid architectures: Combining CoAP and MQTT for edge-to-cloud communication
667.2.3 Selection Framework
Systematic approach to protocol selection with hands-on calculations:
- Decision tree navigation: From power source to application protocol
- Energy efficiency analysis: Compare protocols by energy-per-bit and instantaneous power
- Protocol overhead labs: Calculate frame sizes for different stacks
- Battery life impact: Quantify how protocol choice affects device longevity
667.2.4 Python Implementations
Practical tools and comprehensive worked examples:
- Protocol stack analyzer: Calculate overhead and efficiency programmatically
- Battery life calculator: Estimate device longevity from transmission patterns
- Protocol selector engine: Automate recommendations based on requirements
- Building management worked example: Complete 250-sensor deployment design
667.3 Quick Reference: Protocol Selection
| Requirement | Recommended Stack |
|---|---|
| Battery + Short Range (<100m) | BLE + CoAP/UDP |
| Battery + Medium Range (100m-1km) | Zigbee/Thread + 6LoWPAN + CoAP |
| Battery + Long Range (>1km) | LoRaWAN/NB-IoT + Custom |
| Mains Power + Pub-Sub | Wi-Fi + MQTT/TCP |
| Mains Power + REST API | Ethernet + HTTP/REST |
| Real-time Control | UDP-based (CoAP) |
| Reliable Telemetry | TCP-based (MQTT with QoS) |
667.4 Prerequisites
Before diving into these chapters, you should be familiar with:
- Networking Basics for IoT: Understanding of fundamental networking concepts, OSI model, and TCP/IP stack provides the foundation for protocol analysis and selection
- IoT Protocols: Fundamentals: Familiarity with IoT-specific protocol constraints, resource limitations, and the basic IoT protocol stack helps contextualize why specialized protocols like 6LoWPAN are needed
- Layered Models: Fundamentals: Knowledge of layered networking models and encapsulation is essential for understanding how protocols at different layers (IPv6, UDP/TCP, CoAP/MQTT) work together
- IoT Protocols Overview: Overview of the complete IoT protocol landscape provides context for comparing specific protocols like CoAP vs MQTT and understanding their positions in the stack
667.5 Whatβs Next
Start with the first focused chapter to build your protocol selection skills:
- IoT Protocols Lab: IPv6 and 6LoWPAN: Begin with network layer fundamentals and 6LoWPAN compression
Or jump directly to your area of interest using the chapter links above.