60  Wireless Access: Wi-Fi

Key Concepts
  • Wi-Fi (IEEE 802.11): The dominant wireless LAN standard; multiple generations (802.11b/g/n/ac/ax) offer increasing data rates and spectrum efficiency
  • SSID (Service Set Identifier): The human-readable name of a Wi-Fi network, broadcast in beacon frames
  • Access Point (AP): The central device in a Wi-Fi star topology that all clients connect to
  • Channel: A designated frequency range within the 2.4 or 5 GHz bands; proper channel planning prevents inter-AP interference
  • OFDM (Orthogonal Frequency-Division Multiplexing): The modulation technique used by 802.11g and later; divides the channel into subcarriers to handle multipath
  • MIMO (Multiple-Input Multiple-Output): Using multiple antennas to send parallel data streams, increasing throughput without wider channels
  • WPA3: The current Wi-Fi security standard; mandatory for Wi-Fi 6 (802.11ax) certification, replacing WPA2

60.1 In 60 Seconds

Wi-Fi (IEEE 802.11) has evolved from 11 Mbps (802.11b, 1999) to multi-gigabit speeds (802.11ax/Wi-Fi 6), with two IoT-critical innovations: Wi-Fi HaLow (802.11ah) operates at sub-1 GHz for 1 km range with low power, and Wi-Fi 6 introduces OFDMA (efficient multi-device scheduling) and Target Wake Time (TWT, letting devices sleep for hours between transmissions). The 2.4 GHz band penetrates walls better but is congested, while 5 GHz is faster with less interference but shorter range.

Learning Objectives

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

  • Summarize the evolution of IEEE 802.11 Wi-Fi protocols from 802.11b to Wi-Fi 7
  • Compare Wi-Fi standards (802.11 a/b/g/n/ac/ax) for IoT applications across speed, range, and power trade-offs
  • Evaluate IoT-specific Wi-Fi standards: Wi-Fi HaLow (802.11ah) and Wi-Fi 6 (802.11ax)
  • Explain how OFDMA and Target Wake Time (TWT) optimize Wi-Fi for IoT device density and battery life
  • Select appropriate Wi-Fi standards for different IoT deployment scenarios

60.2 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

“Wi-Fi keeps getting faster and smarter!” said Max the Microcontroller. “The original 802.11b from 1999 was only 11 Mbps. Now Wi-Fi 6 can do over 9 Gbps – that is nearly 900 times faster!”

“But speed is not the only improvement for IoT,” noted Sammy the Sensor. “Wi-Fi 6 has two features I love. First, OFDMA lets the router talk to many devices at the same time instead of one at a time. With hundreds of IoT devices in a smart building, that is essential.”

“Second is Target Wake Time,” added Bella the Battery with a smile. “TWT lets me negotiate a sleeping schedule with the access point. I tell it ‘wake me up in 4 hours,’ and I sleep the whole time. Before TWT, Wi-Fi devices had to wake up constantly to check for messages. TWT makes Wi-Fi actually practical for battery-powered sensors!”

Lila the LED brought up the frequency choice. “2.4 GHz goes through walls better but is crowded – every microwave, baby monitor, and Bluetooth device uses it. 5 GHz is faster and less crowded, but does not travel as far. And Wi-Fi HaLow at sub-1 GHz can reach a whole kilometer – perfect for outdoor IoT!”


60.3 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.

Timeline showing Wi-Fi standard evolution from 802.11b (1999, 11 Mbps, 2.4 GHz) through 802.11g, 802.11n, 802.11ac, 802.11ah Wi-Fi HaLow (sub-1 GHz, 1 km range), 802.11ax Wi-Fi 6 (9.6 Gbps, OFDMA, TWT), and Wi-Fi 7, with key IoT-relevant features highlighted at each generation
Figure 60.1: Wi-Fi evolution timeline from 802.11 Legacy to Wi-Fi 7

60.4 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 3.5 Gbps ~100m Good (high bandwidth)
802.11ah 2016 Sub-1 GHz 347 Mbps ~1 km Excellent (low power)
802.11ax 2021 2.4/5 GHz 9.6 Gbps ~200m Excellent (dense)

60.5 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.

60.5.1 802.11ah (Wi-Fi HaLow)

Diagram showing 802.11ah Wi-Fi HaLow operating at sub-1 GHz with 1 km range, low power operation, and support for up to 8,191 devices per access point, with use cases including smart city sensors, agricultural monitoring, and industrial IoT
Figure 60.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

60.5.2 802.11ax (Wi-Fi 6)

Diagram illustrating 802.11ax Wi-Fi 6 features for IoT: OFDMA subdividing channels into resource units for simultaneous multi-device access, Target Wake Time (TWT) enabling scheduled device sleep for up to 90% power reduction, and 8 ms typical latency for dense smart building deployments
Figure 60.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
MVU: 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.


60.6 Frequency Band Trade-offs

Tradeoff: 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.


60.7 Worked Example: Wi-Fi Modulation Selection

Worked 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.73 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 1024 x 8 = 81,920 bits per burst
    • At 1 Mbps: ~82 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.

Wi-Fi link budget calculations determine the achievable data rate and modulation scheme based on signal strength and noise. For the IoT gateway scenario with interfering networks:

Received signal strength (RSS): \[\text{RSS} = P_{\text{TX}} - L_{\text{path}} - L_{\text{walls}}\] \[= 20 \text{ dBm} - 60 \text{ dB} - 8 \text{ dB} = -48 \text{ dBm}\]

Signal-to-noise ratio (SNR): \[\text{SNR} = \text{RSS} - N_{\text{floor}} = -48 - (-95) = 47 \text{ dB}\]

