Why connecting to wifi is such a pain in the phone

A group of computer scientists from Tsinghua University, Tencent and Tsinghua National Laboratory for Information Science and Technology have posted a first-of-its-kind paper to Arxiv, analyzing the problems that make connecting to wifi networks so achingly slow.

They worked from a data-set of 400 million sessions across 7 million access points, gleaned from the Android "Wifi Manager" app. They found that 45% of wifi connection attempts fail outright, 15% take more than 5 seconds, and 10% take more than 10 seconds.

The most common cause of delays is lags in replies to scanning requests routinely made by wifi clients to available servers. When these timeout, mobile devices start scanning all over again. The researchers designed a machine learning system to help your phone beat this dismal phenomenon and choose the most-likely-to-succeed access point from all those available (this only works if you're in an environment with multiple wifi networks that will let you connect to them).

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.

Why it Takes so Long to Connect to a WiFi Access Point? [Changhua Pei, Zhi Wang, Youjian Zhao, Zihan Wang, Yuan Meng, Dan Pei†, Yuanquan Peng, Wenliang Tang and Xiaodong Qu/Arxiv]

Why It Takes So Damn Long to Connect to a Wi-Fi Network [Michael Byrne/Motherboard]