Fundamentals
  • ← All Modules
  1. Protocol Selection
  2. 44  Protocol Selection Wizard
Fundamentals
  • 1  Introduction to Fundamentals
  • 2  Core Building Blocks of IoT
  • Ecosystem Overview
    • 3  IoT Ecosystem Fundamentals
  • Data & Number Systems
    • 4  Data Representation Fundamentals
    • 5  Number Systems and Data Units
    • 6  Text Encoding for IoT
    • 7  Bitwise Operations and Endianness
  • Data & Packet Formats
    • 8  IoT Data Formats Overview
    • 9  Binary Data Formats for IoT
    • 10  Data Format Selection Guide
    • 11  Data Formats Practice and Assessment
    • 12  Data Formats for IoT
    • 13  Packet Structure and Framing
    • 14  Packet Anatomy
    • 15  Frame Delimiters and Boundaries
    • 16  Error Detection: Checksums and CRC
    • 17  Protocol Overhead and Encapsulation
  • Signal Processing
    • 18  Sensor to Network Pipeline
    • 19  Pipeline & Signal Acquisition
    • 20  Pipeline Processing and Formatting
    • 21  Pipeline Transmission
    • 22  Signal Processing Essentials
    • 23  Signal Processing Overview
    • 24  Signal Processing Essentials
    • 25  ADC Sampling & Aliasing
    • 26  Aliasing and ADC Resolution
    • 27  Quantization and Digital Filtering
    • 28  Signal Processing Practice and Lab
    • 29  Sensor Dynamics and Linearization
    • 30  Voice and Audio Compression for IoT
    • 31  Signal Processing Labs
  • Wireless Propagation
    • 32  Wireless Propagation Basics
    • 33  Radio Wave Basics for IoT
    • 34  Path Loss and Link Budgets
    • 35  Fading & RF Interference
    • 36  Wireless Propagation Lab
  • Protocol Selection
    • 37  Protocol Selection Framework
    • 38  Protocol Selection Framework
    • 39  Protocol Selection Scenarios
    • 40  Protocol Anti-Patterns
    • 41  Protocol Selection: The Challenge
    • 42  Protocol Selector Wizard
    • 43  Protocol Decision Frameworks
    • 44  Protocol Selection Wizard
    • 45  Protocol Matching Game
    • 46  IoT Architecture Planner
    • 47  Learning Path Generator
  • Academic Resources
    • 48  Paper Reading Guides
    • 49  WSN Papers Guide
    • 50  Paper Guides: Protocols
    • 51  Architecture Papers Guide
    • 52  Paper Reading Guides: IoT Security

On This Page

  • 44.1 Interactive Protocol Wizard
  • 44.3 Prerequisites
  • 44.4 Step 1: Define Your Application
  • 44.5 Concept Check: Understanding Wizard Scoring
  • 44.6 Step 2: Technical Requirements
  • 44.7 Step 3: Power and Environment
  • 44.8 Step 4: Business Constraints
  • 44.9 Step 5: Additional Considerations
  • 44.10 Protocol Recommendations
  • 44.11 Detailed Comparison
  • 44.12 Your Requirements Summary
  • 44.13 Protocol Deep Dives
  • 44.14 Decision Framework: When to Override the Wizard’s Top Recommendation
  • 44.15 Knowledge Check: Protocol Categories and Selection Dimensions
  • 44.16 Concept Relationships
  • Common Pitfalls
  • 44.17 Summary
  • 44.18 See Also
  • 44.19 What’s Next
  1. Protocol Selection
  2. 44  Protocol Selection Wizard

44  Protocol Selection Wizard

Interactive Requirements-Based Protocol Recommendation Tool

In 60 Seconds

This step-by-step wizard analyzes your IoT project across 8 dimensions (range, power, bandwidth, latency, cost, security, scalability, infrastructure) and scores 14 protocols to generate ranked recommendations. Enter your requirements and the wizard calculates weighted match scores, showing you the top 3 protocols with side-by-side technical comparisons and links to detailed study chapters.

How It Works: Multi-Dimensional Weighted Scoring for Protocol Ranking

The big picture: The wizard scores 14 protocols across 8 dimensions (range, power, bandwidth, latency, cost, security, scalability, infrastructure) using weighted criteria based on your inputs. Each protocol starts at 50/100 points, gains points for meeting requirements, and loses points for failing constraints.

Step-by-step breakdown:

  1. Requirement translation: Your selections (e.g., “10-100 meters Building range”, “Long-life battery 5-10 years”, “10 KB - 1 MB/day data”) are converted to numeric constraints (range=100m, powerCritical=true, bandwidth=100 kbps). - Real example: “Hourly updates” → 24 transmissions/day → average data rate calculation.
Putting Numbers to It

Context: Translating “10 KB/day” user input into bandwidth requirements. Daily data → samples per day → average data rate.

Formula: Average bandwidth (kbps) = \(\frac{\text{Daily data (KB)} \times 8}{\text{Seconds per day}}\)

Worked example: User selects “10 KB - 1 MB/day” midpoint = 500 KB/day. Convert: \(\frac{500 \times 8}{86400} = 0.046\) kbps = 46 bps average. But peak matters: if 24 hourly samples → 500 KB / 24 = 20.8 KB/hour = 0.72 kbps peak. Wizard uses peak for protocol scoring (Wi-Fi’s minimum 11 Mbps is massive overkill for 0.72 kbps; LoRaWAN 0.3-50 kbps matches well, scores +10 points).

  1. Range scoring: Protocol range [minRange, maxRange] compared to requirement. If requirement falls within range → +15 points. If requirement exceeds maxRange → -25 points (disqualifying). If requirement well below minRange → -5 points (overkill). - Real example: LoRaWAN (2-15km) scores +15 for a 10km requirement but -5 for a 50m requirement (massive overkill). Conversely, BLE (1-100m) scores -25 for a 10km requirement because 100m max range cannot reach 10km.

  2. Power scoring: If “powerCritical” flag is true (battery >5 years), ultra-low power protocols (BLE, LoRaWAN) gain +20 points, high-power protocols (Wi-Fi, 5G) lose -20 points. This single filter often determines the winner. - Real example: Coin-cell wearable sets powerCritical=true, eliminating Wi-Fi (-20 points) and boosting BLE (+20 points).