SNR with interference: \[\text{SNR}_{\text{worst}} = 47 \text{ dB} - 15 \text{ dB}_{\text{interference}} = 32 \text{ dB}\]

Selecting modulation and coding scheme (MCS) requires margin: \[\text{Required SNR} + \text{Margin} \leq \text{SNR}_{\text{worst}}\] \[25 \text{ dB} + 7 \text{ dB} = 32 \text{ dB} \checkmark\]

This selects 64-QAM with rate 3/4 coding (MCS 7), providing 7 dB fade margin. Using 256-QAM (requires 32 dB SNR) would leave zero margin, causing frequent link failures during interference spikes.

Transmission time for 10 KB burst at 72.2 Mbps: \[T = \frac{10 \times 8192 \text{ bits}}{72.2 \times 10^6 \text{ bps}} = 1.14 \text{ ms}\]

Sub-2ms transmission minimizes collision probability in the congested 2.4 GHz band.

Try It: Wi-Fi Link Budget Calculator

Adjust the parameters below to see how SNR and modulation scheme selection change for different deployment scenarios.


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

Lab 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

60.9 Knowledge Check


60.10 Real-World Case Study: Wi-Fi 6 Deployment at Denver International Airport

Denver International Airport (DEN) deployed Wi-Fi 6 in 2022 to support both passenger connectivity and 4,200 IoT devices across its terminal complex – making it one of the largest Wi-Fi 6 IoT deployments in a public venue.

The Challenge: The existing Wi-Fi 5 (802.11ac) network served passengers well but could not handle the growing IoT fleet: 1,800 environmental sensors (HVAC, air quality), 900 asset tracking tags (wheelchairs, carts), 800 digital signage displays, and 700 security cameras. During peak hours (6-9 AM, 4-7 PM), the access points experienced 40% channel utilization, causing sensor data delays of 500ms-2s that triggered false HVAC alarms.

Why Wi-Fi 5 Failed for IoT:

Wi-Fi 5 (802.11ac) per-AP statistics during peak:
- Connected clients: 120 (80 passengers + 40 IoT devices)
- Channel access method: OFDM (one device transmits at a time)
- Average wait time per IoT transmission: 450 ms
- Sensor data delivery success rate: 87%
- False HVAC alarms per day: 23 (from delayed readings)

Wi-Fi 6 Solution – OFDMA and TWT:

The airport deployed 340 Wi-Fi 6 access points (Cisco Catalyst 9136) with two critical configurations:

  1. OFDMA for sensor data: Each 20 MHz channel was subdivided into 9 Resource Units (RUs), allowing 9 IoT devices to transmit simultaneously. This reduced per-device wait time from 450ms to under 50ms.

  2. TWT for asset tracking tags: The 900 tracking tags negotiated TWT schedules – waking every 30 seconds to transmit a 12-byte location update, then sleeping. Battery life increased from 6 months (Wi-Fi 5, constant beacon listening) to 28 months (Wi-Fi 6 TWT).

Quantitative Results:

Metric Wi-Fi 5 (Before) Wi-Fi 6 (After) Improvement
Sensor data latency (peak) 450 ms average 38 ms average 12x lower
Delivery success rate 87% 99.6% +12.6%
False HVAC alarms/day 23 1-2 92% reduction
Asset tag battery life 6 months 28 months 4.7x longer
Devices per AP (peak) 120 180 50% more capacity
Annual battery replacement cost $162,000 $34,600 $127,400 saved

Key Insight: Wi-Fi 6’s value for IoT is not about higher speeds – the sensors only need kilobits per second. The transformative features are OFDMA (simultaneous multi-device access, eliminating queuing delays) and TWT (scheduled sleep, extending battery life). For any deployment mixing high-bandwidth clients (passengers, cameras) with low-bandwidth IoT devices (sensors, tags), Wi-Fi 6 eliminates the contention that made Wi-Fi 5 unreliable for IoT at scale.


60.11 Review: Match Wi-Fi Standards to Features


60.12 Review: Wi-Fi Deployment Decision Sequence


Common Pitfalls

Wi-Fi power consumption (100–200 mA active) is 10–50× higher than Zigbee or BLE. Battery-powered IoT devices on Wi-Fi may last only days. Fix: use Wi-Fi only for mains-powered IoT devices; use Zigbee, BLE, or LoRaWAN for battery-powered sensors.

The 2.4 GHz band has only 3 non-overlapping channels (1, 6, 11). Dense AP deployments using these 3 channels cause co-channel interference. Fix: use the 5 GHz band with its 24 non-overlapping channels for dense deployments.

Deploying IoT devices on an open or WPA2-Personal network exposes the entire VLAN to any device that knows the pre-shared key. Fix: isolate IoT devices on a dedicated VLAN with WPA2-Enterprise or WPA3 authentication.

60.13 Summary

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

Key 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

60.14 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.

Topic Chapter Description
Low-Power Networks 802.15.4, LPWAN, and Cellular IEEE 802.15.4, Zigbee, LoRaWAN, Sigfox, NB-IoT, and 5G cellular IoT options compared
Wired Network Access Ethernet for IoT Ethernet standards, PoE, industrial Ethernet and how wired compares to Wi-Fi for fixed IoT
Network Access Overview Network Access and Physical Layer Physical layer fundamentals, modulation, and the role of the access layer in IoT stacks
Bluetooth and BLE Bluetooth & BLE for IoT BLE’s role alongside Wi-Fi: short-range, ultra-low-power personal area networking
Protocol Integration Wi-Fi and Protocol Integration How Wi-Fi gateways bridge BLE, Zigbee, and Z-Wave devices to IP-based cloud platforms
Network Security IoT Network Security Fundamentals Securing Wi-Fi IoT deployments: WPA3, certificate-based authentication, and network segmentation