FIX for Wifi-Roaming-bug

Search This thread

felixchris

Senior Member
May 20, 2012
143
66
Konstanz
OnePlus 3
This thread is about the 3 types of known wifi-roaming bugs, how to differentiate these and fix at least one of them with a little hack.

Documentation of the bug avioded by this workaround on Google: Click Here

BIG NEWS!! As mentioned by a spanish user above there are newer firmwares, that are correcting the wifi-roaming bug, that was fixed by this fix.

Confirmed by an german OTA-Update. So try upgrading your firmware to fix the bug.

But : Keep in mind that an OTA-Update, official from Samsung wont install on a modified system. This includes also our modified wpa-supplicant. So if you want to use a newer firmware you have to restore the old wpa-supplicant: View attachment wpa_supplicant.zip(From The newest Firmware in Germany[OTA-Eplus, JZO54K.I9300XXELL4)

General facts to know about buggy Wifi-Roaming on Android Devices:


Bugs types that are existing
1.The phone never tries to roam by, unless it completely loses signal. Then it connects to the strongest AP. This is the typical Galaxy S2 bug.

2.The phone never tries to roam, and on top of that tries to reconnect to the specific AP that it knows, even if it is right next to a better one while connecting. This has been observed on some Nexus devices, but is apparently fixed on the Galaxy Nexus running CM10.

3.The phone tries to roam as it can see a better AP, but drops the connection and reconnects to the stronger AP shortly after. That's the typical Galaxy S3 and Galaxy Nexus bug, which is fixed by the hack described in this thread.



Only Bug 3 in this list is fixed by this hack. It will not help for the other two bugs!

To determine which bug you are observing, try this:

- Pick two access points that are within range of each other, we will call them AP1 and AP2.

- Locate the phone close to AP1, turn on wifi, and connect to the network. You should get full signal strength.

- Start listening to a web radio stream using e.g. TuneIn Radio (available on Play Store), configure the buffer size to the minimum possible.

- Slowly walk towards AP2, watching the signal strength indicator.

- If you reach AP2 and the phone still shows a low signal strength (at most one bar) after 10-20 seconds:
You are observing a different bug which is not avoided by this workaround.

- Turn off wifi and turn it back on again.

- If the phone now connects to AP2 and shows a high signal strength, you are observing the Galaxy S2 bug --> Bug 1 in the list

- If the phone still connects to AP1 and shows a low signal strength, you are observing the Nexus bug --> Bug 2 in the list

- If the connection drops before getting close enough to AP2, the access points are too far away from each other. -->Retry with a different set of access points.

- If the signal strength seems to increase while getting closer to AP2, but then the wifi icon disappears briefly and comes back after a few seconds, and the web radio stream drops, you are observing the Galaxy S3 bug, and this workaround will help you. --> Bug 3 in the list

- If the signal strength increases while getting closer to AP2, the wifi icon doesn't disappear, and the web radio stream doesn't drop, everything is working normally --> no bug:
-You might have a device that just doesn't have a wifi bug. Apparently such devices indeed exist.
-You might have a Galaxy S3 or Galaxy Nexus, but you were lucky. Try walking back to AP1 and check if it drops the connection this time.
-You might have already applied the workaround above, or a different fix for the same bug. (However there doesn't seem to be one yet.)

______________________________________________________________________________________________________________________

Now as you know which bug your device has you maybe have noticed that your device has bug type 3, here is the hack to fix it:​


IMPORTANT: IM NOT RESPONSIBLE FOR NOT WORKING DEVICES AFTER THIS PROCEDURE. INSTALL AT YOUR OWN RISK!! THIS MOD IS EXPERIMENTAL!!

THIS MOD ONLY IS CONFIRMED WORKING FOR THE SAMSUNG GALAXY i9300 AND THE SAMSUNG GALAXY NEXUS i9250




For the installation procedure i give here root rights are needed. It also is recommended to make a CWM-Backup before. If you are unsure about root rights or dont know how to use a Custom Recovery feel free to ask before you do anything.

Installation Instructions for the Standalone-file(no Custom-Recovery needed):

1. Download View attachment Standalone-file.zip and unzip


2. Search for your original "wpa_supplicant"-file in \system\bin.

You can use any Explorer that offers root-acess but be sure you set the permissions to rwx r-x r-x if you use another file explorer as i mentioned. It is needed for the file to have the permission to be executed

(f.e. Root Browser Lite)

3. Copy your original "wpa_supplicant"-file to any location you will remember in case anything goes wrong.

4. Delete the original "wpa_supplicant"-file from the folder

5. Paste the modified "wpa_supplicant"-file downloaded from here in \system\bin. Make sure the file still is named "wpa_supplicant"

6. Reboot your device


Installation Instructions for CWM Flashable-file(CWM-Recovery needed):

1. Download View attachment 1549825

2. Copy the downloaded file to your sdcard.

3. Search for your original "wpa_supplicant"-file in \system\bin.

You can use any Explorer that offers root-acess but be sure you set the permissions to rwx r-x r-x if you use another file explorer as i mentioned. It is needed for the file to have the permission to be executed

(f.e. Root Browser Lite)

4. Copy your original "wpa_supplicant"-file to any location you will remember in case anything goes wrong.

5. Reboot to recovery and flash the downloaded file.

6. Reboot your device.



Your device should now roam correctly from one AP to another.

Please leave your feedback here in the thread and hit the thanks-button if it fixed your problem. ENJOY ;)

FOR ADDITIONAL INFO: Click Here
______________________________________________________________________________________________________________________

Special Thanks to:

- TheSeven, who created this hack
- querty12, who created the flashable CWM-file
- Gabeloooooo, who was the first to give me feedback about this
 
Last edited:

felixchris

Senior Member
May 20, 2012
143
66
Konstanz
OnePlus 3
Yeah thats the Main Problem with this.
Also Streaming apps, spotify and so on suffer from this issue

I will add the modified wpa_supplicant to replace with the old on soon :)
 