Why this matters: The scoring algorithm codifies expert knowledge into reproducible decisions. The same inputs always produce the same ranked recommendations, unlike human experts whose advice varies by mood or recent experience. The “reasons” and “warnings” arrays document the decision logic, making recommendations explainable and auditable.


44.1 Interactive Protocol Wizard

Learning Objectives

By completing this interactive wizard, you will be able to:

  • Decompose IoT project requirements into scorable dimensions (range, power, bandwidth, latency, cost, security)
  • Generate ranked protocol recommendations by applying weighted multi-dimensional scoring to 14+ protocols
  • Compare protocols side-by-side using technical specifications, cost structures, and deployment constraints
  • Evaluate trade-offs between range, power consumption, bandwidth, latency, and total cost of ownership
  • Justify when to override the wizard’s top recommendation based on regulatory, infrastructure, or business constraints
  • Map wizard outputs to detailed protocol study chapters for deeper technical investigation
Key Concepts
  • Protocol Selection Criteria: Device constraints (RAM/CPU), network type (cellular/LoRa/WiFi), QoS requirements, and cloud ecosystem
  • MQTT: Best for telemetry from constrained devices — minimal overhead, native pub/sub, widely supported
  • CoAP: Best for request/response with constrained devices over UDP — REST-compatible with 4-byte headers
  • AMQP: Best for enterprise routing with complex delivery guarantees — exchanges, queues, dead-letter handling
  • HTTP/REST: Best for cloud APIs and dashboard integration — universal support but 100× overhead versus MQTT
  • DDS: Best for real-time control (robotics, autonomous vehicles) — sub-millisecond latency, no broker
  • WebSocket: Best for real-time browser dashboards — bidirectional persistent connection over HTTP upgrade

44.2 For Beginners: Protocol Selection Wizard

This interactive tool asks you questions about your IoT project – like how far your devices need to communicate, how long the battery should last, and how much data you need to send – and then recommends the best communication protocols. Think of it like an online quiz that tells you which phone plan is best for your usage, except it recommends IoT wireless technologies instead.

44.3 Prerequisites

Before using this wizard, you should understand:

  • IoT Protocols Overview: Basic understanding of IoT protocol categories
  • Protocol Selector Overview: Introduction to protocol selection concepts

44.4 Step 1: Define Your Application

Start Here

Answer these questions to help the wizard understand your IoT application requirements.

Show code
viewof app_type = Inputs.select(
  [
    "Smart Home / Building Automation",
    "Industrial IoT / Manufacturing",
    "Smart Agriculture / Environment",
    "Healthcare / Wearables",
    "Smart City / Infrastructure",
    "Asset Tracking / Logistics",
    "Energy / Utilities",
    "Retail / Consumer",
    "Transportation / Fleet",
    "Custom / Other"
  ],
  {label: "Application Domain:", value: "Smart Home / Building Automation"}
)

// Number of devices
viewof device_count = Inputs.select(
  [
    "1-10 devices (Prototype)",
    "10-100 devices (Pilot)",
    "100-1,000 devices (Department)",
    "1,000-10,000 devices (Enterprise)",
    "10,000+ devices (Large Scale)"
  ],
  {label: "Expected Device Count:", value: "10-100 devices (Pilot)"}
)

// Device type
viewof device_type = Inputs.select(
  [
    "Sensors only (temperature, humidity, motion)",
    "Actuators only (switches, motors, valves)",
    "Mixed sensors and actuators",
    "Cameras / Video devices",
    "Gateways / Edge devices",
    "Wearables / Mobile devices"
  ],
  {label: "Primary Device Type:", value: "Sensors only (temperature, humidity, motion)"}
)

44.5 Concept Check: Understanding Wizard Scoring


44.6 Step 2: Technical Requirements

Show code
viewof range_need = Inputs.select(
  [
    "< 1 meter (Touch/NFC)",
    "1-10 meters (Room)",
    "10-100 meters (Building)",
    "100m - 1 km (Campus/Site)",
    "1-15 km (City/Region)",
    "15+ km (Wide Area)",
    "Mobile (Vehicle/Person)"
  ],
  {label: "Communication Range:", value: "10-100 meters (Building)"}
)

// Data Rate Requirements
viewof bandwidth_need = Inputs.select(
  [
    "< 100 bytes/day (Heartbeat only)",
    "100 bytes - 10 KB/day (Simple telemetry)",
    "10 KB - 1 MB/day (Rich telemetry)",
    "1 MB - 100 MB/day (Audio/Images)",
    "> 100 MB/day (Video/Streaming)"
  ],
  {label: "Data Volume per Device:", value: "100 bytes - 10 KB/day (Simple telemetry)"}
)
Show code
viewof update_frequency_choice = Inputs.select(
  [
    "Once per day",
    "Hourly",
    "Every 5-15 minutes",
    "Every minute",
    "Every second",
    "Real-time (< 100ms)",
    "Event-driven only"
  ],
  {label: "Update Frequency:", value: "Every 5-15 minutes"}
)

// Latency Tolerance
viewof latency_tolerance_choice = Inputs.select(
  [
    "Real-time critical (< 10 ms)",
    "Interactive (10-100 ms)",
    "Near real-time (100 ms - 1 s)",
    "Tolerant (1-10 seconds)",
    "Delay-tolerant (minutes-hours)"
  ],
  {label: "Latency Tolerance:", value: "Near real-time (100 ms - 1 s)"}
)

44.7 Step 3: Power and Environment

Show code
viewof power_source = Inputs.select(
  [
    "Mains powered (always on)",
    "USB powered",
    "Rechargeable battery (monthly charge)",
    "Replaceable battery (yearly)",
    "Long-life battery (5-10 years)",
    "Energy harvesting (solar/vibration)",
    "Mixed power sources"
  ],
  {label: "Power Source:", value: "Rechargeable battery (monthly charge)"}
)

