Researchers offer an explanation for and solution to that annoying wait for an access point to actually connect.
It's supposed to be seamless. So much mobile technology is premised on the idea that moving between networks—cellular to Wi-Fi, Wi-Fi to Wi-Fi, cellular to cellular—is a more or less invisible process. We, as consumers, are then free to interact with the cloud as intended—as an extension of mobile devices that's all but necessary for them to operate at all. The whole cloud idea becomes compromised when our devices start fumbling network connections. Which happens kind of a lot.
You surely know the feeling of waiting for a connection. You've picked a Wi-Fi access point to connect to, but your device is just hanging there in limbo. It's frustrating for the reason above—not being connected means not having access to most of the functionality of your device. Most of your apps rely on some cloud functionality; your music and video is streamed from the cloud; GPS relies on downloading maps from the cloud. So, why does it sometimes take so damn long to get a connection?
As it turns out, engineers don't really know. Compared with network performance metrics like throughput and latency, the time spent actually waiting around while connecting to a network hasn't been studied much. A group of researchers led by Chinese computer scientist Changhua Pei is on the case, however, and they even have a new machine learning-based strategy that could dramatically improve connection times. Their work is described in a paper posted earlier this month to the arXiv preprint server: "Why it Takes so Long to Connect to a WiFi Access Point?"
Data to study this question is plentiful. Pei and colleagues looked at connection data culled from five million mobile users from four representative cities who connected to seven million access points for a total of 400 million Wi-Fi sessions. The dataset came courtesy of the popular Android/iOS "WiFi Manager" app and is detailed enough to provide information about the various sub-phases underlying the connection process.
First off, the process of connecting to Wi-Fi is as crappy as you think it is. As many as 45 percent of connections result in failures, while 15 percent require setup times of longer than five seconds. Five percent of connections will take more than 10 seconds.
Excessive connection time is burned mostly in the "scan" phase of the connection process. Basically, your mobile device is continuously updating an internal list of theoretically reachable Wi-Fi networks, and, periodically, it will send out probe data packets that, among other things, ask local networks what their current physical data rates are. If a given access point is found to be compatible with the device, it gets added to the list. This phase is responsible for 45 percent of connection times that exceed 15 seconds.
The reason for this is that mobile devices in the scanning phase are always getting kicked backwards to the initial "disconnected" phase, which means having to restart the scan. This occurs when the device gets no responses from its probe packets at all. This can happen even when there are in fact reachable access points within range. Sometimes packets just get lost—it happens. And in a perfect storm of packet loss, a not-infrequent occurrence, the device will interpret the silence as a straight-up absence of access points. It disconnects and then starts the scanning process again. This is what's going on as your phone stalls out in the frozen food aisle as you're trying to get onto whatsgoodattraderjoes.com.
This is a valuable insight in itself, but Pei wanted to take things further—he wanted to solve the problem itself. So, his group came up with a machine learning algorithm that can take all of this data and apply it in such a way to minimize connection times. They write: "Based on the measurement analysis, we develop a machine learning based [access point] selection strategy that can significantly improve WiFi connection set-up performance, against the conventional strategy purely based on signal strength, by reducing the connection set-up failures from 33 percent to 3.6 percent and reducing 80 percent time costs of the connection set-up processes by more than 10 times."
This comes with a cost, however. The classification of access points into "slow" and "fast" pools ultimately results in fewer total access points available to devices when the slow connections are omitted. You can imagine being in an airport or mall or somewhere where there's a lot of access points, but really only one of those matters to you the consumer because that's the network you happen to have access to because you're a Platinum Club member or T-Mobile customer or whatever. In that situation, you're completely at the mercy of the access point, machine learning algorithm or not.