798  Wireless Network Access: Wi-Fi for IoT

NoteLearning Objectives

By the end of this section, you will be able to:

  • Understand the evolution of IEEE 802.11 Wi-Fi protocols
  • Compare Wi-Fi standards (802.11 a/b/g/n/ac/ax) for IoT applications
  • Evaluate IoT-specific Wi-Fi standards: Wi-Fi HaLow (802.11ah) and Wi-Fi 6 (802.11ax)
  • Understand OFDMA and Target Wake Time (TWT) for IoT optimization
  • Select appropriate Wi-Fi standards for different IoT deployment scenarios

798.1 Prerequisites

Before diving into this chapter, you should be familiar with:

Wi-Fi is how devices connect to the internet wirelessly - like invisible cables made of radio waves! When your phone connects to your home router without a cable, that’s Wi-Fi.

Wi-Fi uses radio frequencies (like a radio station) to send data through the air. The 2.4 GHz frequency travels farther through walls but is slower and more crowded. The 5 GHz frequency is faster but doesn’t travel as far.

Term Simple Explanation
Wi-Fi Wireless connection using radio waves (no cables needed)
Access Point (AP) The device that creates the Wi-Fi network (often built into router)
2.4 GHz Radio frequency that travels far but is slow and crowded
5 GHz Radio frequency that’s fast but doesn’t go through walls well
SSID The name of a Wi-Fi network (like “Home_WiFi”)
RSSI Signal strength - how strong the Wi-Fi signal is

798.2 IEEE 802.11 Wi-Fi Overview

Time: ~10 min | Difficulty: Intermediate | Reference: P07.C11.U03

IEEE 802.11, commonly known as Wi-Fi, is a protocol replacing wired Ethernet for wireless communications. It uses the unlicensed radio band for data transmission.

In a Wi-Fi network, the Wireless Access Point (WAP) is responsible for translating digital signals from the wired network to radio signals, and vice versa, for communications between mobile devices in the WAP range and the Internet.

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#16A085', 'tertiaryColor': '#E8F6F3', 'clusterBkg': '#E8F6F3', 'clusterBorder': '#16A085', 'fontSize': '12px'}}}%%
timeline
    title Wi-Fi Evolution (IEEE 802.11)
    1997 : 802.11 Legacy : 2 Mbps
    1999 : 802.11b : 11 Mbps (2.4 GHz)
    2003 : 802.11g : 54 Mbps (2.4 GHz)
    2009 : 802.11n (Wi-Fi 4) : 600 Mbps (2.4/5 GHz)
    2013 : 802.11ac (Wi-Fi 5) : 6.9 Gbps (5 GHz)
    2016 : 802.11ah (HaLow) : 347 Mbps (Sub-1GHz, IoT)
    2018 : 802.11ax (Wi-Fi 6) : 9.6 Gbps (2.4/5 GHz, IoT-optimized)
    2024 : 802.11be (Wi-Fi 7) : 46 Gbps (6 GHz)

Figure 798.1: Wi-Fi evolution timeline from 802.11 Legacy to Wi-Fi 7

798.3 Wi-Fi Protocol Comparison

Standard Year Frequency Max Speed Range IoT Suitability
802.11b 1999 2.4 GHz 11 Mbps ~100m Low (legacy)
802.11g 2003 2.4 GHz 54 Mbps ~100m Medium
802.11n 2009 2.4/5 GHz 600 Mbps ~200m Good
802.11ac 2013 5 GHz 6.9 Gbps ~100m Good (high bandwidth)
802.11ah 2016 Sub-1 GHz 347 Mbps ~1 km Excellent (low power)
802.11ax 2018 2.4/5 GHz 9.6 Gbps ~200m Excellent (dense)

798.4 IoT-Specific Wi-Fi Standards

The 802.11ah (Wi-Fi HaLow) and 802.11ax (Wi-Fi 6) protocols specifically address shortcomings in IoT-constrained environments.

