Skip to content

Fix Slow Wi-Fi with Claude Code

Category Creative & Real-World AI Builds
Status ๐ŸŸก Partially completed
Repo nextwork-fix-slow-wi-fi-with-claude-code
Original NextWork guide nextwork.ai

Learning project

Practice work following a NextWork guide, separate from my production projects.

๐Ÿ“š NextWork learning project. This is a practice project I built while working through NextWork's Fix Slow Wi-Fi with Claude Code guide. It is part of my Learning portfolio and is fully separate from my production projects.

Category: Learning โ€บ Creative & Real-World AI Builds
Status: ๐ŸŸก Partial

Overview

A slow-Wi-Fi fix should be measured, not guessed. I logged a baseline, backed up the router config, changed one setting at a time with a browser script that reads each value back, and kept only changes that moved the median. A retest from the worst room then split what configuration fixed from what only coverage can fix.

Summary

Ran the whole measure โ†’ audit โ†’ one-change-at-a-time loop in a Linux lab, using my own meter, browser script and write-up. A mock "LabNet AX1800" admin page runs in one network namespace and the 'laptop' in another, and downloads are paced by a rate model of the Wi-Fi settings. The meter logs every run to wifi-results.csv. A headless-Chromium session logged in, exported the config before any change, and read back every save. Three proposals: legacy b/g โ†’ All took the desk from 12.1 to 39.7 Mbps, and enabling 5 GHz took it to 402.4. Channel Auto made no difference at the desk and was reverted, but the bedroom retest (secret mission) showed it lifting 21.9 โ†’ 33.7 Mbps, so it went back on. What's left in the bedroom is coverage. Partial because there's no real router, Wi-Fi, Mac or Claude Code with Chrome.

The checks behind this are in docs/verification.txt.

Skills & tools

Python, Playwright (headless Chromium), Linux network namespaces, Wi-Fi configuration, Controlled experiments

What I built

  • tools/wifi_meter.py: runs networkQuality, parses the download figure itself, appends time/label/Mbps to wifi-results.csv, and prints the median of N runs in a banner.
  • tools/router_session.mjs: logs in by typing the admin password from ~/.nw-wifi/router-password (never printed), and either audits (screenshot, config export to backups/, settings as JSON) or sets one field and reads it back from the page.
  • lab/: lab.sh (namespaces nwwr/nwwc on 192.168.60.x), router_app.py (mock admin UI plus a /blob download paced by a shared token bucket), radio_model.py (settings + location โ†’ rate; see docs/lab-truth.md), and fakebin/networkQuality (a download-only stand-in).
  • docs/problem-statement.md, docs/router-audit.md (five setting areas, three reversible proposals), REPORT.md (before/after, what was kept with old values, what was reverted, rollback steps), and docs/router-change-log.jsonl.
  • Evidence: docs/experiments-run.txt, docs/secret-mission-run.txt, wifi-results.csv (21 runs), backups/*.json (before and after), screenshots/*.png.

How to run

lab/lab.sh up                                        # needs sudo for ip netns
lab/lab.sh run python3 tools/wifi_meter.py "before (desk)" --runs 3
lab/lab.sh run node tools/router_session.mjs audit
lab/lab.sh run node tools/router_session.mjs set mode_24ghz "All (b/g/n/ax)"
lab/lab.sh location bedroom
lab/lab.sh down

Verification

I ran the verification command on 2026-12-02. The full output is in docs/verification.txt.

python3 -m py_compile tools/wifi_meter.py lab/radio_model.py lab/router_app.py && node --check tools/router_session.mjs && python3 -c "import csv,statistics as s;r=list(csv.DictReader(open('wifi-results.csv')));m=lambda l:s.median(float(x['download_mbps']) for x in r if x['label']==l);assert len(r)==21;assert m('before (desk)')<15<m('exp1 radio mode all (desk)')<50<m('exp2 5ghz on (desk)');assert m('after (bedroom)')<m('bedroom channel auto');print('medians',m('before (desk)'),m('exp2 5ghz on (desk)'),m('after (bedroom)'),m('bedroom channel auto'))" && test $(ls backups/*.json | wc -l) -eq 2 && test $(grep -c '\"ok\":true' docs/experiments-run.txt docs/secret-mission-run.txt | awk -F: '{s+=$2} END {print s}') -eq 7 && echo WIFI OK

Notes

The meter and browser script are my own code; I didn't use the guide's script. Times in screenshot and backup file names are UTC (05:55 UTC = 23:55 CT on 2 Dec). I wrote the lab's rate model before running the experiments, so this demonstrates the method rather than a blind diagnosis.

What isn't done, and why

No real router, Wi-Fi radio or Mac: the router is a mock admin page, the link is a veth pair between namespaces, throughput is paced in the app (this kernel has no tc qdiscs), and networkQuality is a download-only stand-in. Claude Code with Chrome wasn't used, so the browser session is my own Playwright script and the audit and report are my own.


Original project: https://nextwork.ai/projects/991c3210-71aa-4e2e-a745-ea9081d0533a ยท Part of my NextWork Learning portfolio (hub).

Verification output

From docs/verification.txt:

$ python3 -m py_compile tools/wifi_meter.py lab/radio_model.py lab/router_app.py && node --check tools/router_session.mjs && python3 -c "import csv,statistics as s;r=list(csv.DictReader(open('wifi-results.csv')));m=lambda l:s.median(float(x['download_mbps']) for x in r if x['label']==l);assert len(r)==21;assert m('before (desk)')<15<m('exp1 radio mode all (desk)')<50<m('exp2 5ghz on (desk)');assert m('after (bedroom)')<m('bedroom channel auto');print('medians',m('before (desk)'),m('exp2 5ghz on (desk)'),m('after (bedroom)'),m('bedroom channel auto'))" && test $(ls backups/*.json | wc -l) -eq 2 && test $(grep -c '\"ok\":true' docs/experiments-run.txt docs/secret-mission-run.txt | awk -F: '{s+=$2} END {print s}') -eq 7 && echo WIFI OK

medians 12.1 402.4 21.9 33.7
WIFI OK

[exit code 0]