// Deployment Environment
viewof environment = Inputs.select(
  [
    "Indoor - Office/Home",
    "Indoor - Industrial/Warehouse",
    "Outdoor - Urban",
    "Outdoor - Rural/Agricultural",
    "Underground/Basement",
    "Wet/Harsh environment",
    "Mobile/Vehicle-mounted",
    "Mixed indoor/outdoor"
  ],
  {label: "Deployment Environment:", value: "Indoor - Office/Home"}
)

// Obstacle Density
viewof obstacles = Inputs.select(
  [
    "Clear line of sight",
    "Light obstacles (office furniture)",
    "Moderate obstacles (walls, partitions)",
    "Heavy obstacles (concrete, metal)",
    "Extreme (underground, water)"
  ],
  {label: "Physical Obstacles:", value: "Moderate obstacles (walls, partitions)"}
)

44.7.1 Quick Check: Power and Environment Trade-offs


44.8 Step 4: Business Constraints

Show code
viewof budget = Inputs.select(
  [
    "Minimal (< $5/device)",
    "Low ($5-20/device)",
    "Medium ($20-50/device)",
    "Flexible ($50-100/device)",
    "Enterprise (> $100/device)"
  ],
  {label: "Hardware Budget per Device:", value: "Low ($5-20/device)"}
)

// Recurring Costs
viewof recurring_ok = Inputs.select(
  [
    "No recurring costs acceptable",
    "Minimal ($0.10-1/device/month)",
    "Moderate ($1-5/device/month)",
    "Flexible (cost justified by value)"
  ],
  {label: "Recurring Connectivity Costs:", value: "Minimal ($0.10-1/device/month)"}
)

// Infrastructure
viewof infrastructure = Inputs.select(
  [
    "No existing infrastructure",
    "Wi-Fi network available",
    "Cellular coverage available",
    "Existing IoT gateway(s)",
    "Full data center/cloud setup"
  ],
  {label: "Infra setup:", value: "Wi-Fi network available"}
)

// Security Requirements
viewof security_level = Inputs.select(
  [
    "Basic (hobbyist/prototype)",
    "Standard (consumer IoT)",
    "Enhanced (enterprise IoT)",
    "High (healthcare/financial)",
    "Critical (industrial/government)"
  ],
  {label: "Security Requirements:", value: "Standard (consumer IoT)"}
)

44.9 Step 5: Additional Considerations

Show code
viewof interop = Inputs.select(
  [
    "Standalone system (single vendor OK)",
    "Some interoperability needed",
    "Multi-vendor ecosystem required",
    "Standards compliance mandatory"
  ],
  {label: "Interop:", value: "Some interoperability needed"}
)

// Scalability
viewof scalability = Inputs.select(
  [
    "Fixed deployment (won't grow)",
    "Moderate growth (2-5x in 3 years)",
    "High growth (10x+ in 3 years)",
    "Unknown / Must be flexible"
  ],
  {label: "Scalability Requirements:", value: "Moderate growth (2-5x in 3 years)"}
)

// Deployment Timeline
viewof timeline = Inputs.select(
  [
    "Prototype (immediate)",
    "Pilot (3-6 months)",
    "Production (6-12 months)",
    "Long-term planning (1+ year)"
  ],
  {label: "Deployment Timeline:", value: "Pilot (3-6 months)"}
)

44.10 Protocol Recommendations