798.4.1 802.11ah (Wi-Fi HaLow)

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#16A085', 'tertiaryColor': '#E8F6F3', 'fontSize': '12px'}}}%%
graph TB
    subgraph HALOW["Wi-Fi HaLow (802.11ah)"]
        F1["Sub-1 GHz Operation<br/>Better wall penetration"]
        F2["Up to 1 km Range<br/>vs 100m traditional Wi-Fi"]
        F3["8,191 Devices/AP<br/>Massive IoT scale"]
        F4["Lower Power<br/>Battery-friendly"]
    end

    subgraph APPS["Use Cases"]
        A1["Smart City Sensors"]
        A2["Agricultural Monitoring"]
        A3["Industrial IoT"]
        A4["Building Automation"]
    end

    HALOW --> APPS

    style HALOW fill:#16A085,stroke:#2C3E50,color:#fff
    style F1 fill:#E8F6F3,stroke:#16A085,color:#000
    style F2 fill:#E8F6F3,stroke:#16A085,color:#000
    style F3 fill:#E8F6F3,stroke:#16A085,color:#000
    style F4 fill:#E8F6F3,stroke:#16A085,color:#000

Figure 798.2: Wi-Fi HaLow features and IoT applications

Key Features: - Operates in sub-1 GHz frequency bands (better penetration through walls and obstacles) - Longer range (up to 1 km vs 100m for traditional Wi-Fi) - Lower power consumption (suitable for battery devices) - Supports large number of devices (up to 8,191 per access point) - Use cases: Smart city sensors, agricultural monitoring, industrial IoT

798.4.2 802.11ax (Wi-Fi 6)

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#16A085', 'tertiaryColor': '#E8F6F3', 'fontSize': '12px'}}}%%
graph TB
    subgraph WIFI6["Wi-Fi 6 (802.11ax)"]
        F1["OFDMA<br/>Multi-device scheduling"]
        F2["Target Wake Time (TWT)<br/>Power savings"]
        F3["Dense Environments<br/>Higher capacity"]
        F4["Lower Latency<br/>8ms vs 30ms"]
    end

    subgraph APPS["Use Cases"]
        A1["Smart Buildings"]
        A2["Dense Sensor Networks"]
        A3["Industrial Automation"]
        A4["Stadiums/Venues"]
    end

    WIFI6 --> APPS

    style WIFI6 fill:#2C3E50,stroke:#16A085,color:#fff
    style F1 fill:#E8F6F3,stroke:#2C3E50,color:#000
    style F2 fill:#E8F6F3,stroke:#2C3E50,color:#000
    style F3 fill:#E8F6F3,stroke:#2C3E50,color:#000
    style F4 fill:#E8F6F3,stroke:#2C3E50,color:#000

Figure 798.3: Wi-Fi 6 features and IoT applications

Key Features: - OFDMA (Orthogonal Frequency Division Multiple Access) for better multi-device handling - Target Wake Time (TWT) for power savings - devices sleep longer, wake only when needed - Higher capacity in dense environments (stadiums, offices, warehouses) - Lower latency (8ms typical vs 30ms for Wi-Fi 5) - Use cases: Smart buildings, dense sensor deployments, industrial automation

TipMVU: Target Wake Time (TWT)

Core Concept: TWT allows IoT devices to negotiate specific wake-up times with the access point, sleeping for extended periods rather than constantly listening for beacons - reducing power consumption by up to 90% for infrequent data transmission.

Why It Matters: Traditional Wi-Fi devices wake every 100ms to check for data, consuming significant power even when idle. TWT lets a sensor wake once per minute (or less), dramatically extending battery life from days to months.

Key Takeaway: When deploying battery-powered Wi-Fi sensors, require Wi-Fi 6 (802.11ax) support to leverage TWT. Configure appropriate wake intervals based on data reporting frequency - a sensor reporting hourly can sleep for 59 minutes between transmissions.


798.5 Frequency Band Trade-offs

WarningTradeoff: Wi-Fi 2.4 GHz vs Wi-Fi 5 GHz for IoT Gateways

Option A (2.4 GHz): - Range: 100-150m indoor - Channels: 3 non-overlapping (1, 6, 11) - Interference: Crowded spectrum with Bluetooth/Zigbee/microwave - Wall penetration: -3 dB per drywall, -6 dB per concrete - Max 802.11n: 150 Mbps

Option B (5 GHz): - Range: 50-75m indoor - Channels: 23+ non-overlapping - Interference: Less interference from IoT devices - Wall penetration: -5 dB per drywall, -12 dB per concrete - Max 802.11ac: 1.3 Gbps

Decision Factors: Choose 2.4 GHz for IoT gateways requiring maximum range through walls, legacy device compatibility, or outdoor deployments. Choose 5 GHz for high-bandwidth applications (video cameras, AR/VR), dense urban environments with heavy 2.4 GHz congestion, or when gateway and devices are in the same room with minimal obstacles.


798.6 Worked Example: Wi-Fi Modulation Selection

