Why phones try to stick to a WiFi for dear life?

472 viewsEngineeringOther

why do phones try to stick to a connected wifi network for dear life even though I’ve moved far from it that it’s barely useable anymore; all while I’m near another ‘remembered’ wifi network with very strong signal?

The phone knows the password of the other wifi that I’m near at, and i have set it to auto-join. But no it refuse to connect to it and prefer to hold onto where it’s last connected. I need to manually tap the other network everytime I move.

In: Engineering

9 Answers

Anonymous 0 Comments

It’s a complicated problem, and getting it wrong can have consequences.

Network connectivity is weird. You don’t know if you have it until you try. You might have strong wifi. But if a DNS server is down, or if the site you need to access is down, trying to use the network will fail. If the signal is weaker, maybe you can connect to a site, but the degraded signal introduces enough errors that slow things down you can’t get anything meaningful done.

In software, a ton of that is “abstracted”, meaning it’s hidden from the developers to make their lives a little easier. It would be very hard to write applications if they all had to be aware of all of the details happening at the TCP or UDP level (those are protocols commonly used for network communication). So a lot of times all a developer knows is “it failed” or “it took a long time”. They don’t get a lot of information about why. And on mobile devices, the developers can’t usually ask the device to change networks if things are going wrong. So they’re stuck.

What about the people who made the phone? Well, it’s still a mystery. They can tell at a low level what is happening with the network, but for many problems “the remote server is having an issue” and “I am having an issue” look identical.

They have to write code for every case. Not everybody has 2 available, joinable networks. They have to worry that a network you joined previously may have changed settings and it may be inaccessible this time. They have to worry that maybe a critical program you use doesn’t handle it if networks change while you are using it. (I’ve seen this before, where an API uses IPs to identify users and gets upset if you switch from WiFi to cellular while using it!) That would mean if it changes networks as you move around your house you’d be constantly interrupted! Finally, they have to try to avoid moving to cellular data because a lot of people still have limits and pay money for that data, and would prefer not to use it.

So while it seems like an easy problem, it’s a hard one. If the phone is too eager to change networks, some people are going to be upset because their programs get disrupted when the phone bounces between two similar-strength networks. If the phone is not eager enough, people end up in artificial dead zones. (This happens to me, my phone loves to hold my house’s WiFi until the end of the block, but the signal is so weak I can’t use it by the time I leave my driveway.) If the phone is too quick to drop WiFi, it could waste its user’s money by using cellular data when it doesn’t need to.

In short, the only way to do the “right” thing is to be you and to write a program to describe how you’d like the phone to handle the network changes. That opens up a lot of other cans of worms, as most people don’t have the tools, knowledge, or gumption to try that.

You are viewing 1 out of 9 answers, click here to view all answers.