Show code
protocols = [
  {
    name: "Bluetooth LE (BLE)",
    category: "Short-range",
    range_m: [1, 100],
    data_rate_kbps: [125, 2000],
    power: "ultra-low",
    latency_ms: [3, 50],
    cost_hw: 3,
    cost_recurring: 0,
    security: "AES-128",
    topology: ["Point-to-point", "Star", "Mesh (BLE 5)"],
    standards: ["Bluetooth SIG"],
    strengths: ["Ubiquitous smartphone support", "Low power", "Mesh capability (5.0+)"],
    weaknesses: ["Limited range", "Interference in 2.4GHz"],
    best_for: ["Wearables", "Smart home", "Beacons", "Health monitoring"]
  },
  {
    name: "Wi-Fi (802.11)",
    category: "Short-range",
    range_m: [10, 100],
    data_rate_kbps: [11000, 1000000],
    power: "high",
    latency_ms: [1, 10],
    cost_hw: 5,
    cost_recurring: 0,
    security: "WPA3",
    topology: ["Star", "Mesh"],
    standards: ["IEEE 802.11"],
    strengths: ["High bandwidth", "Ubiquitous infrastructure", "IP-native"],
    weaknesses: ["High power consumption", "Not ideal for battery devices"],
    best_for: ["Cameras", "Smart displays", "Gateways", "High-bandwidth sensors"]
  },
  {
    name: "Wi-Fi HaLow (802.11ah)",
    category: "Short-range",
    range_m: [100, 1000],
    data_rate_kbps: [150, 86700],
    power: "medium",
    latency_ms: [10, 100],
    cost_hw: 8,
    cost_recurring: 0,
    security: "WPA3",
    topology: ["Star"],
    standards: ["IEEE 802.11ah"],
    strengths: ["Extended range Wi-Fi", "Better penetration (sub-GHz)", "IP-native"],
    weaknesses: ["Limited availability", "Higher cost than standard Wi-Fi"],
    best_for: ["Smart buildings", "Industrial sensors", "Outdoor IoT"]
  },
  {
    name: "Zigbee",
    category: "Short-range mesh",
    range_m: [10, 100],
    data_rate_kbps: [20, 250],
    power: "low",
    latency_ms: [15, 100],
    cost_hw: 4,
    cost_recurring: 0,
    security: "AES-128",
    topology: ["Mesh", "Star", "Tree"],
    standards: ["IEEE 802.15.4", "Zigbee Alliance"],
    strengths: ["Self-healing mesh", "Low power", "Large networks (65K nodes)"],
    weaknesses: ["Not IP-native", "Gateway required", "2.4GHz interference"],
    best_for: ["Smart home", "Building automation", "Industrial sensors"]
  },
  {
    name: "Thread",
    category: "Short-range mesh",
    range_m: [10, 100],
    data_rate_kbps: [20, 250],
    power: "low",
    latency_ms: [10, 100],
    cost_hw: 5,
    cost_recurring: 0,
    security: "AES-128, DTLS",
    topology: ["Mesh"],
    standards: ["IEEE 802.15.4", "Thread Group", "Matter"],
    strengths: ["IP-native (IPv6)", "Self-healing mesh", "Matter compatible"],
    weaknesses: ["Newer ecosystem", "Limited legacy support"],
    best_for: ["Smart home (Matter)", "Building automation", "Consumer IoT"]
  },
  {
    name: "Z-Wave",
    category: "Short-range mesh",
    range_m: [30, 100],
    data_rate_kbps: [9.6, 100],
    power: "low",
    latency_ms: [50, 200],
    cost_hw: 8,
    cost_recurring: 0,
    security: "AES-128 (S2)",
    topology: ["Mesh"],
    standards: ["Z-Wave Alliance", "ITU-T G.9959"],
    strengths: ["Sub-GHz (less interference)", "Strong smart home ecosystem"],
    weaknesses: ["Proprietary", "Lower data rate", "Regional frequencies"],
    best_for: ["Smart home", "Security systems", "HVAC control"]
  },
  {
    name: "LoRaWAN",
    category: "LPWAN",
    range_m: [2000, 15000],
    data_rate_kbps: [0.3, 50],
    power: "ultra-low",
    latency_ms: [1000, 10000],
    cost_hw: 10,
    cost_recurring: 0.5,
    security: "AES-128 (E2E)",
    topology: ["Star-of-stars"],
    standards: ["LoRa Alliance"],
    strengths: ["Excellent range", "Very low power", "Open ecosystem"],
    weaknesses: ["Low bandwidth", "High latency", "Duty cycle limits"],
    best_for: ["Smart agriculture", "Asset tracking", "Smart cities", "Utilities"]
  },
  {
    name: "Sigfox",
    category: "LPWAN",
    range_m: [3000, 50000],
    data_rate_kbps: [0.1, 0.6],
    power: "ultra-low",
    latency_ms: [2000, 30000],
    cost_hw: 5,
    cost_recurring: 1,
    security: "AES-128",
    topology: ["Star"],
    standards: ["Sigfox (proprietary)"],
    strengths: ["Extreme range", "Ultra-low power", "Simple protocol"],
    weaknesses: ["Very limited bandwidth", "Operator dependent", "Downlink limited"],
    best_for: ["Simple telemetry", "Asset tracking", "Smoke detectors"]
  },
  {
    name: "NB-IoT",
    category: "Cellular LPWAN",
    range_m: [1000, 35000],
    data_rate_kbps: [20, 250],
    power: "low",
    latency_ms: [1500, 10000],
    cost_hw: 15,
    cost_recurring: 2,
    security: "LTE security",
    topology: ["Star"],
    standards: ["3GPP Release 13+"],
    strengths: ["Carrier infrastructure", "Deep coverage", "Secure"],
    weaknesses: ["Subscription costs", "Latency", "Power for mobility"],
    best_for: ["Smart meters", "Asset tracking", "Remote monitoring"]
  },
  {
    name: "LTE-M (Cat-M1)",
    category: "Cellular LPWAN",
    range_m: [1000, 35000],
    data_rate_kbps: [375, 1000],
    power: "medium",
    latency_ms: [10, 100],
    cost_hw: 20,
    cost_recurring: 3,
    security: "LTE security",
    topology: ["Star"],
    standards: ["3GPP Release 13+"],
    strengths: ["Voice support", "Mobility support", "Higher bandwidth than NB-IoT"],
    weaknesses: ["Higher power than NB-IoT", "Subscription costs"],
    best_for: ["Wearables", "Fleet tracking", "Connected health"]
  },
  {
    name: "5G NR (IoT)",
    category: "Cellular",
    range_m: [100, 10000],
    data_rate_kbps: [1000, 10000000],
    power: "high",
    latency_ms: [1, 10],
    cost_hw: 50,
    cost_recurring: 10,
    security: "5G security",
    topology: ["Star"],
    standards: ["3GPP Release 15+"],
    strengths: ["Ultra-low latency", "Massive capacity", "Network slicing"],
    weaknesses: ["High power", "High cost", "Limited coverage currently"],
    best_for: ["Industrial automation", "Autonomous vehicles", "AR/VR"]
  },
  {
    name: "NFC",
    category: "Very short-range",
    range_m: [0, 0.1],
    data_rate_kbps: [106, 424],
    power: "ultra-low",
    latency_ms: [1, 10],
    cost_hw: 1,
    cost_recurring: 0,
    security: "Secure Element",
    topology: ["Point-to-point"],
    standards: ["ISO 14443", "ISO 18092"],
    strengths: ["Instant connection", "No pairing needed", "Very low power"],
    weaknesses: ["Touch range only", "Low bandwidth"],
    best_for: ["Payments", "Access control", "Device pairing", "Tags"]
  },
  {
    name: "RFID (UHF)",
    category: "Very short-range",
    range_m: [0, 12],
    data_rate_kbps: [40, 640],
    power: "passive",
    latency_ms: [1, 50],
    cost_hw: 0.1,
    cost_recurring: 0,
    security: "Basic",
    topology: ["Star"],
    standards: ["EPC Gen2", "ISO 18000-6C"],
    strengths: ["No battery needed", "Very cheap tags", "Bulk reading"],
    weaknesses: ["Reader infrastructure needed", "Limited security"],
    best_for: ["Inventory tracking", "Supply chain", "Access control"]
  },
  {
    name: "Ethernet",
    category: "Wired",
    range_m: [0, 100],
    data_rate_kbps: [10000, 10000000],
    power: "N/A (wired)",
    latency_ms: [0.1, 1],
    cost_hw: 5,
    cost_recurring: 0,
    security: "MACsec, TLS",
    topology: ["Star", "Bus"],
    standards: ["IEEE 802.3"],
    strengths: ["Reliable", "High bandwidth", "Low latency", "PoE available"],
    weaknesses: ["Wiring required", "Not mobile"],
    best_for: ["Industrial", "Building backbone", "Gateways", "Cameras"]
  }
];

