I have already confessed I was flying recently (albeit only in German). What was new versus the last time I've been in a plane five years ago: Not only did wifi signals apparently no longer confuse the aircraft's navigation systems but there was actually an onboard wifi network with no less than seven access points within my machine's range.
Somewhat surprisingly, I had a hard time getting a connection that would not break after a few seconds. I'll confess that's not the first time I've had trouble connecting to fancy networks recently, where the syslog contained cryptic messages like:
kernel: wlan0: deauthenticated from <redacted> (Reason: 252=<unknown>) kernel: wlan0: disassociated from <redacted> (Reason: 1=UNSPECIFIED)
In all these cases, there were a lot of access points with the same ESSID around, and so I suspect whatever selects the access points is currently broken on my machine; it chooses really weak access points and then gets badly mangled signals. While I'm waiting for this to heal by itself, I am resorting to manually picking and pinning the access points. In case you use ifupdown to manage your wifi, perhaps this little story is useful for you, too.
The first part is to pick an access point. To do that, I ignore the warning of the authors of iw (from the eponymous package) not to parse its output and run:
sudo iw wlan0 scan | egrep "^BSS|signal: .*dBm|SSID:"
Well, in non-plane situations it's wise to get the SSIDs, too, so you see which APs actually are for the network you want to join. Hence, I've updated the grep in the command line above.
The output of this looked like this on the plane I was in:
BSS 00:24:a8:83:37:93(on wlan0) signal: -68.00 dBm BSS 00:24:a8:ac:1d:93(on wlan0) signal: -41.00 dBm BSS 00:24:a8:83:37:82(on wlan0) signal: -62.00 dBm BSS 00:24:a8:ac:1d:82(on wlan0) signal: -48.00 dBm BSS 00:24:a8:83:37:91(on wlan0) signal: -60.00 dBm BSS 00:24:a8:83:76:53(on wlan0) signal: -76.00 dBm BSS 00:24:a8:83:77:e2(on wlan0) signal: -82.00 dBm
The things after the “BSS” are the MAC addresses of the access points, the numbers after signal is some measure for the power that reaches the machine's antenna from that access point, where less negative means more power. So, with the above output you want to pick the access point 00:24:a8:ac:1d:93.
With ifupdown, you do that by editing the stanza for that Wifi and add a wireless-ap line; for me, this then looks like:
iface roam inet dhcp wireless-essid Telekom_FlyNet wireless-ap 00:24:a8:ac:1d:93
– and this yields a stable connection.
|||Ah wait… now that I think again, I seem to remember that during one of my last sinful travels there has already been a plane that had on-board Wifi. But it certainly is a nicer story with the little lie of news when coming back after five years.|
|||Since “dBm” stands for „decibel milliwatt“, you could compute that power as 10s ⁄ 10 W. I'd not trust the absolute numbers, as they would indicate here that one access point is a factor of ten thousand stronger than another one, which sounds implausible primarily because I'd be surprised if the circuitry of the Wifi card could deal with such a high dynamic range. And “I'm getting 0.0001 milliwatts from the AP“ is a statement in dire need of interpretation anyway (e.g., “in the carrier? Bolometric?”). But let's not go there.|