NoteWorked Example: Comparing Wi-Fi Modulation Schemes for IoT Gateway

Scenario: Designing a Wi-Fi-connected IoT gateway that aggregates data from 50 BLE sensors. The gateway sends 10 KB data bursts to the cloud every 30 seconds. Building has 8 competing Wi-Fi networks causing channel congestion.

Given: - Data requirement: 10 KB every 30 seconds = 2.67 kbps average - Wi-Fi options: 802.11b/g/n/ac at various modulation schemes - Interference: 8 neighboring networks on overlapping channels - Power: Mains-powered (no battery constraint) - Distance to AP: 25 meters through 2 drywall partitions

Steps:

  1. Calculate minimum required data rate:

    • 10 KB x 8 = 80,000 bits per burst
    • At 1 Mbps: 80 ms transmission time
    • At 54 Mbps: 1.5 ms transmission time
    • Faster = less airtime = less collision probability
  2. Evaluate modulation schemes by robustness:

    Modulation Protocol Max Rate Min SNR Required Range
    BPSK 1/2 802.11a/g 6 Mbps 4 dB Excellent
    QPSK 1/2 802.11a/g 12 Mbps 7 dB Very Good
    16-QAM 1/2 802.11a/g 24 Mbps 12 dB Good
    64-QAM 3/4 802.11a/g 54 Mbps 25 dB Fair
    256-QAM 5/6 802.11ac 400+ Mbps 32 dB Poor
  3. Estimate link quality:

    • TX power: 20 dBm
    • Path loss (25m + 2 walls): 60 + 8 = 68 dB
    • Received power: 20 - 68 = -48 dBm
    • Noise floor: -95 dBm
    • SNR: -48 - (-95) = 47 dB (excellent)
  4. Select appropriate MCS (Modulation and Coding Scheme):

    • With 47 dB SNR, 256-QAM is theoretically possible
    • However, interference from 8 networks causes SNR fluctuation of +/-15 dB
    • Worst-case SNR: 47 - 15 = 32 dB
    • Select 64-QAM 3/4 (requires 25 dB SNR) for reliability with margin

Result: Configure the gateway for 802.11n with MCS 7 (64-QAM, 72.2 Mbps). This provides 7 dB margin above minimum SNR in worst-case interference, ensures sub-2ms burst transmission to minimize collision window, and far exceeds the 2.67 kbps requirement.

Key Insight: For IoT gateways in congested Wi-Fi environments, do NOT select the highest modulation scheme your SNR supports. Leave 5-10 dB margin for interference variability. A reliable 54 Mbps link beats an intermittent 300 Mbps link for IoT applications.


798.7 Hands-On Lab: ESP32 Wi-Fi Network Scanning

NoteLab Activity: Scan and Analyze Wi-Fi Networks

Objective: Use an ESP32 to scan available Wi-Fi networks and analyze their characteristics (SSID, RSSI, channel, encryption).

Hardware Required: - ESP32 development board - USB cable - Computer with Arduino IDE

Code:

#include <WiFi.h>

void setup() {
  Serial.begin(115200);
  delay(1000);

  Serial.println("ESP32 Wi-Fi Scanner");
  Serial.println("==================");

  // Set Wi-Fi to station mode and disconnect
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);
}

void loop() {
  Serial.println("\nScanning Wi-Fi networks...");

  // Start scan
  int n = WiFi.scanNetworks();

  if (n == 0) {
    Serial.println("No networks found");
  } else {
    Serial.printf("%d networks found:\n\n", n);
    Serial.println("Nr | SSID                             | RSSI | Ch | Encryption");
    Serial.println("---|----------------------------------|------|----|------------");

    for (int i = 0; i < n; ++i) {
      // Print SSID and RSSI for each network found
      Serial.printf("%2d", i + 1);
      Serial.print(" | ");
      Serial.printf("%-32s", WiFi.SSID(i).c_str());
      Serial.print(" | ");
      Serial.printf("%4d", WiFi.RSSI(i));
      Serial.print(" | ");
      Serial.printf("%2d", WiFi.channel(i));
      Serial.print(" | ");

      switch (WiFi.encryptionType(i)) {
        case WIFI_AUTH_OPEN:
          Serial.print("Open");
          break;
        case WIFI_AUTH_WEP:
          Serial.print("WEP");
          break;
        case WIFI_AUTH_WPA_PSK:
          Serial.print("WPA");
          break;
        case WIFI_AUTH_WPA2_PSK:
          Serial.print("WPA2");
          break;
        case WIFI_AUTH_WPA_WPA2_PSK:
          Serial.print("WPA/WPA2");
          break;
        case WIFI_AUTH_WPA2_ENTERPRISE:
          Serial.print("WPA2-Enterprise");
          break;
        default:
          Serial.print("Unknown");
      }
      Serial.println();
    }
  }

  // Wait 10 seconds before next scan
  delay(10000);
}