// Scoring algorithm
function scoreProtocol(protocol, requirements) {
  let score = 50; // Base score
  let reasons = [];
  let warnings = [];

  // Range scoring
  const rangeNeed = requirements.range;
  const [minRange, maxRange] = protocol.range_m;

  if (rangeNeed <= maxRange && rangeNeed >= minRange * 0.5) {
    score += 15;
    reasons.push(`Range ${minRange}-${maxRange}m fits your ${rangeNeed}m need`);
  } else if (rangeNeed > maxRange) {
    score -= 25;
    warnings.push(`Max range ${maxRange}m may be insufficient for ${rangeNeed}m`);
  } else if (rangeNeed < minRange * 0.3) {
    score -= 5;
    warnings.push(`Overkill for ${rangeNeed}m (min range ${minRange}m)`);
  }

  // Power scoring
  if (requirements.powerCritical) {
    if (protocol.power === "ultra-low" || protocol.power === "passive") {
      score += 20;
      reasons.push("Excellent battery life");
    } else if (protocol.power === "low") {
      score += 10;
      reasons.push("Good battery life");
    } else if (protocol.power === "high") {
      score -= 20;
      warnings.push("High power consumption - not ideal for battery");
    }
  }

  // Bandwidth scoring
  const [minBw, maxBw] = protocol.data_rate_kbps;
  if (requirements.bandwidth <= maxBw && requirements.bandwidth >= minBw * 0.1) {
    score += 10;
    reasons.push(`Bandwidth ${minBw}-${maxBw} kbps suitable`);
  } else if (requirements.bandwidth > maxBw) {
    score -= 30;
    warnings.push(`Max ${maxBw} kbps insufficient for ${requirements.bandwidth} kbps need`);
  }

  // Latency scoring
  const [minLat, maxLat] = protocol.latency_ms;
  if (requirements.latency >= maxLat) {
    score += 10;
    reasons.push("Latency acceptable");
  } else if (requirements.latency < minLat) {
    score -= 20;
    warnings.push(`Min latency ${minLat}ms exceeds ${requirements.latency}ms requirement`);
  }

  // Cost scoring
  if (requirements.lowCost) {
    if (protocol.cost_hw <= 5 && protocol.cost_recurring <= 0.5) {
      score += 10;
      reasons.push("Cost-effective option");
    } else if (protocol.cost_hw > 20 || protocol.cost_recurring > 3) {
      score -= 10;
      warnings.push("Higher cost solution");
    }
  }

  // Infrastructure scoring
  if (requirements.hasWifi && protocol.name.includes("Wi-Fi")) {
    score += 10;
    reasons.push("Leverages existing Wi-Fi infrastructure");
  }
  if (requirements.hasCellular && protocol.category.includes("Cellular")) {
    score += 10;
    reasons.push("Uses available cellular coverage");
  }

  // Security scoring
  if (requirements.highSecurity) {
    if (protocol.security.includes("AES") || protocol.security.includes("TLS") || protocol.security.includes("LTE")) {
      score += 10;
      reasons.push(`Strong security: ${protocol.security}`);
    }
  }

  // Scalability scoring
  if (requirements.highScale) {
    if (protocol.topology.includes("Mesh") || protocol.category.includes("LPWAN") || protocol.category.includes("Cellular")) {
      score += 10;
      reasons.push("Good scalability");
    }
  }

  // Indoor/Outdoor scoring
  if (requirements.outdoor && protocol.category.includes("LPWAN")) {
    score += 10;
    reasons.push("Excellent outdoor penetration");
  }
  if (requirements.indoor && (protocol.name === "Zigbee" || protocol.name === "Thread" || protocol.name.includes("Wi-Fi"))) {
    score += 5;
    reasons.push("Good indoor coverage");
  }

  return {
    ...protocol,
    score: Math.max(0, Math.min(100, score)),
    reasons: reasons,
    warnings: warnings
  };
}

// Parse requirements from form inputs
requirements = (() => {
  // Range parsing
  let range = 50; // default
  if (range_need.includes("< 1 meter")) range = 0.5;
  else if (range_need.includes("1-10 meters")) range = 10;
  else if (range_need.includes("10-100 meters")) range = 100;
  else if (range_need.includes("100m - 1 km")) range = 500;
  else if (range_need.includes("1-15 km")) range = 10000;
  else if (range_need.includes("15+ km")) range = 30000;
  else if (range_need.includes("Mobile")) range = 5000;

  // Bandwidth parsing
  let bandwidth = 10; // kbps default
  if (bandwidth_need.includes("< 100 bytes")) bandwidth = 0.01;
  else if (bandwidth_need.includes("10 KB")) bandwidth = 1;
  else if (bandwidth_need.includes("1 MB")) bandwidth = 100;
  else if (bandwidth_need.includes("100 MB")) bandwidth = 10000;
  else if (bandwidth_need.includes("> 100 MB")) bandwidth = 100000;

  // Latency parsing
  let latency = 1000; // ms default
  if (latency_tolerance_choice.includes("< 10 ms")) latency = 10;
  else if (latency_tolerance_choice.includes("10-100 ms")) latency = 100;
  else if (latency_tolerance_choice.includes("100 ms - 1 s")) latency = 1000;
  else if (latency_tolerance_choice.includes("1-10 seconds")) latency = 10000;
  else if (latency_tolerance_choice.includes("minutes-hours")) latency = 100000;

  // Power critical?
  let powerCritical = power_source.includes("years") || power_source.includes("5-10") || power_source.includes("harvesting");

  // Low cost?
  let lowCost = budget.includes("Minimal") || budget.includes("Low");

  // Infrastructure
  let hasWifi = infrastructure.includes("Wi-Fi");
  let hasCellular = infrastructure.includes("Cellular");

  // Security
  let highSecurity = security_level.includes("High") || security_level.includes("Critical");

  // Scalability
  let highScale = device_count.includes("1,000") || device_count.includes("10,000");

  // Environment
  let outdoor = environment.includes("Outdoor") || environment.includes("Agricultural") || environment.includes("Urban");
  let indoor = environment.includes("Indoor") || environment.includes("Office");

  return {
    range, bandwidth, latency, powerCritical, lowCost,
    hasWifi, hasCellular, highSecurity, highScale, outdoor, indoor
  };
})()

