Connect Fairphone to Ad-Hoc WiFi

I use a laptop with Ubuntu on it that is connected via ethernet cable. I want to share this connection to my Fairphone as an Ad-Hoc wifi network. Now I found out that Android by default doesn’t let you connect to Ad-Hoc networks, but it would be possible with a rooted phone. Fairphone is rooted out of the box isn’t it?

Here’s the info on Ad-Hoc WiFi and why it only works on rooted Android: http://askubuntu.com/questions/171914/how-to-connect-share-your-internet-connection-wired-wireless

There is a question on Stack Overflow that goes into this, but it involves either editing wpa_supplicant or using Virtual Router or Connectify, which only work on Windows, or Wi-fi Direct also Windows only: https://stackoverflow.com/questions/5100928/how-to-connect-android-wifi-to-adhoc-wifi

There is a patch to wpa_supplicant on the XDA forum, but I don’t want to just try it and risk making my Fariphone unstable or not able to connect to WiFi at all, only. I can’t post the link ot it, since this I’m only allowed to post two url’s, but it’s on xda-developers forum thread number 754961, with title “Android Ad-hoc support hack/wpa_supplicant”

Does anyone have any experience with this on Fairphone?

Here are the links to the wpa_supplicant hack/patch: http://forum.xda-developers.com/showthread.php?t=754961 and original post: http://szym.net/2010/12/adhoc-wifi-in-android/

I have tried to modify wpa-supplicant but did not succeed… One option would be to install CM 11 on your FP, as I think Android Kitkat does support Ad-Hoc WiFi, doesn’t it?

See: Cyanogenmod 11 for Fairphone FP1(U) Install guide + experiences

From what I’ve read there are plans to add it to future Android versions, but don’t think it is in there yet. Not worth it for me to install CyogenMod. Just wish there was a simpler solution.

As from this thread I understand it still has not been implemented: https://code.google.com/p/android/issues/detail?id=82

What did you try, Stefan? Do you have the source code of MTK’s wpa_supplicant (v2.0-devel-4.2.2-MTK-MR1-PDK) or did you just take Jouni Malinen’s (w1.fi)?

I want to connect to a laptop at work (Win7). A colleague has got a Samsung Galaxy S5 (should be KitKat) and can’t connect either. Another colleague has got a iPhone 4 (i think) and it works out of box for him …

As far as I understand I should only patch the code, compile for arm7, replace and make sure permissions are set, correct?

@dhuyvetter: Your infos are pretty old. I wouldn’t count on it that this will ever work or be implanted.

I tried to modify the wpa_supplicant right on the phone with a root text editor I think (accompanied by changing the permissions through a terminal app.)

What I wanted to do then, was to connect to a wireless printer. We managed to do this through a second phone, serving as a hot spot, eventually… I did not pursue the idea further.

Since wpa_supplicant is a binary you probably mean wpa_supplicant.conf
Yeah I tried that too and some apps are even able to find/make Ad-Hoc networks visible.
Just now found this tutorial: http://makeorbrick.blogspot.de/2011/11/how-can-i-use-ad-hoc-w-lan-connections.html

But I’ve also never got this to work so I still think I need a modified wpa_supplicant to connect. OP of bug #82 says Ad-Hoc “is simply disabled” in Android.

The szym-patch (post #2) is unavailable btw. I found another patch in the comments and it could fit into Jouni Malinen’s v2.0 release.
I’ve also found some other patches but from 2012 and rather for Samsung Nexus series: http://www.thinktube.com/en/android-IBSS-page.html
Could be that NL80211 has to be patched as well …

Anybody has an idea where I can find the MTK wpa_supplicant source? Could it be in here:

1 Like

Yes, very probably I did so… I am not that firm on the terms yet… :blush:

@keesj could answer this for sure!

@dhuyvetter,

FP1 supports “reversed” tethering over USB. This is what I tend to use. It also allows me to use the FP1 as WiFi hotspot and at the same time and charge the phone.