|
| 1 | +# π§ Enhanced WiFi Analyzer |
| 2 | + |
| 3 | +> **Advanced WiFi diagnostics and troubleshooting for Linux with WiFi 7, DFS monitoring, and modern VPN support** |
| 4 | +
|
| 5 | +[](https://www.gnu.org/software/bash/) |
| 6 | +[]() |
| 7 | +[]() |
| 8 | + |
| 9 | +A comprehensive WiFi analysis and troubleshooting tool that diagnoses connectivity issues, optimizes performance, and provides distribution-specific fixes for modern Linux systems. Features DFS radar interference detection, WiFi 7/6E support, and modern VPN integration. |
| 10 | + |
| 11 | +## π Table of Contents |
| 12 | + |
| 13 | +- [π Key Features](#-key-features) |
| 14 | +- [π― Why Use This Tool?](#-why-use-this-tool) |
| 15 | +- [π Quick Start](#-quick-start) |
| 16 | +- [ποΈ Main Menu Options](#οΈ-main-menu-options) |
| 17 | +- [π§ Common Use Cases](#-common-use-cases) |
| 18 | +- [π Example Analysis Output](#-example-analysis-output) |
| 19 | +- [π Advanced Features](#-advanced-features) |
| 20 | +- [π‘ Pro Tips](#-pro-tips) |
| 21 | +- [π Troubleshooting Matrix](#-troubleshooting-matrix) |
| 22 | +- [π‘οΈ Safety & Compatibility](#οΈ-safety--compatibility) |
| 23 | +- [π Future Development](#-future-development) |
| 24 | +- [π Related Tools](#-related-tools) |
| 25 | +- [π€ Contributing](#-contributing) |
| 26 | + |
| 27 | +## π Key Features |
| 28 | + |
| 29 | +### π¬ **Advanced Diagnostics** |
| 30 | +- **Complete WiFi Health Analysis** - Full system assessment with scoring |
| 31 | +- **Modern Chipset Detection** - Supports WiFi 7, 6E, MLO, and new hardware |
| 32 | +- **Real-time Connectivity Testing** - Tests actual data flow beyond basic connection status |
| 33 | +- **Distribution-Aware Analysis** - Tailored for Fedora, Ubuntu, Arch (NetworkManager), Debian, openSUSE, and immutable systems |
| 34 | + |
| 35 | +### π‘ **DFS Radar Interference Monitoring** |
| 36 | +- **Radar Event Detection** - Identifies DFS channel issues causing sudden disconnections |
| 37 | +- **Smart Channel Switching** - Automated migration to non-DFS safe channels |
| 38 | +- **Environment Analysis** - Maps DFS usage patterns in your area |
| 39 | +- **6GHz Migration Path** - Recommendations for DFS-free 6GHz operation |
| 40 | + |
| 41 | +### π **Modern VPN Integration** |
| 42 | +- **Advanced VPN Detection** - Supports Tailscale, ZeroTier, Nebula, WireGuard, commercial VPNs |
| 43 | +- **VPN-WiFi Conflict Resolution** - Diagnoses and fixes VPN-related connectivity issues |
| 44 | +- **Split Tunneling Optimization** - Configures optimal routing for modern mesh VPNs |
| 45 | +- **MTU Optimization** - Automatic sizing for VPN tunnels |
| 46 | + |
| 47 | +### π **WiFi 6E/7 Optimization** |
| 48 | +- **6GHz Band Analysis** - Clean spectrum identification and optimization |
| 49 | +- **320MHz Channel Width** - Ultra-wide channel support for maximum throughput |
| 50 | +- **MLO (Multi-Link Operation)** - WiFi 7 multi-band aggregation support |
| 51 | +- **Regulatory Domain Optimization** - Proper power limits and channel availability |
| 52 | + |
| 53 | +### π οΈ **Interactive Troubleshooting** |
| 54 | +- **Guided Problem Solving** - Step-by-step fixes for common issues |
| 55 | +- **Emergency Repair Mode** - Quick fixes for critical failures |
| 56 | +- **Distribution-Specific Commands** - Tailored solutions for your Linux distribution |
| 57 | +- **Thermal Management** - Overheating detection and fixes |
| 58 | + |
| 59 | +### β‘ **Performance Optimization** |
| 60 | +- **Band Switching Automation** - Intelligent 2.4/5/6GHz selection |
| 61 | +- **Signal Strength Analysis** - RF environment mapping and optimization |
| 62 | +- **Power Management** - Battery life vs performance balancing |
| 63 | +- **Channel Width Optimization** - Maximizes throughput while maintaining stability |
| 64 | + |
| 65 | +## π― Why Use This Tool? |
| 66 | + |
| 67 | +### **Solves Real Problems** |
| 68 | +- **DFS Disconnections**: Identifies and fixes mysterious 30+ second WiFi drops caused by radar interference |
| 69 | +- **Modern VPN Issues**: Resolves connectivity problems with Tailscale, ZeroTier, and other mesh VPNs |
| 70 | +- **WiFi 7 Optimization**: Optimizes cutting-edge WiFi hardware within driver/firmware limitations |
| 71 | +- **Distribution Chaos**: Provides correct commands for your specific Linux distribution |
| 72 | + |
| 73 | +### **Beyond Basic Tools** |
| 74 | +- Most WiFi tools only check connection status - this analyzes actual data flow |
| 75 | +- Detects issues that `nmcli` and GUI tools miss |
| 76 | +- Provides root cause analysis, not just symptoms |
| 77 | +- Includes proactive recommendations to prevent future issues |
| 78 | + |
| 79 | +### **Expert Knowledge Built-In** |
| 80 | +- Incorporates knowledge of MediaTek, Intel, and Qualcomm chipset quirks |
| 81 | +- Understands regulatory domain impacts on performance |
| 82 | +- Knows which channels are safe vs DFS across different regions |
| 83 | +- Includes thermal management strategies for high-performance WiFi cards |
| 84 | + |
| 85 | +## π Quick Start |
| 86 | + |
| 87 | +### Prerequisites |
| 88 | +```bash |
| 89 | +# Required tools (install via package manager) |
| 90 | +sudo apt install iw wireless-tools curl # Ubuntu/Debian |
| 91 | +sudo dnf install iw wireless-tools curl # Fedora |
| 92 | +sudo pacman -S iw wireless_tools curl # Arch (NetworkManager required - not iwd compatible) |
| 93 | +``` |
| 94 | + |
| 95 | +### Installation |
| 96 | +```bash |
| 97 | +curl -s https://raw.githubusercontent.com/FrameworkComputer/linux-docs/main/Enhanced-WiFi-Analyzer/wifi_diagnostic.sh -o wifi_diagnostic.sh && clear && sudo bash wifi_diagnostic.sh |
| 98 | +``` |
| 99 | + |
| 100 | +If already downloaded, just run: |
| 101 | +```bash |
| 102 | +sudo bash wifi_diagnostic.sh |
| 103 | +``` |
| 104 | + |
| 105 | +### Quick Analysis |
| 106 | +Download and run (first time): |
| 107 | +```bash |
| 108 | +curl -s https://raw.githubusercontent.com/FrameworkComputer/linux-docs/main/Enhanced-WiFi-Analyzer/wifi_diagnostic.sh -o wifi_diagnostic.sh && clear && sudo bash wifi_diagnostic.sh |
| 109 | +``` |
| 110 | + |
| 111 | +If already downloaded: |
| 112 | +```bash |
| 113 | +sudo bash wifi_diagnostic.sh |
| 114 | +``` |
| 115 | + |
| 116 | +Then choose your option: |
| 117 | +- Option 1: Complete analysis (recommended first run) |
| 118 | +- Option 4: DFS-specific monitoring for radar interference |
| 119 | +- Option 9: Emergency fixes for immediate solutions |
| 120 | + |
| 121 | +## ποΈ Main Menu Options |
| 122 | + |
| 123 | +| Option | Feature | Use Case | |
| 124 | +|--------|---------|----------| |
| 125 | +| **1** | π― **Complete Analysis** | Full system health check with all modern features | |
| 126 | +| **2** | π¨ **Error Analysis** | Deep dive into logs and failure patterns | |
| 127 | +| **3** | π οΈ **Interactive Troubleshooting** | Guided problem-solving with custom solutions | |
| 128 | +| **4** | π‘ **DFS Channel Monitor** | Dedicated radar interference analysis | |
| 129 | +| **5** | π§ͺ **TX Power Band Test** | Diagnose power limitations and optimize range | |
| 130 | +| **6** | π‘ **Manual Band Switching** | Direct CLI commands for 2.4/5/6GHz control | |
| 131 | + |
| 132 | +## π§ Common Use Cases |
| 133 | + |
| 134 | +### **Scenario 1: Mysterious Disconnections** |
| 135 | +Symptoms: WiFi drops for 30+ seconds randomly |
| 136 | + |
| 137 | +```bash |
| 138 | +curl -s https://raw.githubusercontent.com/FrameworkComputer/linux-docs/main/Enhanced-WiFi-Analyzer/wifi_diagnostic.sh -o wifi_diagnostic.sh && clear && sudo bash wifi_diagnostic.sh |
| 139 | +``` |
| 140 | + |
| 141 | +β Choose Option 4 (DFS Monitor) |
| 142 | +Tool identifies DFS radar interference and provides non-DFS channel solutions |
| 143 | + |
| 144 | +### **Scenario 2: Slow WiFi 7 Performance** |
| 145 | +Symptoms: New WiFi 7 card performing poorly |
| 146 | + |
| 147 | +```bash |
| 148 | +curl -s https://raw.githubusercontent.com/FrameworkComputer/linux-docs/main/Enhanced-WiFi-Analyzer/wifi_diagnostic.sh -o wifi_diagnostic.sh && clear && sudo bash wifi_diagnostic.sh |
| 149 | +``` |
| 150 | + |
| 151 | +β Choose Option 1 (Complete Analysis) |
| 152 | +Tool detects 6GHz capability and recommends router upgrade/configuration |
| 153 | + |
| 154 | +### **Scenario 3: VPN Breaks WiFi** |
| 155 | +Symptoms: WiFi unstable when Tailscale/ZeroTier active |
| 156 | + |
| 157 | +```bash |
| 158 | +curl -s https://raw.githubusercontent.com/FrameworkComputer/linux-docs/main/Enhanced-WiFi-Analyzer/wifi_diagnostic.sh -o wifi_diagnostic.sh && clear && sudo bash wifi_diagnostic.sh |
| 159 | +``` |
| 160 | + |
| 161 | +β Choose Option 3 β Option 4 (VPN conflicts) |
| 162 | +Tool provides MTU optimization and split tunneling configuration |
| 163 | + |
| 164 | +### **Scenario 4: Overheating Laptop** |
| 165 | +Symptoms: High temperatures, fan noise during WiFi use |
| 166 | + |
| 167 | +```bash |
| 168 | +curl -s https://raw.githubusercontent.com/FrameworkComputer/linux-docs/main/Enhanced-WiFi-Analyzer/wifi_diagnostic.sh -o wifi_diagnostic.sh && clear && sudo bash wifi_diagnostic.sh |
| 169 | +``` |
| 170 | + |
| 171 | +β Choose Option 3 β Option 5 (thermal issues) |
| 172 | +Tool provides ASPM fixes and power management optimization |
| 173 | + |
| 174 | +## π Example Analysis Output |
| 175 | + |
| 176 | +``` |
| 177 | +π§ === ENHANCED SYSTEM INTELLIGENCE GATHERING === |
| 178 | +π§ Distribution: Fedora Linux 39 |
| 179 | +π WiFi Interface: wlp1s0 |
| 180 | +π§ WiFi Functional Status: β
WORKING |
| 181 | +π§ Hardware: MediaTek Inc. MT7925 WiFi 7 (802.11be) |
| 182 | +π Chip Analysis: |
| 183 | + Vendor: MediaTek |
| 184 | + Model: MT7925 |
| 185 | + Generation: WiFi 7 (802.11be) - 160MHz capable |
| 186 | + Known Issues: Excellent Linux support in kernel 6.8+ |
| 187 | +
|
| 188 | +π‘ === DFS CHANNEL ANALYSIS === |
| 189 | +π Regulatory Domain: US |
| 190 | +π Current Connection DFS Analysis: |
| 191 | + β οΈ Currently connected to DFS channel: 100 (5500 MHz) |
| 192 | + π― DFS Impact: Medium to High risk of disconnections |
| 193 | +π¨ Found 3 DFS/radar events in last 24 hours |
| 194 | +
|
| 195 | +π― === FINAL ANALYSIS SUMMARY === |
| 196 | +π Overall WiFi Health: Fair (DFS risk) (50/100) |
| 197 | +π§ WiFi Status: β
Working |
| 198 | +π‘ DFS Status: β οΈ Connected to DFS channel (radar risk) |
| 199 | +π WiFi 7 Features: Standard WiFi 7 |
| 200 | +
|
| 201 | +β οΈ DFS RECOMMENDATION: Switch to non-DFS channel for stability |
| 202 | +π‘ Suggested channels: 36, 40, 44, 48 (low 5GHz) or 149+ (high 5GHz) |
| 203 | +``` |
| 204 | + |
| 205 | +## π Advanced Features |
| 206 | + |
| 207 | +### **Advanced Features** |
| 208 | +- **Automatic Radar Detection**: Monitors system logs for DFS events |
| 209 | +- **Environmental Mapping**: Scans for DFS channel usage in your area |
| 210 | +- **Smart Channel Recommendations**: Suggests optimal non-DFS alternatives |
| 211 | +- **6GHz Migration Planning**: Path to DFS-free operation |
| 212 | + |
| 213 | +### **Modern VPN Support** |
| 214 | +- **Mesh VPN Optimization**: Tailscale, ZeroTier, Nebula configuration |
| 215 | +- **Commercial VPN Fixes**: NordVPN, ExpressVPN, Surfshark compatibility |
| 216 | +- **Split Tunneling**: Optimizes traffic routing for better performance |
| 217 | +- **DNS Conflict Resolution**: Fixes modern VPN DNS issues |
| 218 | + |
| 219 | +### **WiFi 7 Optimization** |
| 220 | +- **6GHz Band Access**: Identifies clean spectrum opportunities |
| 221 | +- **320MHz Channels**: Ultra-wide channel detection and recommendations |
| 222 | +- **MLO Support**: Multi-Link Operation analysis for maximum throughput |
| 223 | +- **Advanced Power Management**: Thermal optimization for high-performance cards |
| 224 | + |
| 225 | +### **Distribution Intelligence** |
| 226 | +- **Immutable Systems**: Special handling for Silverblue, Kinoite, Bluefin |
| 227 | +- **Package Manager Detection**: Uses correct commands for dnf, apt, pacman, zypper |
| 228 | +- **Firmware Management**: Distribution-specific update procedures |
| 229 | +- **Kernel Parameter Handling**: Proper GRUB vs rpm-ostree vs bootc configuration |
| 230 | + |
| 231 | +## π‘ Pro Tips |
| 232 | + |
| 233 | +### **For System Administrators** |
| 234 | +- Use Option 1 for baseline health assessment of fleet WiFi systems |
| 235 | +- Option 4 provides regulatory compliance checking for enterprise environments |
| 236 | +- Log outputs to files for trend analysis: `./wifi_diagnostic.sh | tee wifi_analysis.log` |
| 237 | + |
| 238 | +### **For Developers/Power Users** |
| 239 | +- Option 6 provides direct CLI commands for automation and scripting |
| 240 | +- All temporary fixes can be converted to permanent configurations |
| 241 | +- Regulatory domain optimization maximizes performance within legal limits |
| 242 | + |
| 243 | +### **For Gamers/Streamers** |
| 244 | +- DFS monitoring eliminates lagspikes from radar interference |
| 245 | +- 6GHz optimization provides lowest latency connections |
| 246 | +- Thermal management prevents throttling during extended use |
| 247 | + |
| 248 | +## π Troubleshooting Matrix |
| 249 | + |
| 250 | +| Symptom | Likely Cause | Tool Solution | |
| 251 | +|---------|--------------|---------------| |
| 252 | +| **Random 30s+ disconnections** | DFS radar interference | Option 4 β Non-DFS channels | |
| 253 | +| **WiFi fails after suspend** | Driver power management | Option 3 β Suspend/resume fixes | |
| 254 | +| **Slow WiFi 7 speeds** | Wrong band/channel width | Option 1 β 6GHz optimization | |
| 255 | +| **VPN breaks WiFi** | MTU/routing conflicts | Option 3 β VPN optimization | |
| 256 | +| **Overheating during WiFi** | ASPM/power management | Option 3 β Thermal fixes | |
| 257 | +| **Connection fails entirely** | Driver/firmware issues | Option 2 β Distribution fixes | |
| 258 | + |
| 259 | +## π‘οΈ Safety & Compatibility |
| 260 | + |
| 261 | +### **Safe Operation** |
| 262 | +- All temporary changes revert on reboot |
| 263 | +- Permanent changes clearly marked and reversible |
| 264 | +- No destructive operations without explicit user confirmation |
| 265 | +- Comprehensive logging for audit trails |
| 266 | + |
| 267 | +### **Broad Compatibility** |
| 268 | +- **Distributions**: Fedora, Ubuntu, Debian, Arch (NetworkManager only), openSUSE, Pop!_OS, Mint, immutable variants |
| 269 | +- **Hardware**: Intel, MediaTek, Qualcomm, Broadcom WiFi chipsets |
| 270 | +- **Standards**: WiFi 4/5/6/6E/7, 2.4/5/6GHz bands |
| 271 | +- **VPNs**: WireGuard, OpenVPN, modern mesh protocols |
| 272 | +- **Network Managers**: NetworkManager (iwd support not yet implemented) |
| 273 | + |
| 274 | +## π Future Development |
| 275 | + |
| 276 | +- [ ] iwd network manager support (currently NetworkManager only) |
| 277 | +- [ ] Integration with WiFi 8 (802.11bn) when available |
| 278 | +- [ ] Bluetooth coexistence analysis |
| 279 | +- [ ] Automated performance benchmarking |
| 280 | +- [ ] Web interface for remote diagnostics |
| 281 | +- [ ] Integration with network monitoring systems |
| 282 | + |
| 283 | +## π Related Tools |
| 284 | + |
| 285 | +### **Specialized WiFi Analysis** |
| 286 | +- **[Framework WiFi Mesh Network Analyzer](https://github.com/FrameworkComputer/linux-docs/tree/main/MeshAnalyzer#wifi-mesh-network-analyzer)** - Framework's dedicated tool for mesh network performance analysis and optimization |
| 287 | + |
| 288 | +### **When to Use Which Tool** |
| 289 | +| Scenario | Enhanced WiFi Analyzer | Framework Mesh Analyzer | |
| 290 | +|----------|----------------------|------------------------| |
| 291 | +| **General WiFi issues** | β
Primary tool | βͺ Not needed | |
| 292 | +| **DFS disconnections** | β
Specialized detection | βͺ Limited coverage | |
| 293 | +| **VPN conflicts** | β
Modern VPN support | βͺ Not covered | |
| 294 | +| **Framework + Mesh** | β
General analysis | β
Mesh optimization | |
| 295 | +| **Thermal/power issues** | β
Comprehensive | βͺ Not covered | |
| 296 | +| **Mesh performance tuning** | βͺ Basic detection | β
Specialized analysis | |
| 297 | + |
| 298 | +### **Complementary Workflow** |
| 299 | +1. **Start here** - Run Enhanced WiFi Analyzer for comprehensive system health |
| 300 | +2. **Framework + Mesh users** - Follow up with Framework's Mesh Analyzer for specialized optimization |
| 301 | +3. **Best results** - Use both tools for complete coverage of modern WiFi challenges |
| 302 | + |
| 303 | +## π Related Tools |
| 304 | + |
| 305 | +### **Specialized WiFi Analysis** |
| 306 | +- **[Framework WiFi Mesh Network Analyzer](https://github.com/FrameworkComputer/linux-docs/tree/main/MeshAnalyzer#wifi-mesh-network-analyzer)** - Framework's dedicated tool for mesh network performance analysis and optimization |
| 307 | + |
| 308 | +### **When to Use Which Tool** |
| 309 | +| Scenario | Enhanced WiFi Analyzer | Framework Mesh Analyzer | |
| 310 | +|----------|----------------------|------------------------| |
| 311 | +| **General WiFi issues** | β
Primary tool | βͺ Not needed | |
| 312 | +| **DFS disconnections** | β
Specialized detection | βͺ Limited coverage | |
| 313 | +| **VPN conflicts** | β
Modern VPN support | βͺ Not covered | |
| 314 | +| **Framework + Mesh** | β
General analysis | β
Mesh optimization | |
| 315 | +| **Thermal/power issues** | β
Comprehensive | βͺ Not covered | |
| 316 | +| **Mesh performance tuning** | βͺ Basic detection | β
Specialized analysis | |
| 317 | + |
| 318 | +### **Complementary Workflow** |
| 319 | +1. **Start here** - Run Enhanced WiFi Analyzer for comprehensive system health |
| 320 | +2. **Framework + Mesh users** - Follow up with Framework's Mesh Analyzer for specialized optimization |
| 321 | +3. **Best results** - Use both tools for complete coverage of modern WiFi challenges |
| 322 | + |
| 323 | +## π€ Contributing |
| 324 | + |
| 325 | +Contributions welcome! Areas of particular interest: |
| 326 | +- Additional chipset quirks and optimizations |
| 327 | +- Distribution-specific command improvements |
| 328 | +- VPN protocol support expansion |
| 329 | +- Regional regulatory domain data |
| 330 | +- Performance optimization techniques |
| 331 | + |
| 332 | + |
| 333 | +--- |
0 commit comments