// Score all protocols
scored_protocols = protocols.map(p => scoreProtocol(p, requirements))
                            .sort((a, b) => b.score - a.score);

// Top recommendations
top_recommendations = scored_protocols.slice(0, 4);

44.10.1 Your Recommended Protocols

Show code
html`
<div style="background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); padding: 25px; border-radius: 12px; margin: 20px 0; border: 2px solid #16A085;">
  <h3 style="color: #16A085; margin-top: 0; display: flex; align-items: center; gap: 10px;">
    <span style="font-size: 1.5em;">&#127919;</span> Top Protocol Recommendations
  </h3>
  <p style="color: #2C3E50; margin-bottom: 20px;">Based on your requirements, here are the best-fit protocols:</p>

  ${top_recommendations.map((p, i) => html`
    <div style="background: white; padding: 20px; margin: 15px 0; border-radius: 10px;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
                border-left: 5px solid ${i === 0 ? '#16A085' : i === 1 ? '#2C3E50' : i === 2 ? '#E67E22' : '#7F8C8D'};">
      <div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;">
        <h4 style="margin: 0; color: #2C3E50; font-size: 1.2em;">
          ${i === 0 ? '&#129351;' : i === 1 ? '&#129352;' : i === 2 ? '&#129353;' : '&#128204;'} ${p.name}
        </h4>
        <div style="display: flex; align-items: center; gap: 10px;">
          <span style="background: ${p.score >= 70 ? '#16A085' : p.score >= 50 ? '#E67E22' : '#E74C3C'};
                       color: white; padding: 5px 15px; border-radius: 20px; font-weight: bold;">
            Score: ${Math.round(p.score)}%
          </span>
          <span style="background: #2C3E50; color: white; padding: 5px 12px; border-radius: 15px; font-size: 0.85em;">
            ${p.category}
          </span>
        </div>
      </div>

      <div style="margin-top: 15px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px;">
        <div style="background: #f8f9fa; padding: 10px; border-radius: 5px;">
          <strong style="color: #16A085;">&#128225; Range:</strong> ${p.range_m[0]}-${p.range_m[1]}m
        </div>
        <div style="background: #f8f9fa; padding: 10px; border-radius: 5px;">
          <strong style="color: #16A085;">&#128202; Data Rate:</strong> ${p.data_rate_kbps[0] >= 1000 ? (p.data_rate_kbps[0]/1000) + '-' + (p.data_rate_kbps[1]/1000) + ' Mbps' : p.data_rate_kbps[0] + '-' + p.data_rate_kbps[1] + ' kbps'}
        </div>
        <div style="background: #f8f9fa; padding: 10px; border-radius: 5px;">
          <strong style="color: #16A085;">&#9889; Power:</strong> ${p.power}
        </div>
        <div style="background: #f8f9fa; padding: 10px; border-radius: 5px;">
          <strong style="color: #16A085;">&#9201; Latency:</strong> ${p.latency_ms[0]}-${p.latency_ms[1]}ms
        </div>
      </div>

      ${p.reasons.length > 0 ? html`
        <div style="margin-top: 12px;">
          <strong style="color: #27AE60;">&#10003; Why it fits:</strong>
          <ul style="margin: 5px 0; padding-left: 20px; color: #27AE60;">
            ${p.reasons.map(r => html`<li style="margin: 3px 0;">${r}</li>`)}
          </ul>
        </div>
      ` : ''}

      ${p.warnings.length > 0 ? html`
        <div style="margin-top: 8px;">
          <strong style="color: #E67E22;">&#9888; Considerations:</strong>
          <ul style="margin: 5px 0; padding-left: 20px; color: #E67E22;">
            ${p.warnings.map(w => html`<li style="margin: 3px 0;">${w}</li>`)}
          </ul>
        </div>
      ` : ''}

      <div style="margin-top: 12px; padding-top: 12px; border-top: 1px solid #eee;">
        <strong>Best for:</strong> ${p.best_for.join(', ')}
      </div>
    </div>
  `)}
</div>
`

44.11 Detailed Comparison

