802.11 bad signal diagnostics (Ubiquiti)
Ken’s computer was having a bad time connecting to our wifi network via 802.11n. I finally figured out it was mostly a problem with signal strength in his room, a second computer displayed the same symptoms with that same 802.11n adapter. We solved the problem by upgrading him to a 802.11ac adapter. Along the way I learned some things about WiFi signal reliability. Usual caveats applied: I’m just learning this stuff myself and am an amateur
802.11 link layer reliability
WiFi’s link layer has its own set of complex reliability stuff built in, sort of analogous to TCP but solving a different problem. That makes WiFi quite different from ethernet, which AFAIK doesn’t have any link layer stuff for handling a lost packet other than the basic collision detection logic (nearly irrelevant in modern switched networks). There’s also some rate negotiation in modern ethernet; if 1000Base-T isn’t working reliably it’ll step down to 100Base-T. But that’s about it. I think ethernet makes the assumption its link layer is basically reliable and figures it’s the upper layers’ problem (ie TCP) to deal with lost packets.
WiFi is an inherently flaky medium though. It’s expected that not all packets will get through the radio æther unmolested by gremlins. So the 802.11 link layer has a couple of mechanisms built into it for reliability.
One tool is forward error correction. The codewords broadcast on 802.11 aren’t just the bits; they’re error correcting codes capable of fixing single bit errors at varying rates. I believe in practice wifi sends anywhere from 2 bits for every 1 bit of user data to 6 bits for every 5.
A second tool is link layer retries, something a little like TCP’s retry and ACK protocol. This is called “ARQ (Automatic Repeat Request)” in what I’ve read, and basically amounts to tracking sequence numbers and resending packets when not acknowledged. I don’t know how many retries are attempted or whether retries stall the link, this article has details that suggest it’s 4 or 7 retries. But note all this retry is happening on one local wireless link, in under a millisecond. Very different from TCP’s waiting a full round trip for a retransmit.
A final important tool is speed negotiation. Much like TCP uses lost packets and ACK clocking to figure out the maximum speed, WiFi gear monitors error rates and if it sees too many, steps down to a less aggressive data rate. There’s a bunch of choices here summed up by “MCS index”; you might up the error coding from 3 in 4 to 1 in 2, or use 16-QAM instead of 64-QAM, or whatever. I don’t know much about how this works in WiFi but I imagine it’s quite subtle and different from TCP’s algorithms. This paper (I haven’t read) has a description of some of them in practice.
I enjoyed reading this paper about 802.11 reliability. A couple of tidbits I picked up.. Up to half the theoretical bandwidth on an 802.11 connection is consumed by reliability mechanisms, particularly ACKs. Also there’s a paradox that faster links seem to be more reliable. There’s a lot of potential reasons for that, from the tautology that the link is faster because it is more reliable to odd things like faster data transmits mean less time spent flying through the æther and exposed to gremlins.
So that’s the theory. WiFi is designed with a lot of tools to deal with inherently unreliable radio communication. Error correction, retries, rate negotiation, it’s doing a lot.
802.11 diagnostic tools
Despite all that magic Ken was seeing speeds of like 500 kbps on his wireless link, truly awful. The most useful tool I found for measuring this on Ken’s client was simply DSL Reports speed test. That’s testing throughput all the way to an Internet site so is not really a very good test of a local wifi link. But I verified once or twice he was seeing the same slow speed internally, and he was getting a link much slower than our Internet connection. The nice thing about the consumer speed test tool is it shows you momentary bandwidth so you can get a feel for jitter, packet loss, etc. There are many better specialist tools for testing link throughput on your local WLAN; I took the one easiest to put my hands on.
On the server side, I have a fancy UniFi network with a complex bunch of network control software I never use. Turns out it has useful reports though! See Identifying Wi-Fi Issues with Debugging Metrics.

Well that’s your problem right there. According to my UniFi access point, Ken’s computer is receiving at a rate of 1 Mbps. That’d explain the 528 Kbps throughput. Yuck! I never could figure out why it was that low though. Or why it never seemed to increase again, the adapter went to lowest common denominator and got stuck there.
Another useful set of graphs buried in UniFi’s tool are time series charts of the AP’s performance. Graphs like this:

Note that’s a graph from when things are mostly going OK, I don’t have a picture of the problem. But at the time it was not working well the 2Ghz band was showing 80% channel utilization; all for Ken’s crappy 1 Mbps stream. And also lots of dropped and retried packets. Bad news.
I did very the same 802.11n adapter on a second computer also sucked in the same room; so it seemed to be the adapter, not the computer. But 802.11ac was fine. So the solution was simple, spend $25 on a decent wifi adapter and be done with it.