A comprehensive Python package for WiFi configuration, diagnostics, speed testing, and automated troubleshooting on Windows.
Project description
WiFiDoctorCHS
A comprehensive Python package for WiFi configuration, diagnostics, speed testing, and automated troubleshooting on Windows.
WiFiDoctorCHS gives you full control over your WiFi -- scan networks, connect/disconnect, manage saved profiles, run diagnostics, test speed, and automatically fix common problems. Works as both a Python library and a command-line tool.
Features
| Feature | Description |
|---|---|
| Network Scanning | Scan for available WiFi networks with signal strength, security, channel, and band info |
| Connection Management | Connect, disconnect, and reconnect to WiFi networks |
| Profile Management | List, view, export, import, and delete saved WiFi profiles |
| Password Retrieval | View saved WiFi passwords (requires admin) |
| Network Diagnostics | Ping, DNS resolution, gateway, internet connectivity, traceroute, port checks |
| Speed Testing | Download/upload speed tests with latency measurement |
| Adapter Management | Enable, disable, reset WiFi adapter |
| DNS Management | Compare DNS servers, switch to Google/Cloudflare DNS |
| Doctor Mode | Auto-diagnose and fix common WiFi problems |
| Network Reset | Flush DNS, release/renew IP, reset TCP/IP, reset Winsock |
Installation
pip install wifidoctorchs
Or install from source:
pip install -e .
With development dependencies:
pip install -e ".[dev]"
CLI Usage
After installation, the wifidoctorchs command is available:
Scan for Networks
wifidoctorchs scan
Check Connection Status
wifidoctorchs status
Connect to a Network
wifidoctorchs connect "MyNetwork"
wifidoctorchs connect "MyNetwork" --password "mypassword"
Run Diagnostics
wifidoctorchs diagnose
Doctor Mode (Diagnose + Auto-Fix)
wifidoctorchs doctor # Diagnosis only
wifidoctorchs doctor --auto-fix # Diagnose and fix
wifidoctorchs doctor --auto-fix --speed-test # Full exam with speed test
Speed Test
wifidoctorchs speedtest
Manage Profiles
wifidoctorchs profiles # List profiles
wifidoctorchs profiles --passwords # List with passwords (admin)
wifidoctorchs password "MyNetwork" # Get specific password
wifidoctorchs export --folder ./backup # Export all profiles
DNS Tools
wifidoctorchs dns # Compare DNS servers
wifidoctorchs dns --set google # Switch to Google DNS
wifidoctorchs dns --set cloudflare # Switch to Cloudflare DNS
wifidoctorchs dns --set auto # Reset to DHCP DNS
Network Reset
wifidoctorchs flush-dns # Flush DNS cache
wifidoctorchs reset --dns # Flush DNS
wifidoctorchs reset --ip # Release/renew IP
wifidoctorchs reset --adapter # Reset WiFi adapter
wifidoctorchs reset --all # Full network reset
Traceroute
wifidoctorchs traceroute 8.8.8.8
wifidoctorchs traceroute google.com --hops 20
Adapter Info
wifidoctorchs adapter # Show adapter info
wifidoctorchs adapter --reset # Reset adapter
wifidoctorchs adapter --disable # Disable WiFi
wifidoctorchs adapter --enable # Enable WiFi
Python Library Usage
import wifidoctorchs as wifi
# -- Scan Networks --
networks = wifi.scan_networks()
for net in networks:
print(f"{net.ssid}: {net.signal_strength}% {net.signal_bars} ({net.security.value})")
# -- Connection Status --
status = wifi.get_current_connection()
if status.is_connected:
print(f"Connected to: {status.ssid}")
print(f"Signal: {status.signal_strength}%")
print(f"IP: {status.ip_address}")
# -- Connect / Disconnect --
wifi.connect("MyNetwork", password="mypassword")
wifi.disconnect()
wifi.reconnect()
# -- Profiles --
profiles = wifi.list_profiles()
password = wifi.get_profile_password("MyNetwork")
# -- Diagnostics --
results = wifi.run_all_diagnostics()
for r in results:
print(f"{r.test_name}: {r.status.value} -- {r.message}")
# -- Individual Tests --
ping = wifi.ping_test("8.8.8.8")
print(f"Ping: {ping.avg_ms}ms, Loss: {ping.loss_percent}%")
dns = wifi.dns_test("google.com")
print(f"DNS: {dns.resolution_time_ms}ms")
# -- Speed Test --
speed = wifi.run_speed_test()
print(f"Download: {speed.download_mbps} Mbps")
print(f"Upload: {speed.upload_mbps} Mbps")
# -- Doctor Mode --
report = wifi.diagnose()
print(f"Health: {report.overall_health}")
print(f"Issues: {report.issue_count}")
# Auto-fix (requires admin)
report = wifi.auto_fix()
for fix in report.fixes_applied:
print(f"{fix.issue_title}: {fix.status.value}")
# -- Quick Check --
print(wifi.quick_check()) # "Healthy -- MyNetwork (85% signal, 12ms latency)"
Doctor Mode -- What It Fixes
| Problem | Detection | Auto-Fix |
|---|---|---|
| No WiFi adapter | Adapter not found | Enable adapter |
| Disconnected | No active connection | Reconnect to saved network |
| Very weak signal | Signal < 20% | Suggest stronger networks |
| Can't reach router | Gateway ping fails | Reset adapter, renew IP |
| No internet | Can't ping 8.8.8.8 | Flush DNS, reset TCP/IP, reset adapter |
| DNS failing | Can't resolve domains | Flush DNS, switch to Google DNS |
| Slow DNS | Resolution > 500ms | Switch to faster DNS server |
| DHCP issue | No IP or APIPA address | Release/renew DHCP |
| IP conflict | 169.254.x.x address | Release/renew IP, reset adapter |
Requirements
- Python 3.9+
- Windows 10/11
- Administrator privileges required for: connecting, adapter management, DNS changes, auto-fix
License
MIT License -- see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wifidoctorchs-1.0.0.tar.gz.
File metadata
- Download URL: wifidoctorchs-1.0.0.tar.gz
- Upload date:
- Size: 41.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f83498134943db13c492e02cb7796d9ee05756ebf748b212db2c15cea4a58abe
|
|
| MD5 |
83af0c6511e47deb36a003f4e61dc8a4
|
|
| BLAKE2b-256 |
adf3495a6b393b92e9bad2ddca7c6418f9d21c71258a1ebb850df271adb70076
|
File details
Details for the file wifidoctorchs-1.0.0-py3-none-any.whl.
File metadata
- Download URL: wifidoctorchs-1.0.0-py3-none-any.whl
- Upload date:
- Size: 41.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
648a93432ddaee9d92bad8d1f8b688028051363ddde755a7268a444014bb9a42
|
|
| MD5 |
9ea17916c9902fef0c6d0da85aba3427
|
|
| BLAKE2b-256 |
a87cadaa25ddaee759c8762f273a7bc4840d3156f3b85abc2d486f27b3e58131
|