Show code
html`
<div style="background: #f8f9fa; padding: 20px; border-radius: 10px; margin: 20px 0;">
  <h4 style="margin-top: 0; color: #2C3E50;">&#128202; Side-by-Side Comparison</h4>
  <div style="overflow-x: auto;">
    <table style="width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden;">
      <thead>
        <tr style="background: #2C3E50; color: white;">
          <th style="padding: 12px; text-align: left;">Protocol</th>
          <th style="padding: 12px; text-align: center;">Score</th>
          <th style="padding: 12px; text-align: center;">Range</th>
          <th style="padding: 12px; text-align: center;">Data Rate</th>
          <th style="padding: 12px; text-align: center;">Power</th>
          <th style="padding: 12px; text-align: center;">Latency</th>
          <th style="padding: 12px; text-align: center;">HW Cost</th>
          <th style="padding: 12px; text-align: center;">Monthly Cost</th>
        </tr>
      </thead>
      <tbody>
        ${top_recommendations.map((p, i) => html`
          <tr style="background: ${i % 2 === 0 ? '#f8f9fa' : 'white'}; border-bottom: 1px solid #eee;">
            <td style="padding: 12px; font-weight: bold; color: #2C3E50;">
              ${i === 0 ? '&#129351;' : i === 1 ? '&#129352;' : i === 2 ? '&#129353;' : ''} ${p.name}
            </td>
            <td style="padding: 12px; text-align: center;">
              <span style="background: ${p.score >= 70 ? '#e8f5f1' : p.score >= 50 ? '#fef5e7' : '#fadbd8'};
                           padding: 3px 10px; border-radius: 12px; font-weight: bold;
                           color: ${p.score >= 70 ? '#16A085' : p.score >= 50 ? '#E67E22' : '#E74C3C'};">
                ${Math.round(p.score)}%
              </span>
            </td>
            <td style="padding: 12px; text-align: center;">${p.range_m[1] >= 1000 ? (p.range_m[1]/1000) + 'km' : p.range_m[1] + 'm'}</td>
            <td style="padding: 12px; text-align: center;">${p.data_rate_kbps[1] >= 1000 ? Math.round(p.data_rate_kbps[1]/1000) + ' Mbps' : p.data_rate_kbps[1] + ' kbps'}</td>
            <td style="padding: 12px; text-align: center;">
              <span style="background: ${p.power === 'ultra-low' || p.power === 'passive' ? '#e8f5f1' : p.power === 'low' ? '#fef5e7' : '#fadbd8'};
                           padding: 3px 8px; border-radius: 10px; font-size: 0.85em;">
                ${p.power}
              </span>
            </td>
            <td style="padding: 12px; text-align: center;">${p.latency_ms[1] >= 1000 ? (p.latency_ms[1]/1000) + 's' : p.latency_ms[1] + 'ms'}</td>
            <td style="padding: 12px; text-align: center;">$${p.cost_hw}</td>
            <td style="padding: 12px; text-align: center;">${p.cost_recurring > 0 ? '$' + p.cost_recurring : 'Free'}</td>
          </tr>
        `)}
      </tbody>
    </table>
  </div>
</div>
`

44.12 Your Requirements Summary

Show code
html`
<div style="background: #f8f9fa; padding: 20px; border-radius: 10px; margin: 20px 0; border: 1px solid #16A085;">
  <h4 style="margin-top: 0; color: #16A085;">&#128203; Selected Requirements</h4>
  <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px;">
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Application:</strong> ${app_type}
    </div>
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Devices:</strong> ${device_count}
    </div>
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Range:</strong> ${range_need}
    </div>
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Data Volume:</strong> ${bandwidth_need}
    </div>
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Update Frequency:</strong> ${update_frequency_choice}
    </div>
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Latency:</strong> ${latency_tolerance_choice}
    </div>
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Power:</strong> ${power_source}
    </div>
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Environment:</strong> ${environment}
    </div>
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Budget:</strong> ${budget}
    </div>
    <div style="background: white; padding: 12px; border-radius: 8px;">
      <strong>Security:</strong> ${security_level}
    </div>
  </div>
</div>
`

44.13 Protocol Deep Dives

Learn more about each recommended protocol in these detailed chapters:

Protocol Chapter Key Topics
Bluetooth LE BLE Fundamentals GATT, advertising, mesh, beacons
Wi-Fi Wi-Fi Fundamentals 802.11 standards, security, mesh
Zigbee Zigbee Fundamentals Profiles, mesh routing, clusters
Thread Thread Fundamentals Border router, IPv6, Matter
LoRaWAN LoRaWAN Overview Spreading factors, classes, gateways
NB-IoT NB-IoT Fundamentals Coverage, power saving, deployments
LTE-M Cellular IoT Mobility, voice, comparison

44.14 Decision Framework: When to Override the Wizard’s Top Recommendation

Decision Framework: Choosing Protocol #2 or #3 Instead of #1

The wizard scores protocols mathematically, but real-world constraints may favor the 2nd or 3rd recommendation. Use this framework to know when to override the top-scored protocol.

Override Trigger Table:

Situation Top-Ranked Protocol Consider Instead Why Override
Regulatory/Frequency LoRaWAN (unlicensed ISM band) NB-IoT (licensed spectrum) Country blocks ISM band usage or requires carrier-grade compliance
Existing Infrastructure NB-IoT Wi-Fi or Ethernet Building already has complete Wi-Fi coverage; NB-IoT adds unnecessary cellular subscription costs
Vendor Lock-In Risk Proprietary protocol Standards-based protocol Company policy mandates open standards; Sigfox scores high but single-vendor risk is unacceptable
Skill Gap Complex protocol (Thread, 5G) Simpler option (BLE, Wi-Fi) Team lacks expertise; faster to deploy familiar technology than learn complex protocol
Supply Chain Optimal chip unavailable Second-best with readily available chips Global chip shortage; #1-ranked protocol has 52-week lead time, #2 is in-stock
Interoperability Best technical fit Industry-standard protocol Healthcare IoT mandates HL7 FHIR over MQTT despite MQTT scoring higher technically

Real-World Override Example:

Scenario: Smart agriculture deployment in rural India - Wizard recommendation #1: LoRaWAN (98/100 score) - Range: Excellent (15 km) - Power: Ultra-low (10-year battery) - Cost: Low (no recurring fees) - Wizard recommendation #2: NB-IoT (87/100 score) - Range: Excellent (35 km) - Power: Good (5-year battery with PSM) - Cost: Medium ($2/device/month)