Gabeloooooo

Senior Member
Jul 4, 2012
157
21
Tried it, breaks wifi. Can't enable wifi anymore. (i9300 stock 4.1.1)

And oddly enough, restoring the old file back to system\bin doesnt fix it. Will do a couple of tests than will restore from nandroid.

Ok, the reason it didn't work is permissions. Copying using ES explorer did not give the execute permission. Now both files allow me to enable wifi. Will report back on AP roaming after using for a while.
 
Last edited:

felixchris

Senior Member
May 20, 2012
143
66
Konstanz
OnePlus 3
Thanks for your feedback Gabeloooooo :)

Can you please, after finishing your tests, tell me which permissions you did to set ? as i can mentione it in the instructions ;)
i only tested with root browser...
 

Gabeloooooo

Senior Member
Jul 4, 2012
157
21
Things seem MUCH better with this fix. It is no longer constantly disconnecting. MAJOR IMPROVEMENT!!

I haven't tested groove ip yet, too many bad experiences in the past, but will try it this week to see how it fares.
 
Last edited:
  • Like
Reactions: felixchris

felixchris

Senior Member
May 20, 2012
143
66
Konstanz
OnePlus 3
So maybe if you like the world you could drag it out to the SGS3 - World as i am normally focused on the SGSL- Forums ;) But thanks gor the feedback

Sent from my GT-I9003 using xda app-developers app
 

usb7

Senior Member
Aug 7, 2010
141
21
Will this work on the LG Nexus 4?
It has a Murata SS2908001 802.11 a/b/g/n Wi‐Fi and Bluetooth module according to ifixit.
 

felixchris

Senior Member
May 20, 2012
143
66
Konstanz
OnePlus 3
Will this work on the LG Nexus 4?
It has a Murata SS2908001 802.11 a/b/g/n Wi‐Fi and Bluetooth module according to ifixit.

