# Console Commands Quick Reference ## 🎮 All Available Commands ```bash mode_monitor [channel/bandwidth] # Monitor mode with bandwidth control mode_sta [band] # STA mode with band selection mode_status # Show current configuration csi_dump # Dump CSI data (STA mode only) ``` --- ## 📡 Monitor Mode Examples ### 2.4GHz Band ```bash mode_monitor 6/20 # Channel 6, 20MHz (narrow, less interference) mode_monitor 6/40 # Channel 6, 40MHz (wide, more speed) mode_monitor 11/20 # Channel 11, 20MHz mode_monitor 1 # Channel 1, default 20MHz ``` ### 5GHz Band ```bash mode_monitor 36/20 # Channel 36, 20MHz (max range) mode_monitor 36/40 # Channel 36, 40MHz (balanced) mode_monitor 36/80 # Channel 36, 80MHz (max speed, WiFi 6) mode_monitor 149/80 # Channel 149, 80MHz mode_monitor 161 # Channel 161, default 40MHz ``` --- ## 🌐 STA Mode Examples ### Auto Band Selection (Default) ```bash mode_sta # Auto select 2.4GHz or 5GHz mode_sta auto # Same as above ``` ### Force 2.4GHz ```bash mode_sta 2.4 # Connect on 2.4GHz only mode_sta 2 # Same as above ``` ### Force 5GHz ```bash mode_sta 5 # Connect on 5GHz only mode_sta 5.0 # Same as above ``` --- ## 📊 Status Check ```bash esp32> mode_status === WiFi Mode Status === Current mode: MONITOR LED state: Blue solid (Monitoring) Monitor channel: 36 (5GHz) Monitor bandwidth: 80MHz Monitor enabled: Yes Frames captured: 15234 GPS synced: Yes (+) ``` --- ## 🎯 Common Workflows ### Workflow 1: WiFi 6 Testing on 5GHz ```bash # 1. Connect on 5GHz esp32> mode_sta 5 # 2. Wait for connection (green LED) # 3. Check AP channel esp32> mode_status Connected band: 5GHz (channel 36) Bandwidth: 80MHz # 4. Switch to monitor with same config esp32> mode_monitor 36/80 # 5. Monitor collapse events with GPS timestamps [Monitoring...] ``` ### Workflow 2: 2.4GHz Congestion Analysis ```bash # Test narrow bandwidth esp32> mode_monitor 6/20 [collect for 30 min...] # Test wide bandwidth esp32> mode_monitor 6/40 [collect for 30 min...] # Compare collapse rates ``` ### Workflow 3: Force 5GHz for Performance ```bash # Force 5GHz connection esp32> mode_sta 5 # Verify connected on 5GHz esp32> mode_status # Collect CSI data on 5GHz [wait 20 seconds for auto dump] # Or dump manually esp32> csi_dump ``` ### Workflow 4: Multi-Bandwidth Testing ```bash # Test same channel at different bandwidths esp32> mode_monitor 149/20 [5 minutes...] esp32> mode_monitor 149/40 [5 minutes...] esp32> mode_monitor 149/80 [5 minutes...] # Analyze which has fewer collapses ``` --- ## 🎨 LED Status | Color | State | Mode | |-------|-------|------| | Yellow solid | No WiFi config | - | | Blue blink | Connecting to AP | STA | | Green solid | Connected, CSI+iperf running | STA | | Blue solid | Monitor mode active | Monitor | | Red blink | Connection failed | - | --- ## 📝 GPS Timestamp Format ``` Log messages: I (*1.234) MAIN: Waiting... (* = not synced) I (+1733424645.234) MAIN: Ready! (+ = GPS synced) CSV collapse events: COLLAPSE,MonoMS,GpsMS,Synced,NAV,RSSI,Retry COLLAPSE,5234567,1733424645234,1,5234.50,-65,1 ``` --- ## 🔧 Configuration Matrix ### Valid Bandwidth Combinations | Band | Channel Examples | 20MHz | 40MHz | 80MHz | |------|-----------------|-------|-------|-------| | 2.4GHz | 1, 6, 11 | ✅ | ✅ | ❌ | | 5GHz | 36, 149, 161 | ✅ | ✅ | ✅ | ### Valid Band Preferences | Mode | 2.4GHz | 5GHz | Auto | |------|--------|------|------| | STA | ✅ | ✅ | ✅ (default) | | Monitor | ✅ | ✅ | N/A | --- ## 🚀 Deployment Examples ### 32-Device Setup: Multi-Bandwidth Testing ```bash # Devices 1-8: 2.4GHz 20MHz mode_monitor 6/20 # Devices 9-16: 2.4GHz 40MHz mode_monitor 6/40 # Devices 17-24: 5GHz 40MHz mode_monitor 149/40 # Devices 25-32: 5GHz 80MHz mode_monitor 149/80 ``` ### Production Deployment: Best Performance ```bash # All devices: Force 5GHz connection mode_sta 5 # After connection, monitor on AP's channel mode_monitor 149/80 ``` --- ## ⚡ Performance Tips ### For Maximum Range ```bash mode_sta 2.4 # Connect on 2.4GHz mode_monitor 6/20 # Monitor with 20MHz ``` ### For Maximum Speed ```bash mode_sta 5 # Connect on 5GHz mode_monitor 149/80 # Monitor with 80MHz ``` ### For Dense Environments ```bash mode_sta 5 # Prefer 5GHz (less congestion) mode_monitor 149/20 # Narrow bandwidth (less interference) ``` ### For WiFi 6 Testing ```bash mode_sta auto # Auto select mode_monitor 36/80 # 80MHz WiFi 6 ``` --- ## 🎉 Feature Summary **ESP32-C5 Capabilities:** - ✅ WiFi 6 (802.11ax) on 2.4GHz and 5GHz - ✅ Bandwidths: 20MHz, 40MHz (both bands); 80MHz (5GHz only) - ✅ Band selection: Auto, 2.4GHz only, 5GHz only - ✅ Runtime mode switching (no reflashing needed) - ✅ GPS-timestamped collapse detection - ✅ CSI capture + iperf server in STA mode - ✅ Visual LED status indicators **Console Commands:** - 4 commands total - Bandwidth control in monitor mode - Band preference in STA mode - Real-time status checking - One firmware for all configurations!