I saw that Android system has a bad behavior with Wifi roaming. We have a Wifi centralized network with many AP with a signle SSID. The Adroid Phones wont roams seamlessly. An Android Phone tries to stay connected to an AP until the signal reaches zero even if there are others AP (with the same SSID) with a good signal! When the signal is zero, finally it performs an assosiation to another AP (with a good signal). But with this behavior the phone loses all the TCP Connections!
For example:
- the phone is connected in WiFi to AP1
- the phone moves in the building and now hears two signals from AP1 and from AP2.
- When the signal form AP2 is stronger than the signal from AP1, i want that the phone do a reassosiation (not an assosiation) to AP2.
The idea is:
- Perform a
WifiManager.startScan()
- Get the results
WifiManager.getScanResults()
- Find the best AP in the results
- Perform a reassosiation to the best AP
Repeat every 30 seconds.
I talk about reassosiation because i don't want that the phone loses the TCP Connections.
There is a way to do this ?
Thank you, Salvo
You cannot do this as you describe. A client cannot determine the state of the TCP connection on it's own. Your network must also move the communication channel from one AP to another. This can be done with the right network controllers.
Also, you should look at IEEE 802.11k - https://en.wikipedia.org/wiki/IEEE_802.11k-2008
Add below permissions;
Register for below intent;
Then in routine;
Use the below class to change the reassociation;