Samsung Galaxy S froyo wpa_supplicant fix

Using Froyo, both 2.2 and 2.2.1, on Samsung Galaxy S I’ve noticed that wifi is not working with wpa eap authentication. This kind of auth is fairly common in corporate and campus setup and I’m a bit surprised that (as far I know) this bug has not been fixed so far.
To be able to connect to my company wifi network I applied a patch found on google site, cross compiled wpa_supplicant and uploaded it to my SGS and now it works.
Basically it seems that wpa_supplicant 0.6.10, the one used in froyo releases of android, is affected by a wpa-eap bug that prevents to authenticate with this kind of networks.
For those running Gingerbread (at least 2.3.3): you’re not affected by this issue, be happy 🙂

More details about this problem can be found here:

and here:

and the fix I applied is here:

Of course, full source code for wpa_supplicant can be found here:

If you don’t want to install android sdk and other utilities, here you can find a precompiled binary. Feel free to use it, but AT YOUR OWN RISK. I’ve installed it on several galaxy S with Froyo 2.2 and 2.2.1 and it works just fine, but BE CAREFUL. The procedure is really safe, no kernel or firmware changes, but you never know.

Anyway, once you got the binary the procedure is quite straightforward; of course it requires a rooted phone and a bit of knowledge about using adb if you want to make it via usb debug.

First, find a way to upload the binary on your phone. Copy it to sdcard or issue a

adb push wpa_supplicant /sdcard/wpa_supplicant

adb shell
busybox mount -o remount,rw /system
cd /system/bin
mv wpa_supplicant wpa_supplicant.original
cp /sdcard/wpa_supplicant /system/bin/wpa_supplicant
chmod 755 /system/bin/wpa_supplicant
chgrp 2000 /system/bin/wpa_supplicant
busybox mount -o remount,ro /system

exit, and you should be set. Please note that group id 2000, set by the command chgrp above, is the gid that I found on my firmware. I suggest to look at the group of original wpa_supplicant and then set the same on new wpa_supplicant with gid. You can look at gid with “busybox ls -la wpa*” in /system/bin dir.

The same commands can be entered via any terminal app that gives you access to command line, but in all honesty doing that via sgs soft keyboard is pretty cumbersome.

At the end of the process you could also reboot the device, I suggest it if the last command fails with a device busy error (nothing to worry about). Not really needed, your wifi should connect immediately if you restart it and enter the right credentials.

Of course there is more than one way to do all the steps, these are only suggestions.

Let me know if it works also for you.

UPDATE: I’ve applied this also on a stock galaxy tab (froyo 2.2) that shown the same issue and it worked flawlessly. Didn’t checked it carefully so be even more cautious if you try it on a tablet.

Download: wpa_supplicant_froyo_eap

(don’t forget to gunzip and rename it 😉 )

A couple of remarks, to help clear some confusion that I’ve spotted on forums:

– This fix is for a very specific problem: wpa2/eap authentication. If your wifi does’t work at all (WEP/WPA/PLAIN) this fix will not help you. You will notice this issue only in some company or campus setups (or in some very paranoid home setup 🙂 )

– The fact that you are using froyo (2.2, 2.2.1) doesn’t means that you are affected by this issue. I’ve found it  in sources checked out from google repository (at the time of writing: I hope this is fixed by now at least in main repository). Some froyo devices are affected, not only SGS I guess, while some other are unaffected as hardware vendors or custom roms makers could have fixed it in advance. As usual YMMV.

– This issue is completely hardware unrelated: if you experience problems with hardware or drivers, I’m sorry this can’t help you 🙂

16 thoughts on “Samsung Galaxy S froyo wpa_supplicant fix”

  1. Dear friends at Dead End,

    I’ve tried the recipe. Unfortunately it didn’t work on my device. Wifi is still stuck at “Obtaining address….” on my Belkin Router using WPA security.

    Any other suggestions? (btw… I’ve already tried a reboot on the phone).

  2. This seems unrelated to the problem that this patched version of wpa_supplicant tries to fix.
    Are you sure that you are using a WPA/EAP authentication? If you are using WPA/PSK (most likely in a standalone AP) the problem is not related to WPA bug but maybe wrong credentials, algos or something like this.
    What setup do you have in your router? (I never used belkin devices)

  3. You’re right Cova. It’s a WPA/PSK secured router.

    Which information do you need about the router setup to help us on that?

  4. Worked awesome on my Captivate!!!

    Used SuperManager to copy the file.
    Tried several other files before but none worked.

    Thanks a lot!!!!

  5. Guys- need urgent help please!
    today i loaded the stock KA6 to my T959 thru Odin. but my phone did not restart and went into dead mode. no power no light , nothing. Any help please?

  6. This works beautifully for my Samsung captivate.
    I had same problem with Froyo firmware before.
    I googled this some but this is only one solution to fix this problem I believe.

  7. Hi,

    Thank you for the procedure, it worked on my Galaxy S (2.2.1). I can now connect on my enterprise netowrk (EAP/MSCHAPv2).

  8. This, imho, is not the same issue described in my post, that is related to a very specific authentication; thanks for the comment, interesting anyway.

  9. Works perfect on my Samsung i5800 running on Kyrillos v8.0.
    Was unable to connect to eduroam on my campus (PEAP and MSCHAPv2). Many, many thanks !

  10. I’m using gingerbread 2.3.3 and actually i’m affected with this issue !!!
    My brother’d ipad sees PC’s wifi network, but my galaxy s doesn’t !?
    I’m really confused :-s

Leave a Reply