830 Wi-Fi Architecture Modes
830.1 Learning Objectives
By the end of this chapter, you will be able to:
- Compare Wi-Fi Architectures: Differentiate infrastructure mode, Wi-Fi Direct, and mesh networking
- Understand Architecture Trade-offs: Evaluate coverage, power, and performance implications of each mode
- Configure ESP32 Mesh: Set up basic mesh networking using painlessMesh library
- Design for Coverage: Apply site survey and access point placement strategies for IoT networks
830.2 Prerequisites
Before diving into this chapter, you should be familiar with:
- Wi-Fi Fundamentals and Standards: Understanding Wi-Fi standards (802.11b/g/n/ac/ax), frequency bands (2.4/5 GHz), and basic Wi-Fi characteristics is essential background for exploring advanced Wi-Fi architectures
- Networking Basics: Knowledge of network topologies (star, mesh), MAC layer concepts, and wireless communication fundamentals helps understand Wi-Fi architecture decisions
- Wireless Sensor Networks: Familiarity with multi-hop routing, self-healing networks, and coverage extension techniques provides context for Wi-Fi mesh networking concepts
NoteKey Takeaway
In one sentence: Wi-Fi mesh networks extend coverage through multi-hop routing and self-healing topology, making Wi-Fi viable for large-scale IoT deployments beyond single access point range.
Remember this rule: Use infrastructure mode for simple deployments, Wi-Fi Direct for temporary peer-to-peer connections without routers, and mesh for whole-building coverage with seamless roaming.
NoteRelated Chapters
Deep Dives: - Wi-Fi MAC and Protocols - CSMA/CA and channel access - Wi-Fi Mesh Applications - Real-world mesh deployments - Wi-Fi Architecture Exercises - Worked examples and practice
Comparisons: - Bluetooth Mesh - BLE mesh vs Wi-Fi mesh - Zigbee Architecture - Compare mesh protocols - Thread Architecture - IPv6-based mesh alternative
Architecture Context: - Wireless Sensor Networks - WSN mesh fundamentals - Edge Computing Patterns - Mesh + edge integration - Network Topologies - Understanding mesh topology design
Learning Resources: - Quizzes Hub - Test Wi-Fi mesh knowledge - Simulations Hub - Interactive mesh experiments - Videos Hub - Wi-Fi mesh tutorials
830.3 🌱 Getting Started (For Beginners)
830.3.1 What is Wi-Fi Architecture? (Simple Explanation)
Analogy: Think of Wi-Fi architecture as different ways to organize a conversation in a room full of people.
Key Terms for Wi-Fi Architecture:
| Term | What It Means | Real-World Example |
|---|---|---|
| Infrastructure Mode | All devices connect through central router | Your home Wi-Fi (most consumer Wi-Fi IoT devices) |
| Wi-Fi Direct (P2P) | Two devices connect without router | Phone → Printer direct connection |
| Mesh Network | Multiple routers relay messages | Google Wi-Fi, Eero whole-home systems |
| SSID | Network name (same for all mesh nodes) | “MyHome_Wi-Fi” appears everywhere |
| Backhaul | Connection between mesh nodes | How mesh nodes talk to each other |
| Self-Healing | Automatic rerouting when node fails | If Node B dies, uses Node C instead |
830.3.2 Why Wi-Fi Architecture Matters for IoT
Wi-Fi is widely available, but architecture choices determine: - Coverage and roaming behavior (single AP vs multiple nodes) - Power strategy (how many nodes must be always-on) - Performance under load (more devices, more contention) - Provisioning and temporary links (router required or not)
Three main Wi-Fi modes:
- Infrastructure Mode = Everyone talks through a moderator (router)
- Like a conference call where everyone calls a central number
- The router is the “traffic cop” directing all messages
- Wi-Fi Direct = Two people talking directly to each other
- Like a phone call between two friends (no middleman)
- One device acts as a temporary hotspot
- Mesh Network = Multiple conversations with everyone helping relay messages
- Like people in a crowded room passing notes to help messages reach far corners
- If one person leaves, others find a new path
830.3.3 Wi-Fi Modes Comparison (Everyday Examples)
| Mode | Real-World Analogy | When You Use It | IoT Example |
|---|---|---|---|
| Infrastructure | Coffee shop Wi-Fi - everyone connects to router | Home, office, public Wi-Fi | Smart home devices → router → internet |
| Wi-Fi Direct | AirDrop between two phones (direct connection) | Phone to printer, phone to camera | Camera directly streaming to phone |
| Mesh | Relay race - multiple runners passing baton | Large house, office building, warehouse | Sensors spread across factory floor |
830.3.4 Infrastructure Mode (Most Common)
How it works:
Key points: - ✅ One router controls everything (like a traffic cop) - ✅ All devices connect to router (star topology) - ✅ Router provides internet access (bridge to cloud services) - ✅ Most Wi-Fi IoT deployments start here
Real example: Your smart home has 15 devices (lights, sensors, cameras). All connect to your Wi-Fi router. Router assigns each device an IP address and forwards messages between devices and the internet.
Limitations: - ❌ Router is single point of failure (router dies = all offline) - ❌ Indoor coverage can drop quickly through walls/floors/metal - ❌ Extending coverage usually means adding APs/mesh/extenders (each with trade-offs)
830.3.5 Wi-Fi Direct (Peer-to-Peer)
Analogy: Wi-Fi Direct is like Bluetooth, but faster and longer range.
How it works:
Key points: - ✅ Two devices connect directly (no router required) - ✅ One device acts as “soft AP” (temporary hotspot) - ✅ Often higher throughput than Bluetooth (especially BLE), but throughput depends on Wi-Fi standard, channel width, and RF conditions - ✅ Range can be longer than Bluetooth in open space, but is highly environment/antenna dependent
Real examples: - 📱→📷 Phone to camera: Transfer photos from DSLR to phone instantly - 📱→🖨️ Phone to printer: Print documents without router - 📱→🔊 Phone to speaker: Stream music to Wi-Fi Direct speaker - 🎮→📺 Game console to TV: Miracast screen mirroring
When to use: - ✅ Temporary connections (don’t need internet) - ✅ High-speed file transfers - ✅ Field deployment (no existing Wi-Fi infrastructure)
Limitations: - ❌ Only 1-to-1 or 1-to-few connections (not scalable) - ❌ One device must stay awake as soft AP (drains battery)
830.3.6 Wi-Fi Mesh Networks (Self-Healing Magic!)
Analogy: A mesh network is like a relay race where runners pass messages across a large area.
Traditional Wi-Fi (Single Router):
Wi-Fi Mesh:
How it works: 1. Main router connects to internet 2. Mesh nodes placed throughout area (hallway, bedroom, garage) 3. Each node relays messages to extend coverage 4. Automatic routing - finds best path to destination 5. Self-healing - if one node fails, finds alternate path
Key concepts:
A) Self-Healing (Automatic Rerouting)
Scenario: Node 2 battery dies
B) Multi-Hop Communication
Each hop can extend coverage into another area, but it also increases airtime usage (the same payload is forwarded multiple times), adds latency, and can reduce effective throughput—especially when client traffic and backhaul share the same radio/channel.
Real-world mesh examples:
| Application | Why Mesh? | Typical scale |
|---|---|---|
| Large office building | Concrete walls/floors create dead zones | Multiple rooms/floors |
| Warehouse | Metal racks and long aisles block signals | Large indoor floor |
| Outdoor site / farm | Wide spacing and limited infrastructure | Field-scale (line-of-sight dependent) |
| Campus / neighborhood | Coverage extension with many powered nodes | Street/block-scale (deployment dependent) |
Mesh vs Wi-Fi Extenders:
| Feature | Wi-Fi Extender | Mesh Network |
|---|---|---|
| Setup | Simple | Complex |
| Network name | Different SSID | Same SSID (seamless) |
| Handoff | Manual switch | Automatic |
| Performance | Often reduced (retransmits on same channel) | Varies; dedicated backhaul or wired uplinks preserve more |
| Self-healing | ❌ No | ✅ Yes |
| Best for | 1-2 extra rooms | Whole house/building |
830.3.8 Quick Self-Check
You’re setting up IoT sensors in a 3‑story warehouse (multiple floors, long aisles, and lots of metal/concrete). You have 50 temperature sensors, 20 motion detectors, and one Ethernet‑connected gateway to the cloud. Which Wi-Fi architecture is the best fit among the options below?
💡 Explanation: Option C is correct — the requirement is building‑scale coverage across multiple floors.
Why mesh is correct:
- Large area: 100m × 50m = 5,000 sqm per floor (too large for single router)
- Multiple floors: Wi-Fi struggles to penetrate concrete floors
- 70 sensors: Need reliable coverage everywhere
Illustrative mesh design:
- ~6 mesh nodes total (2-3 per floor), each covering ~50m radius
- Overlap zones ensure redundancy (self-healing)
Why NOT the other options:
- A) Single router ❌ — Router range ~20m through concrete floors; ~70% of sensors would be out of range
- B) Wi-Fi Direct ❌ — 1-to-1 connections only; 70 sensors can’t all connect directly to gateway
- D) Bluetooth mesh ❌ — Different technology; question asks for Wi-Fi solution
Power reality check: Mesh relay nodes should be mains/PoE powered (they must stay awake to forward traffic). For multi-year battery sensors, consider Zigbee/Thread/LoRaWAN instead.
Ready for technical details? The sections below cover ESP32 mesh implementation and interactive challenges!
Note🎓 Cross-Hub Connections
Enhance Your Learning:
This chapter connects to multiple learning resources across the book:
🎥 Watch: Videos Hub has Wi-Fi mesh tutorials, CSMA/CA animations, and ESP32 mesh setup walkthroughs
🧪 Practice: Simulations Hub offers interactive mesh topology visualizers, hidden terminal simulators, and network performance calculators
✅ Test: Quizzes Hub provides Wi-Fi architecture assessments, mesh design challenges, and CSMA/CA problem sets
📊 Map: Knowledge Map shows how Wi-Fi mesh connects to WSN routing, network topologies, and edge computing patterns
🔍 Gaps: Knowledge Gaps clarifies common misconceptions about mesh self-healing times, RTS/CTS overhead, and Wi-Fi Direct limitations
Warning⚠️ Common Misconception: “Wi-Fi Mesh = Always Faster”
The Myth: Many assume Wi-Fi mesh networks are faster than single routers because they have more access points.
The Reality: Mesh networks trade speed for coverage—each hop reduces effective bandwidth.
The following numbers are illustrative for single-radio (shared channel) backhaul. Actual performance varies by hardware, environment, and traffic patterns.
Illustrative Throughput Impact (shared-channel backhaul):
| Path | Effective Throughput | Notes |
|---|---|---|
| Single router (no mesh) | ~300 Mbps | Baseline at 10m |
| Mesh with 1 hop | ~150-180 Mbps | ~40-50% reduction |
| Mesh with 2 hops | ~75-90 Mbps | ~70% reduction |
| Mesh with 3 hops | ~40-50 Mbps | ~85% reduction |
Why This Happens:
The Problem: Most consumer mesh systems use single-radio backhaul: - Same Wi-Fi radio handles both client devices AND mesh links - Each hop “re-uses” the wireless channel - Bandwidth effectively divided by number of hops
How to design around it: - Prefer wired/ethernet backhaul where possible (best performance) - Use dual-band or tri-band mesh with dedicated backhaul channel - Keep critical devices to ≤2 wireless hops from the root - For high-bandwidth IoT (cameras), minimize hops or use wired connections
Key takeaway: Mesh solves coverage problems, not speed problems. For bandwidth-sensitive applications, minimize hops and consider wired backhaul.
830.4 🧪 Interactive Lab: ESP32 Wi-Fi Mesh Network
Let’s build a Wi-Fi mesh network using multiple ESP32 devices that automatically route messages and self-heal when nodes fail!
830.4.1 Mesh Messaging Simulation (Arduino painlessMesh)
This section has two parts:
- A small interactive toy model to build intuition about hop count and airtime.
- A hardware-oriented ESP32 example using
painlessMesh.
830.4.1.1 Interactive: Hop Count vs Airtime (Toy Model)
830.4.1.2 Hardware Lab: ESP32 Mesh Messaging (painlessMesh)
This code is intended for real ESP32 hardware (or a simulator that supports multi-node mesh libraries). Use it as a starting point for a physical lab build and adapt credentials/keys for your environment.
Code Explanation:
#include "painlessMesh.h"
#include <Arduino_JSON.h>
// Mesh network credentials
#define MESH_PREFIX "IoT_Mesh_Network"
#define MESH_PASSWORD "mesh_password_123"
#define MESH_PORT 5555
// Node identification
String nodeName = "TempSensor_"; // Will append node ID
int nodeNumber = 0; // Set uniquely for each node (0-3)
Scheduler userScheduler;
painlessMesh mesh;
// Task to send sensor data periodically
void sendMessage();
Task taskSendMessage(TASK_SECOND * 5, TASK_FOREVER, &sendMessage);
// Simulate temperature reading
float readTemperature() {
// Each node returns slightly different temp
return 20.0 + nodeNumber * 2.5 + random(-10, 10) / 10.0;
}
// Send temperature data to mesh
void sendMessage() {
float temp = readTemperature();
// Create JSON message
JSONVar msg;
msg["node"] = nodeName + String(mesh.getNodeId());
msg["type"] = "temperature";
msg["value"] = temp;
msg["unit"] = "C";
msg["timestamp"] = millis();
String str = JSON.stringify(msg);
// Broadcast to all nodes in mesh
mesh.sendBroadcast(str);
Serial.printf("📡 Sent: %s = %.1f°C (NodeID: %u)\n",
nodeName.c_str(), temp, mesh.getNodeId());
}
// Callback when message received
void receivedCallback(uint32_t from, String &msg) {
Serial.printf("📥 Received from %u: %s\n", from, msg.c_str());
// Parse JSON
JSONVar myObject = JSON.parse(msg);
if (JSON.typeof(myObject) == "undefined") {
Serial.println("❌ JSON parsing failed");
return;
}
String node = JSON.stringify(myObject["node"]);
String type = JSON.stringify(myObject["type"]);
double value = myObject["value"];
Serial.printf(" └─ Node: %s, Type: %s, Value: %.1f\n",
node.c_str(), type.c_str(), value);
}
// Callback when new node joins mesh
void newConnectionCallback(uint32_t nodeId) {
Serial.printf("✅ New node joined! NodeID: %u\n", nodeId);
Serial.printf(" Total nodes in mesh: %d\n", mesh.getNodeList().size() + 1);
}
// Callback when node leaves mesh
void changedConnectionCallback() {
Serial.printf("🔄 Mesh topology changed\n");
Serial.printf(" Connected nodes: %d\n", mesh.getNodeList().size() + 1);
// Print node list
Serial.print(" NodeIDs: ");
auto nodes = mesh.getNodeList();
for (auto &&id : nodes) {
Serial.printf("%u ", id);
}
Serial.println();
}
// Callback when mesh time is adjusted
void nodeTimeAdjustedCallback(int32_t offset) {
Serial.printf("⏰ Time adjusted by %ld us\n", (long)offset);
}
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println("\n\n=== ESP32 Wi-Fi Mesh Node Starting ===");
Serial.printf("Node: %s%d\n", nodeName.c_str(), nodeNumber);
// Append node number to name
nodeName += String(nodeNumber);
// Set mesh debugging
mesh.setDebugMsgTypes(ERROR | STARTUP | CONNECTION);
// Initialize mesh network
mesh.init(MESH_PREFIX, MESH_PASSWORD, &userScheduler, MESH_PORT);
// Register callbacks
mesh.onReceive(&receivedCallback);
mesh.onNewConnection(&newConnectionCallback);
mesh.onChangedConnections(&changedConnectionCallback);
mesh.onNodeTimeAdjusted(&nodeTimeAdjustedCallback);
// Add task to send messages
userScheduler.addTask(taskSendMessage);
taskSendMessage.enable();
Serial.println("✅ Mesh network initialized!");
Serial.printf(" Node ID: %u\n", mesh.getNodeId());
}
void loop() {
mesh.update(); // Maintain mesh connections
}830.4.2 🎯 Interactive Challenges
Challenge 1: Mesh Topology - How Many Hops? ⭐
You have a mesh network with this topology:
Question: A message from Sensor Node D needs to reach the Root Router. How many “hops” does the message make?
Click for hint
A “hop” is each time a message passes through a mesh node.
Count the arrows: D → C → B → A → Root How many arrows are there?
Click for answer
Answer: 4 hops
Step-by-step message path:
Why this matters:
Latency and airtime: - Each hop adds processing/queueing delay and consumes additional airtime. - More hops generally means higher latency and lower effective throughput.
Power consumption: - Each hop costs battery power - Node C relays: D’s messages + B’s messages + own messages - Middle nodes drain battery faster than edge nodes
Bandwidth impact: - Each hop “re-uses” the wireless channel - 4 hops = message transmitted 4 times over the air - In shared-channel designs, multi-hop forwarding can reduce the best-case capacity available to each flow (a simple upper bound is ~1/(hops+1)).
Optimal mesh design: - Minimize hops: Keep hop counts low for critical traffic - Place nodes strategically: Avoid long linear chains - Use multiple paths: Redundancy improves reliability
Better topology for same 5 nodes:
Now any sensor reaches the root in fewer hops than a long linear chain.
Pro tip: ESP-Wi-Fi-MESH automatically finds shortest path. You don’t manually configure routes - the mesh protocol handles it.
Challenge 2: Self-Healing - What Happens When Node B Fails? ⭐⭐
Original topology:
Node B suddenly fails (battery dies, power loss, crash).
Question: What happens to messages from Sensor D? Can they still reach the Root?
Scenario options: - A) Messages lost forever (no route to Root) - B) Mesh automatically reroutes through alternate path - C) Sensor D connects directly to Root (too far away) - D) All nodes restart and rebuild mesh
Click for hint
Remember: Mesh networks are “self-healing” - they automatically find alternate paths when nodes fail.
In a proper mesh, nodes should have multiple neighbor connections, not just a single linear path.
Realistic topology (with redundant paths):
Click for answer
Answer: B) Mesh automatically reroutes through alternate path
What happens step-by-step:
Before failure:
Node B fails:
Self-healing process (conceptual):
- Detection: Neighbors stop receiving expected frames/acks and mark the link down.
- Route selection: Nodes search for a new parent/next hop based on link quality and path cost.
- Rerouting: Traffic resumes along the new path once routing reconverges.
New topology:
Key points:
✅ Messages can resume if an alternate path exists ✅ No manual intervention (automatic rerouting) ✅ No node restart required (only failed node is offline) ⚠️ Some delay/loss is possible during reconvergence
In a well-designed mesh (with redundancy):
If topology had multiple paths from the start:
Then C already knows an alternate path through A, so recovery is typically faster (often under 1 second).
Code example - detecting topology changes:
void changedConnectionCallback() {
Serial.printf("🔄 Mesh topology changed!\n");
// List current connections
auto nodes = mesh.getNodeList();
Serial.printf(" Connected nodes: %d\n", nodes.size() + 1);
if (nodes.size() < 2) {
Serial.println(" ⚠️ WARNING: Low node count, limited redundancy!");
}
// Mesh automatically reroutes - no action needed
}Reality check: Recovery time varies widely by stack, topology, traffic load, and RF conditions. For critical IoT, design redundancy (multiple neighbor links) so a single node failure doesn’t isolate edge devices.
Challenge 3: Root Node Selection ⭐⭐⭐
In ESP-Wi-Fi-MESH, one node must be the “Root Node” that connects to the Wi-Fi router and internet.
Question: You have 4 nodes: - Node A: Battery-powered (small battery) - Node B: Powered by USB adapter / mains (always on) - Node C: Solar-powered (intermittent unless designed with storage) - Node D: Battery-powered (larger pack)
Which node should be the Root Node?
Click for hint
The Root Node has special responsibilities: - Always stays awake (can’t deep sleep) - Connects to Wi-Fi router (extra power for two radios) - Routes ALL traffic to/from internet - Single point of failure (if root dies, mesh loses internet)
Which power source is most reliable and has highest capacity?
Click for answer
Answer: Node B (USB powered, always on) is the best choice.
Why: - The root/gateway must stay awake, maintain the upstream link, and forward other nodes’ traffic. - Battery-only roots drain quickly because they cannot deep-sleep like leaf sensors. - Solar can work, but only if engineered like an always-on gateway (panel sizing + storage + worst-case weather).
How ESP-Wi-Fi-MESH selects root automatically (high level):
// Root election is framework-specific. Common factors include:
// - Upstream link quality to the router/AP
// - Node centrality / number of neighbors
// - Stability (power/uptime), if the stack accounts for it
// Consult your framework docs for the exact behavior.You can manually set root node:
// Force Node B to become root
mesh.setRoot(true); // This node becomes root
mesh.setContainsRoot(true); // Helps root discovery
// On other nodes
mesh.setRoot(false); // Don't become rootOptimal mesh power design:
Pro tip: Place root node where you have reliable AC power and good Wi-Fi router signal. All other mesh design decisions flow from root node placement.
Challenge 4: Mesh vs Infrastructure - When to Use Which? ⭐⭐⭐⭐
You’re designing IoT deployments for three scenarios. Choose the best Wi-Fi architecture for each:
Scenario 1: Smart Home (100 sqm, 2-story house) - 25 smart devices (lights, sensors, cameras) - Good Wi-Fi router centrally located
Scenario 2: Industrial Warehouse (large indoor floor with metal shelving) - 80 temperature sensors spread across the site - Metal racks/aisles create dead zones and reflections
Scenario 3: Outdoor Smart Farm (large fields) - 50 soil moisture sensors spread across a wide area - Limited existing power infrastructure
For each scenario, choose: - A) Single Wi-Fi router (infrastructure mode) - B) Wi-Fi extenders (2-3 extenders + router) - C) Wi-Fi mesh network (multiple mesh nodes)
Click for hint
Consider for each scenario: - Area coverage: Can single router reach all devices? - Obstacles: Do walls, metal, or outdoor distance block Wi-Fi? - Backhaul: Do you have wired uplinks (best) or must you use wireless backhaul? - Roaming: Do devices move and need seamless handoff? - Power + maintenance: Can you power always-on nodes, and can you service them if they fail?
Click for answer
Answers:
Scenario 1: Smart Home → A) Single Wi-Fi router ✅
Why: A centrally placed AP/router often covers a typical home, and a single SSID is easy to manage. If you discover dead zones, add an additional AP or move to mesh.
When to upgrade to mesh: - If you consistently have dead zones despite good placement - If you need seamless coverage across multiple floors/areas - If you can power additional nodes and want centralized management
Scenario 2: Industrial Warehouse → C) Wi-Fi mesh network ✅
Why: A warehouse usually needs multiple RF points because racks/aisles create dead zones. Mesh is one way to extend coverage with a single SSID and some self-healing. In enterprise setups, multiple wired APs (controller-managed) can also be a strong option; among the choices here, mesh captures the “multi-node” requirement.
Pros: ✅ Extends coverage across a large site ✅ Can reroute around node failures (topology dependent) ✅ Same SSID (sensors auto-connect to nearest node) ✅ Scalable (easily add more nodes later)
Cons: ❌ More complex than a single AP (placement, backhaul, troubleshooting) ❌ Requires powered nodes and ongoing management ❌ Wireless hops can reduce capacity; validate with a site survey and real traffic
Scenario 3: Outdoor Smart Farm → C) Wi-Fi mesh network ✅ (but with special considerations)
Why: If you must use Wi-Fi over a wide outdoor area, you’ll likely need powered relay points (solar + storage or mains) and careful antenna placement. In practice, many farms choose LPWAN options (LoRaWAN, NB‑IoT/LTE‑M) because Wi-Fi’s association overhead and always-on relay requirement can be a poor fit for multi-year batteries.
830.4.3 Summary Table:
| Scenario | Best Wi-Fi choice (given options) | Key considerations |
|---|---|---|
| Smart Home | Single router (A) | Start simple; move to multi-node only if you have persistent dead zones |
| Warehouse | Mesh (C) | Plan RF placement and backhaul; prefer wired uplinks or dedicated backhaul where possible |
| Farm | Mesh (C), but reconsider Wi-Fi | Power availability and maintenance dominate; LPWAN is often a better match |
Decision checklist: - If a single AP covers the space with good RSSI/SNR → start with infrastructure mode. - If you need multiple RF points and want one SSID with simpler management → mesh (or controller-managed wired APs). - If you can’t power always-on relays or need multi-year batteries at scale → consider LPWAN instead of Wi-Fi.
830.4.4 📝 Lab Takeaways
After completing this lab, you should understand:
✅ Wi-Fi mesh networking - How multiple nodes self-organize and route messages ✅ Self-healing - Automatic rerouting when nodes fail ✅ Multi-hop communication - Messages relay through intermediate nodes ✅ Root node selection - Importance of reliable power for root ✅ Mesh vs infrastructure - When to use each architecture ✅ ESP32 mesh frameworks - Build a simple mesh with painlessMesh (Arduino) and compare with ESP-IDF ESP-Wi-Fi-MESH
Next Steps: - Modify code to add more mesh nodes (test scalability) - Simulate node failures (disconnect power to test self-healing) - Add MQTT integration (root node publishes to broker) - Measure latency across different hop counts - Experiment with different mesh topologies (linear, star, grid)
830.5 Summary
This chapter covered Wi-Fi architecture modes for IoT:
- Infrastructure Mode: Centralized star topology where an access point manages association and typically provides DHCP/routing/internet access—common in home/office IoT
- Wi-Fi Direct: Peer-to-peer connections without a traditional router, where one device acts as a temporary soft AP (Group Owner); useful for ad-hoc links and provisioning
- Wi-Fi Mesh Networks: Multi-hop topology where nodes relay traffic to extend coverage; resilience and reconvergence behavior depend on stack/topology, and backhaul design strongly affects performance
- Mesh Power Design: Always-on root/relay nodes typically need mains/PoE/solar; battery sensors should be leaf nodes that transmit infrequently and sleep most of the time
- ESP32 Mesh Implementation: Practical hands-on experience with painlessMesh library for building self-healing mesh networks
830.6 What’s Next
The next chapter explores Wi-Fi MAC and Protocols, covering CSMA/CA channel access, hidden terminal solutions with RTS/CTS, frame structure, and QoS mechanisms for managing traffic priorities in dense IoT deployments.