Every Wi-Fi scanner gives you a wall of numbers: RSSI, noise, SNR, channel, width, PHY, security. The moment you have more than three networks, the wall stops being useful. A network at -46 dBm can be worse than one at -58 dBm if it sits on top of four neighbours in a 40 MHz channel.
LanFi is a native macOS analyzer I built around one idea: collapse the wall into a score from 0 to 100, then explain what produced it. This post is the scoring model, without marketing.
The five inputs
The score uses five signals that are available from public CoreWLAN APIs:
- RSSI — how strong the network is at the Mac.
- Noise — the noise floor on the current channel.
- SNR — signal minus noise, computed rather than read.
- Channel overlap and utilization — how much of the channel is already busy.
- Security — open, WEP, legacy WPA, WPA2/WPA3, PMF, WPS.
Each input is normalised to 0..1 with a curve, not a linear scale. dBm is logarithmic, so a linear map makes -40 and -50 look almost identical, while the real difference in stability is large. The curves are capped at plausible edges and clamped, so a missing metric can be dropped instead of poisoning the result.
Why the weights are dynamic
If a scan cannot read noise (some adapters and some macOS versions return nothing useful), SNR disappears. Rather than treating the missing value as zero, LanFi drops that component and renormalises the remaining weights. The score stays comparable: it is always "the best estimate from what we could measure".
The same applies to channel utilization on 6 GHz, where the driver exposes less information than on 2.4 and 5 GHz.
From numbers to a score
Each component produces a 0..1 value:
- RSSI: about -90 dBm maps to 0, -50 dBm to 1, with a soft knee around -67.
- SNR: 0 dB maps to 0, 40 dB to 1; 25 dB is already a good link.
- Overlap: fraction of the channel width occupied by other networks, inverted.
- Utilization: airtime already in use, inverted.
- Security: WPA3/PMF highest, WPA2 next, open/WEP lowest, WPS penalised.
The weighted sum is multiplied by 100 and rounded. In the UI you can open the breakdown and see each component, so the number is never a black box.
Picking a channel
A score is diagnostic; a channel recommendation is actionable. For each band LanFi ranks every channel by:
- how many other networks overlap it, weighted by their signal;
- measured utilization where available;
- DFS state (marked, not hidden);
- supported widths (20/40/80/160 MHz);
- regulatory constraints from the current country code.
The best channel is not always the empty one: a 160 MHz channel with one weak neighbour can beat a clean 40 MHz channel for throughput, while the opposite is true for stability. The recommendation shows the trade-off instead of pretending there is one right answer.
Security is part of quality
A fast network with WPS enabled and no PMF is not a good network. The audit flags:
- open and WEP networks;
- WPA/TKIP downgrades;
- WPS enabled;
- missing PMF (802.11w);
- evil-twin heuristics — same SSID with a different BSSID and security configuration;
- DNS and IPv6 leaks on the connected network.
Each finding gets a severity and a fix hint. The goal is not a scary red screen; it is a list of things you can change on the router in five minutes.
Everything local
LanFi has no account, no telemetry and no cloud. Scans, scores, history and heat maps stay on the Mac. The OUI database ships inside the app, so vendor lookup works offline. Updates are signed with Sparkle and served from GitHub Releases.
The source is available under FSL-1.1-ALv2; the app is free.
Scripting it
The app ships lanfi-cli, so the same scan can run in a script:
lanfi-cli scan --json > scan.json lanfi-cli score --input scan.json There is also an MCP server for agents that need network context, and a URL scheme (lanfi://tab/protocols) for shortcuts.
Try it
- Site: https://zheltukheen.github.io/lanfi/
- GitHub: https://github.com/zheltukheen/lanfi
- Install:
brew install --cask lanfi
If you build something similar, the interesting part is not the formula — it is deciding what to drop when the data is incomplete, and showing the user why the number moved.