Decision: Deploy NB-IoT (#2) despite lower score

Reasons for Override:

  1. Regulatory: India’s Department of Telecom requires cellular for agricultural IoT to ensure government can monitor crop data (policy constraint)
  2. Infrastructure: Telecom operators already deployed NB-IoT nationwide; LoRaWAN requires deploying private gateways (capital expenditure)
  3. Support: Carrier provides SLA and technical support; farmer cooperatives cannot maintain LoRaWAN gateways
  4. Subsidy: Government subsidizes NB-IoT connectivity for agriculture at $0.20/month (reduces cost gap)

Net result: NB-IoT’s real cost = $0.20/mo, with zero deployment effort and carrier-grade reliability. LoRaWAN’s theoretical advantages disappear when external constraints are factored in.

Override Decision Checklist:

Before choosing #2 or #3, verify: - [ ] Technical gap is acceptable: #2 meets minimum requirements (not just “slightly worse”) - [ ] Override reason is non-negotiable: Regulatory/contractual mandate, not just preference - [ ] Long-term cost is justified: Factor in 5-year total cost of ownership (TCO), not just upfront - [ ] Fallback exists: If #2 fails to meet needs, can you pivot to #1 without complete redesign?

When NOT to Override:

Reason Why It’s Insufficient
“We already use Protocol X for other projects” Technology comfort ≠ optimal solution; evaluate if learning cost justifies better outcome
“Protocol Y is newer/cooler” Maturity matters; bleeding-edge protocols lack ecosystem, drivers, and field-proven reliability
“Vendor gave us free dev kits for Protocol Z” $500 in free hardware vs. $50,000 in recurring costs over 5 years is poor economics
“My boss prefers Protocol W” Use wizard data to build business case; educate stakeholders on trade-offs

Key Learning: The wizard provides technical optimization. Overrides should be driven by business, regulatory, or ecosystem constraints that the algorithm cannot model. Document override rationale to justify the decision when deployments scale.


44.15 Knowledge Check: Protocol Categories and Selection Dimensions

Match each IoT protocol to its primary category and use-case strength:

Place the following steps of the wizard’s protocol scoring process in the correct order:


44.16 Concept Relationships

The wizard automates protocol selection methodology through interactive scoring:

Related Concept Connection Chapter Link
Decision Frameworks Wizard implements decision tree logic algorithmically Decision Frameworks
Systematic Selection Wizard automates the step-by-step elimination process Systematic Selection
Protocol Matching Game Game tests knowledge; wizard applies it to real projects Matching Game
Engineering Trade-offs Scoring algorithm encodes physics-based constraints The Challenge
Anti-Patterns Warnings flag violations of anti-pattern rules Anti-Patterns
Real-World Scenarios Wizard inputs mirror scenario requirement patterns Selection Scenarios
Protocol Specifications Wizard database contains official protocol specs IoT Protocols Overview

Common Pitfalls

1. Prioritizing Theory Over Measurement in Protocol Selection Wizard

Relying on theoretical models without profiling actual behavior leads to designs that miss performance targets by 2-10×. Always measure the dominant bottleneck in your specific deployment environment — hardware variability, interference, and load patterns routinely differ from textbook assumptions.

2. Ignoring System-Level Trade-offs

Optimizing one parameter in isolation (latency, throughput, energy) without considering impact on others creates systems that excel on benchmarks but fail in production. Document the top three trade-offs before finalizing any design decision and verify with realistic workloads.

3. Skipping Failure Mode Analysis

Most field failures come from edge cases that work in the lab: intermittent connectivity, partial node failure, clock drift, and buffer overflow under peak load. Explicitly design and test failure handling before deployment — retrofitting error recovery after deployment costs 5-10× more than building it in.

🏷️ Label the Diagram

Code Challenge

44.17 Summary

This interactive wizard helps you systematically evaluate IoT protocol options:

  • 14 protocols analyzed across short-range, LPWAN, cellular, and wired categories
  • Multi-factor scoring considers range, power, bandwidth, latency, cost, and security
  • Personalized recommendations based on your specific requirements
  • Side-by-side comparison for informed decision-making
Key Takeaways
  1. No “best” protocol exists - only best fit for your requirements
  2. Trade-offs are inevitable - long range usually means lower bandwidth
  3. Start with constraints - power and range typically narrow options quickly
  4. Consider total cost - include infrastructure, recurring fees, and maintenance
  5. Plan for scale - choose protocols that grow with your deployment
For Kids: Meet the Sensor Squad!

Max the Microcontroller built a Protocol Selection Machine – you feed in your requirements and it spits out the perfect protocol!

Sammy the Sensor went first: “I measure temperature once per hour, I’m in a farm field 5km from the barn, and I need to last 5 years on a coin battery!”

Max’s machine whirred and clicked: “Range = LONG, Data = TINY, Power = ULTRA-LOW, Latency = DON’T CARE… LoRaWAN scores 95/100! Runner-up: Sigfox at 88.”

Lila the LED tried next: “I control 200 smart light bulbs in a building. They need instant response and mesh networking!”

The machine beeped: “Range = SHORT, Mesh = YES, Latency = LOW… Thread scores 97/100! Runner-up: Zigbee at 92.”

Bella the Battery whispered: “The secret is that every project has different needs, so the machine gives different answers every time. There’s no ‘one size fits all’ in IoT!”

44.18 See Also

Interactive Learning Tools:

  • Decision Frameworks - Visual flowcharts and matrices for quick decisions
  • Protocol Matching Game - Test knowledge with 24 real-world scenarios
  • Protocol Selector Overview - Main wizard hub and introduction

Protocol Selection Series:

  • Protocol Selection Framework - Overview and systematic methodology
  • Systematic Selection - Step-by-step elimination process
  • Anti-Patterns - Common mistakes and how to avoid them
  • Selection Scenarios - Real-world case studies with TCO analysis

Protocol Deep Dives (from wizard recommendations):

  • LoRaWAN Overview - Long-range low-power networking
  • Bluetooth LE Fundamentals - BLE for wearables
  • Cellular IoT - NB-IoT and LTE-M specifications
  • Zigbee Architecture - Mesh networking for smart home
  • Thread and Matter - IP-native mesh for interoperability

44.19 What’s Next

Chapter Focus Why Read Next
Decision Frameworks Visual flowcharts and decision matrices Apply quick visual methods alongside the wizard’s algorithmic scoring
Protocol Matching Game 24 real-world scenario challenges Test whether you can predict wizard recommendations before running them
Systematic Selection Step-by-step elimination process Deepen the manual methodology that the wizard automates
Anti-Patterns Common protocol selection mistakes Recognize pitfalls the wizard’s warnings flag automatically
Architecture Planner Complete IoT system design Extend protocol choice into full architecture decisions
Protocol Selector Overview Main wizard hub and introduction Return to the protocol selection landing page
43  Protocol Decision Frameworks
45  Protocol Matching Game