Expected Output:

ESP32 Wi-Fi Scanner
==================

Scanning Wi-Fi networks...
12 networks found:

Nr | SSID                             | RSSI | Ch | Encryption
---|----------------------------------|------|----|------------
 1 | HomeNetwork                      |  -45 |  6 | WPA2
 2 | Office_WiFi                      |  -62 | 11 | WPA2
 3 | Guest_Network                    |  -58 |  1 | WPA2
 4 | IoT_Sensors                      |  -71 |  6 | WPA2
 ...

Analysis Tasks: 1. Identify channel congestion: Which channels have the most networks? 2. Measure signal strength: Which networks have the strongest signal (RSSI)? 3. Security assessment: Are there any open (unencrypted) networks? 4. Channel selection: If deploying a new network, which channel would you choose? 5. Range estimation: Based on RSSI, estimate approximate distance to access points


ImportantKnowledge Check

Question: A hospital deploys 300 patient monitors across 5 floors (100m x 80m each). Devices transmit vitals every 2 seconds with <100ms latency requirement. Which protocol meets requirements?

Explanation: Wi-Fi 6 (802.11ax) provides “Lower latency” for “dense environments” and “Smart buildings, dense sensor deployments”. Wi-Fi 6 latency: 8ms << 100ms requirement. OFDMA handles 300 devices (12/AP) with 6% utilization. LoRaWAN FAILS: 1,800ms latency >> 100ms, cannot meet 0.5 Hz update rate. Zigbee FAILS: 78-182ms latency with unpredictable mesh hops. Sigfox FAILS: 308x more messages than 140/day limit.

Question: A theme park deploys 2,000 wearable wristbands across 1 km². Wristbands need 16-hour battery, location updates every 30s, and <2s payment latency. Which is suitable?

Explanation: Wi-Fi 6 for “dense environments” with “Target Wake Time (TWT) for power savings” and “Lower latency”. Wi-Fi 6 payment latency: 230ms << 2s. TWT power mode: 88.5 mAh/16h (59% of 150 mAh battery). Fast roaming: 50ms handoffs for mobile wearables. LoRaWAN FAILS: 3-7s latency >> 2s, poor mobility. Zigbee FAILS: 500ms-2s roaming, not designed for mobile. Ethernet IMPOSSIBLE: wearables are mobile devices.


798.8 Summary

Wi-Fi provides high-bandwidth wireless connectivity for IoT, with recent standards specifically designed for IoT applications.

TipKey Takeaways

Wi-Fi for IoT: | Standard | Best For | Key Feature | |———-|———-|————-| | 802.11n | General IoT | Dual-band, MIMO | | 802.11ac | Video, high-bandwidth | 5 GHz, very fast | | 802.11ah (HaLow) | Long-range sensors | 1km range, low power | | 802.11ax (Wi-Fi 6) | Dense deployments | OFDMA, TWT |

IoT-Specific Features: - Wi-Fi HaLow: Sub-1 GHz for 1km range, 8,191 devices/AP, battery-friendly - Wi-Fi 6: OFDMA for efficient multi-device, TWT for power savings, 8ms latency

Selection Criteria: - Range: HaLow for 1km, traditional for 100m - Power: Wi-Fi 6 TWT or HaLow for battery devices - Bandwidth: Wi-Fi 5/6 for video, HaLow for sensors - Density: Wi-Fi 6 OFDMA for many devices

Best Practices: 1. Use Wi-Fi 6 for new IoT deployments (TWT, OFDMA) 2. Consider HaLow for outdoor/long-range sensors 3. Design for 5-10 dB SNR margin in congested environments 4. Use 5 GHz where possible to avoid 2.4 GHz congestion 5. Plan AP density based on device count and bandwidth needs

798.9 What’s Next?

Continue to Low-Power Networks: 802.15.4, LPWAN, and Cellular to explore IEEE 802.15.4 (Zigbee, Thread), LPWAN technologies (LoRaWAN, Sigfox, NB-IoT), and cellular IoT from 2G to 5G.