First of all: Has the Nexus 4 really this bug?

if yes, there is a chance that it will work as the problem comes from google code itself, so basically every device can have that problem if they dont do anything against.

But this fix isnt a real fix, it an provisoric hack, that solves the problem ;)

So for now its only confirmed working on Samsung SGS 3 and Samsung GN. I recommend just install it according to the instructions and you see if it changes anything. If not revert back ;)
 

Jard16

New member
Dec 7, 2012
4
2
Silver Spring, MD
First of all: Has the Nexus 4 really this bug?

if yes, there is a chance that it will work as the problem comes from google code itself, so basically every device can have that problem if they dont do anything against.

But this fix isnt a real fix, it an provisoric hack, that solves the problem ;)

So for now its only confirmed working on Samsung SGS 3 and Samsung GN. I recommend just install it according to the instructions and you see if it changes anything. If not revert back ;)

Hello, brand new to Android and the forum and I was referred here by a thread on code.google.com. The id=22575 (I can't post a direct link).

I can confirm I have the bug on a Nexus 4 with Android 4.2.1.

My home network has 2 different APs with the same SSID and same security. There is a "primary" AP and a wireless repeater, both running DD-WRT. My Nexus 4 will only connect to the primary AP. Even if I forget the network and attempt to connect to the repeater standing inches away from it, the Nexus 4 still associates with the primary AP.

Thank you!
 

drewski_1

Senior Member
Jul 20, 2012
3,828
1,602
SF Bay Area, CA
Hello, brand new to Android and the forum and I was referred here by a thread on code.google.com. The id=22575 (I can't post a direct link).

I can confirm I have the bug on a Nexus 4 with Android 4.2.1.

My home network has 2 different APs with the same SSID and same security. There is a "primary" AP and a wireless repeater, both running DD-WRT. My Nexus 4 will only connect to the primary AP. Even if I forget the network and attempt to connect to the repeater standing inches away from it, the Nexus 4 still associates with the primary AP.

Thank you!

did this fix work on your Nexus 4?
 

Jard16

New member
Dec 7, 2012
4
2
Silver Spring, MD
did this fix work on your Nexus 4?

I will have to try it some time next week when I learn enough to actually apply it. Again, this is my first Android phone so this is all very new to me. :D

My workaround was to install another AP using a different SSID and use the app 'Best WiFi' to force switch when the signal drops too low. I just got the phone yesterday.
 

felixchris

Senior Member
May 20, 2012
143
66
Konstanz
OnePlus 3
SGS2 and Nexus4

I was pointed to this thread from SGS2 forum... http://xdaforums.com/show...9&postcount=41

Now I read, that this is only for SGS3...

Is there any possibility that this will work on SGS2?

The SGS2 also had problems with WifiRoaming, but they were different as far as i know. This fix shouldnt work for the Galaxy S2.

Quote:
Originally Posted by drewski_1 View Post
did this fix work on your Nexus 4?
I will have to try it some time next week when I learn enough to actually apply it. Again, this is my first Android phone so this is all very new to me.

My workaround was to install another AP using a different SSID and use the app 'Best WiFi' to force switch when the signal drops too low. I just got the phone yesterday.

I dont know of what kind the bug of the Nexus 4 is. So i dont know if it will fix anything. As posted above you can just install it and see if it changes anything ;) Be sure to follow the instructions and BACKUP!!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    This thread is about the 3 types of known wifi-roaming bugs, how to differentiate these and fix at least one of them with a little hack.

    Documentation of the bug avioded by this workaround on Google: Click Here

    BIG NEWS!! As mentioned by a spanish user above there are newer firmwares, that are correcting the wifi-roaming bug, that was fixed by this fix.

    Confirmed by an german OTA-Update. So try upgrading your firmware to fix the bug.

    But : Keep in mind that an OTA-Update, official from Samsung wont install on a modified system. This includes also our modified wpa-supplicant. So if you want to use a newer firmware you have to restore the old wpa-supplicant: View attachment wpa_supplicant.zip(From The newest Firmware in Germany[OTA-Eplus, JZO54K.I9300XXELL4)

    General facts to know about buggy Wifi-Roaming on Android Devices:


    Bugs types that are existing
    1.The phone never tries to roam by, unless it completely loses signal. Then it connects to the strongest AP. This is the typical Galaxy S2 bug.

    2.The phone never tries to roam, and on top of that tries to reconnect to the specific AP that it knows, even if it is right next to a better one while connecting. This has been observed on some Nexus devices, but is apparently fixed on the Galaxy Nexus running CM10.

    3.The phone tries to roam as it can see a better AP, but drops the connection and reconnects to the stronger AP shortly after. That's the typical Galaxy S3 and Galaxy Nexus bug, which is fixed by the hack described in this thread.



    Only Bug 3 in this list is fixed by this hack. It will not help for the other two bugs!

    To determine which bug you are observing, try this:

    - Pick two access points that are within range of each other, we will call them AP1 and AP2.

    - Locate the phone close to AP1, turn on wifi, and connect to the network. You should get full signal strength.

    - Start listening to a web radio stream using e.g. TuneIn Radio (available on Play Store), configure the buffer size to the minimum possible.

    - Slowly walk towards AP2, watching the signal strength indicator.

    - If you reach AP2 and the phone still shows a low signal strength (at most one bar) after 10-20 seconds:
    You are observing a different bug which is not avoided by this workaround.

    - Turn off wifi and turn it back on again.

    - If the phone now connects to AP2 and shows a high signal strength, you are observing the Galaxy S2 bug --> Bug 1 in the list

    - If the phone still connects to AP1 and shows a low signal strength, you are observing the Nexus bug --> Bug 2 in the list

    - If the connection drops before getting close enough to AP2, the access points are too far away from each other. -->Retry with a different set of access points.

    - If the signal strength seems to increase while getting closer to AP2, but then the wifi icon disappears briefly and comes back after a few seconds, and the web radio stream drops, you are observing the Galaxy S3 bug, and this workaround will help you. --> Bug 3 in the list

    - If the signal strength increases while getting closer to AP2, the wifi icon doesn't disappear, and the web radio stream doesn't drop, everything is working normally --> no bug:
    -You might have a device that just doesn't have a wifi bug. Apparently such devices indeed exist.
    -You might have a Galaxy S3 or Galaxy Nexus, but you were lucky. Try walking back to AP1 and check if it drops the connection this time.
    -You might have already applied the workaround above, or a different fix for the same bug. (However there doesn't seem to be one yet.)

    ______________________________________________________________________________________________________________________

    Now as you know which bug your device has you maybe have noticed that your device has bug type 3, here is the hack to fix it:​


    IMPORTANT: IM NOT RESPONSIBLE FOR NOT WORKING DEVICES AFTER THIS PROCEDURE. INSTALL AT YOUR OWN RISK!! THIS MOD IS EXPERIMENTAL!!

    THIS MOD ONLY IS CONFIRMED WORKING FOR THE SAMSUNG GALAXY i9300 AND THE SAMSUNG GALAXY NEXUS i9250




    For the installation procedure i give here root rights are needed. It also is recommended to make a CWM-Backup before. If you are unsure about root rights or dont know how to use a Custom Recovery feel free to ask before you do anything.

    Installation Instructions for the Standalone-file(no Custom-Recovery needed):

    1. Download View attachment Standalone-file.zip and unzip


    2. Search for your original "wpa_supplicant"-file in \system\bin.

    You can use any Explorer that offers root-acess but be sure you set the permissions to rwx r-x r-x if you use another file explorer as i mentioned. It is needed for the file to have the permission to be executed

    (f.e. Root Browser Lite)

    3. Copy your original "wpa_supplicant"-file to any location you will remember in case anything goes wrong.

    4. Delete the original "wpa_supplicant"-file from the folder

    5. Paste the modified "wpa_supplicant"-file downloaded from here in \system\bin. Make sure the file still is named "wpa_supplicant"

    6. Reboot your device


    Installation Instructions for CWM Flashable-file(CWM-Recovery needed):

    1. Download View attachment 1549825

    2. Copy the downloaded file to your sdcard.

    3. Search for your original "wpa_supplicant"-file in \system\bin.

    You can use any Explorer that offers root-acess but be sure you set the permissions to rwx r-x r-x if you use another file explorer as i mentioned. It is needed for the file to have the permission to be executed

    (f.e. Root Browser Lite)

    4. Copy your original "wpa_supplicant"-file to any location you will remember in case anything goes wrong.

    5. Reboot to recovery and flash the downloaded file.

    6. Reboot your device.



    Your device should now roam correctly from one AP to another.

    Please leave your feedback here in the thread and hit the thanks-button if it fixed your problem. ENJOY ;)

    FOR ADDITIONAL INFO: Click Here
    ______________________________________________________________________________________________________________________

    Special Thanks to:

    - TheSeven, who created this hack
    - querty12, who created the flashable CWM-file
    - Gabeloooooo, who was the first to give me feedback about this
    3
    @ OP... Do you care to share the source of this fix? So we can implement this fix in code for source builders?

    See the google code link in the first post: https://code.google.com/p/android/issues/detail?id=38830
    And I wouldn't call it a fix, much rather a dirty hack :p

    Anyway, it seems like a much cleaner fix for this was committed to upstream hostap two days ago.
    I haven't tested that yet, but a first glance at the code suggests that the effect is very similar to my hack. You might want to pull that instead.
    2
    thanks for pointing these bugs out. :D is there any change a so called "best wifi" app from google play fixed this bug too?

    i've used best wifi app from android 4.1.1 on galaxy nexus and it really switched from one AP to another AP which in the saved list and have the required minimum WiFi signal with same SSID or not.

    Best Wifi basically converts bugs number 1 and 2 (see first post) into bug number 3. It will in fact switch to a better AP, but will lose the connection during the process, dropping e.g. VoIP calls or web radio streaming. That's not a real solution.

    unfortunately on android 4.2.1, there's a new bug on galaxy nexus, the WiFi somehow disabled itself after the screen was locked for a couple of minutes and turned it on again when the screen was unlocked. very annoying, i avoid using WiFi because of this.

    i've created a bug report on with an adb bugreport attached on this thread: https://code.google.com/p/android/issues/detail?id=41268

    care to look around? :)

    I assume you've checked the obvious and told it to keep wifi connected while asleep? If that setting (in the advanced settings on the wifi network list screen) is set to "Never" and it still disconnects, then that's a bug.

    Oh, and on an interesting side note: While the Galaxy S2 stock roms seem to be affected by bug number 1, this doesn't seem to affect CM10 running on the S2. So flashing CM10 might be a possible fix for the Galaxy S2 bug. In my tests it roamed flawlessly in with that ROM.
    2
    did this fix work on your Nexus 4?

    I will have to try it some time next week when I learn enough to actually apply it. Again, this is my first Android phone so this is all very new to me. :D

    My workaround was to install another AP using a different SSID and use the app 'Best WiFi' to force switch when the signal drops too low. I just got the phone yesterday.
    2
    Thank you very much! My Wifi is now working as it should at my workplace (a University network with several APs). Before I constantly lost my internet connection even though I had full Wifi signal strength. Now my Wifi have worked a whole day flawlessly.

    I am using the latest XXELKC 4.1.2 version with everything stock except root and custom recovery.

    Great to hear that.

    If you want to help getting this fixed properly, you can star the bug report on Google: https://code.google.com/p/android/issues/detail?id=38830