Nexus 7 - WiFi Ad-Hoc fix for wpa_supplicant?

Search This thread

wikid24

Senior Member
Jun 6, 2011
51
9
Update March 25, 2013:

Solved!! The folks over at Thinktube Inc. have developed a fix and submitted it to CyanogenMod and AOSP for merging into their code:
http://b-real.org/2013/ad-hoc-ibss-m...h-cyanogenmod/
http://www.thinktube.com/android-tech/46-android-wifi-ibss

Essentially the EASIEST solution is to ROOT your phone, and install the CyanogenMod nightly as of March 25 or later (note: you will have to wait until the nightly is actually BUILT, since as of today it is not ready yet).

I have not tested this solution out myself, however others within this thread have confirmed it working.

Please if anyone develops a easier patch or a step-by-step for people who do NOT want to use CyanogenMod, post and I will update the OP

Cheers!
WiKiD24

-------------------------------------------------------
Update Oct 9, 2012:

- Nexus 7 v4.1.2 did not add Wi-Fi Ad-Hoc Support with the stock update from Google.
To do: Check if any WPA-Supplicant changes previously tested in v4.1.1 now work in 4.1.2

- Workaround (Recommended): Bluetooth Tethering to Nexus 7 Tablet (via Bluetooth DUN Profile). "BlueVPN" from Google Play Store.
Tested successfully on many Nokia Symbian phones (N7, E71, E72), and others.
However, many applications on Nexus 7 Tablet do not support it (without fixes from the developers)

Confirmed working applications:
- Pulse
- Google Chrome
- Dolphin Browser
- Facebook
- Ebuddy
- Youtube
- Others (I am too lazy to add them all)

Confirmed NOT working applications:
- Gmail
- Email
- Google Search
- Google Play Store
- Dropbox
- Words with Friends
- Scramble with Friends
- Others (I am too lazy to add them all)

More details can be found here: http://xdaforums.com/showpost.php?p=29763582&postcount=27

Issue: Sometimes the phone/tablet do not connect (randomly), due to issues with either the phone or the tablet.
To resolve: Turn on and off bluetooth on phone, Turn on & off bluetooth on tablet. Try again. If does not work, reboot phone and tablet and try again. Should work.

-Workaround: Android Phone to Nexus 7 Tablet (via "FoxFI" App on Phone, "FoxFi Addon" App on Tablet, or via "PDANet", or via "Wireless Tether App")

http://xdaforums.com/showpost.php?p=29763582&postcount=27

- Workaround: USB Tethering ANY Phone to Nexus 7 Tablet (via "PPP Widget" App on Tablet, requires rooted Nexus 7)

http://xdaforums.com/showpost.php?p=32431103&postcount=51

- Workaround: Windows WiFi Laptop Tethering to Nexus 7 Tablet
http://www.youtube.com/watch?v=klHzMyYFGeQ
-------------------------------------------------------
Hi All,

I've just recently gotten a Nexus 7 and need to be able to enable Ad-Hoc wifi on the tablet.

I also own a Asus TF101 and previously had the same problem however there was a fix for that.

The solution was to replace the wpa_supplicant file in the /system/bin folder, however I do not know the code to change it.

If anyone has the technical know-how, they would be able to reverse-engineer it and apply the same fix.
http://xdaforums.com/showthread.php?t=1370955
http://szym.net/2010/12/adhoc-wifi-in-android/
http://www.slatedroid.com/topic/2752...less-hotspots/
http://www.olsr.org/?q=olsr_on_android
http://hostap.epitest.fi/gitweb/gitw...upplicant.conf
 
Last edited:
  • Like
Reactions: CARUPANBOW

demandarin

Senior Member
Apr 7, 2010
7,021
2,038
Alexandria, Va
I posted a possible solution in QnA section. Thread title is similar to this one. Check it out. Doesn't involve any coding. Prime had a similar issue on a few firmware updates. This was solved for us(before Asus came around to enabling it themselves) by adding in a wifi supplicant file and renaming an older one. Then setting permissions on the new file. Here is the link to that thread. There's a good chance it will work without the file needing to be modded. It came from a galaxy tab LR something and worked fine on prime. Its worth checking out.

http://xdaforums.com/showthread.php?t=1438297
 

wikid24

Senior Member
Jun 6, 2011
51
9
thanks for the tip and I tried it out, which is essentially the same type of solution but it didn't think work as there is no wpa_supplicant2 file in the nexus 7.
 

wikid24

Senior Member
Jun 6, 2011
51
9
Last edited:
  • Like
Reactions: 50cr473s

wikid24

Senior Member
Jun 6, 2011
51
9
Did any of those sources of information get you any closer to enabling ad-hoc?
None yet, I need some help to do so. There is a file called "wpa_cli" that I need copied from another device, because I can't find it on the internet.

If anyone could find it in their "/system/bin" folder and attach it to this tread, I could certainly try it.

I've also requested the same thing in the Q&A forum here: http://xdaforums.com/showthread.php?t=1793437
 
  • Like
Reactions: 50cr473s

Protocol 7

Senior Member
Oct 27, 2010
78
2
New York City
ipwnage.com
Bumping; I have the same condition. I'm in Italy and bought an internet package for my laptop--I'm sharing it with all my other devices but the N7 doesn't see the adhoc connection. Like OP said, I had a Transformer TF101 and remember flashing a file to fix it.

Thanks in advance.

Just an FYI: Also checked my GNex for a wpa_cli and came up empty.
 
Last edited:

wikid24

Senior Member
Jun 6, 2011
51
9
Just wanted to give quick update, i have not been able to find anyone to help me and also my life is kinda hectic right now... Hopefully someone will be able to pick up where I left off, in the meantime my nexus 7 is pretty much useless to me until resolved.
 

rdelfin

Senior Member
Jul 20, 2012
124
35
One more "me too".

I'm here to share my sympathy to everyone else's pain as I have a nexus 7 that I can't connect to my phone's adhoc Hotspot. I have also posted my query in Android Central, but no one seems to have been able to know a fix as of yet. (topic can be found here: Android Forums at AndroidCentral.com > Google Nexus 7 Tablet Forum > Nexus 7 Rooting ROM's & Hack's > *** CONNECTING TO Adhoc WiFi WITH THE NEXUS 7 ***)

As I said in that thread.. not being able to connect to phones hotspot makes my beautiful nexus 7 feel like a handicapped tablet. :rolleyes:
 
Last edited:

demandarin

Senior Member
Apr 7, 2010
7,021
2,038
Alexandria, Va
Just wanted to give quick update, i have not been able to find anyone to help me and also my life is kinda hectic right now... Hopefully someone will be able to pick up where I left off, in the meantime my nexus 7 is pretty much useless to me until resolved.

I haven't seen any reports/posts of people checking out or trying what I mentioned in post #2..lol. on prime we had this exact same problem. Then we found the supplicant file to replace one we had and then adhoc tethering worked after that. You only need to be rooted to do this as you need to rename a file and insert new supplicant in there and set permissions. You can always backup and rename original file. So if it doesn't work, you can easily revert back to stock file. I have a feeling this new file will work. Just haven't tried myself yet as I haven't brought tablet outdoors yet to need tethering. I might eventually see if it works if no one else does.

Look at the thread I linked in second post and you will see prime owners had exact same problem and we solved it. It worked for the transformer 300 also. Will likely work for nexus 7 also. The file is, in a sense, universal.
 

rdelfin

Senior Member
Jul 20, 2012
124
35
I haven't seen any reports/posts of people checking out or trying what I mentioned in post #2..lol. .
I have tried. It does not work :( -- WiFi refuses to turn back on with this new supplicant file. And yes, I made sure to follow your instructions exactly as described in the procedure.

With the N7, there is no such thing as a wpa_supplicant2 file originally in /system/bin (only the one without the '2' exists in the N7 which is the one running the show here, I know this for a fact as when restoring this file, the WiFi in the N7 becomes functional again). So I tried this same file you provide both with and without the '2', with no better results.

I suspect that only a developer that knows what he's doing would be able to come up with a new wpa_supplicant file specifically tweaked for the N7 (as opposed to using one that did the trick for the Prime or for the Xoom or whathaveyou).

Thanks for the suggested idea though... anything else you think we should try?
 
Last edited:

demandarin

Senior Member
Apr 7, 2010
7,021
2,038
Alexandria, Va
I have tried. It does not work :( -- WiFi refuses to turn back on with this new supplicant file. And yes, I made sure to follow your instructions exactly as described in the procedure.

With the N7, there is no such thing as a wpa_supplicant2 file originally in /system/bin (only the one without the '2' exists in the N7 which is the one running the show here, I know this for a fact as when restoring this file, the WiFi in the N7 becomes functional again). So I tried this same file you provide both with and without the '2', with no better results.

I suspect that only a developer that knows what he's doing would be able to come up with a new wpa_supplicant file specifically tweaked for the N7 (as opposed to using one that did the trick for the Prime or for the Xoom or whathaveyou).

Thanks for the suggested idea though... anything else you think we should try?

They likely will implement it through a future update. Hopefully that's sooner than later. Ill ask motley, kernel developer.
 

Demented-Idiot

Senior Member
Nov 29, 2010
92
6
Wrexham, UK
I toyed with this for a while...

If you install Power Controls (Power Controls) you can add a button that turns on the Wifi Hotspot.

Problems:

you cant change any settings in current settings UI
Appears to be default "Android_AP" SSID and whatever the default password is (i dont recall if this is a random code or not)

Its a start!
 

rdelfin

Senior Member
Jul 20, 2012
124
35
I toyed with this for a while...

If you install Power Controls you can add a button that turns on the Wifi Hotspot.

Problems:

you cant change any settings in current settings UI
Appears to be default "Android_AP" SSID and whatever the default password is (i dont recall if this is a random code or not)

Its a start!
Could you explain exactly what this does? I didn't understand what it is being implied with this being a start? with this you can actually connect to adhoc?
 

wikid24

Senior Member
Jun 6, 2011
51
9
I also wanted to post a quick reply, since I've been an insomniac yesterday.

From my previous posts I posted this link here as well, I edited the wpa_supplicant.conf file from the /system/etc/wifi folder and modified with the following settings, however I don't think that it even reads the wpa_supplicant.conf file either. Can anyone either confirm or deny that the wpa_supplicant.conf file is being used on the N7??

-------------------
update_config=1
ctrl_interface=wlan0
eapol_version=1
ap_scan=2
fast_reauth=1

network={
ssid="Bondphone"
mode=1
frequency=2412
key_mgmt=NONE
wep_key0="1234567890123"
wep_key1=1234567890123
wep_tx_keyidx=1
priority=3
auth_alg=SHARED
}

------------------------
 
Last edited:

jenda.69

Senior Member
Nov 23, 2007
135
38
Samsung Galaxy A52 5G
wikid24: I don't know if N7 (or my NS) reads this file but it definitely reads /data/misc/wifi/wpa_supplicant.conf. Only problem is that I can't turn wifi on after ANY change in this file. Sometimes even if I revert my backup file, wifi won't launch and I must delete it to make wifi working again.:eek:

I found this thread on XDA
http://xdaforums.com/showthread.php?t=1806937
It is edited wpa_supplicant file for Asus Transformer but it allows me to turn on wifi even on NS. But it doesn't show me any ad hoc networks. Maybe with non-stock kernel...?

And I also found ad hoc patch for source code of older version of wpa_supplicant. But I'm not able to try if it is possible to apply it on JB version too.
http://szym.net/android/wpa_supplicant-ibss.patch
 
Last edited:

wikid24

Senior Member
Jun 6, 2011
51
9
wikid24: I don't know if N7 (or my NS) reads this file but it definitely reads /data/misc/wifi/wpa_supplicant.conf. Only problem is that I can't turn wifi on after ANY change in this file. Sometimes even if I revert my backup file, wifi won't launch and I must delete it to make wifi working again.:eek:

I found this thread on XDA
http://xdaforums.com/showthread.php?t=1806937
It is edited wpa_supplicant file for Asus Transformer but it allows me to turn on wifi even on NS. But it doesn't show me any ad hoc networks. Maybe with non-stock kernel...?

And I also found ad hoc patch for source code of older version of wpa_supplicant. But I'm not able to try if it is possible to apply it on JB version too.
http://szym.net/android/wpa_supplicant-ibss.patch

jenda, I think you may have solved a big piece to the puzzle!!

You can copy the file to another directory, and THAN you can open the file! I noticed I had all my pre-saved wifi addresses in this file!

If someone can please copy the "/data/misc/wifi/wpa_supplicant.conf" file to another directory, modify it, than overwrite the old file, it should work!! :D :D :D *fingers crossed*
(unfortunately I am busy for a few days, don't know if I'll be able to make the change for a while)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Super dooper!

    Yesssssssssssssssssssssssssss!!!!!!!!!!!!!

    I have finally managed to have my Nexus 7 access the internet through my non-regular-wifi-but-adhoc-phone data connection!! YAY!! and best of all, I'm almost certain that no rooting and unlocking is needed!! (99% sure of this since my device is rooted and unlocked but nothing seemed to indicate that the solution described below requires it).

    The connection is made possible through bluetooth tethering by using a special app you can download from the Google Play Store for free. So this means you're not even using adhoc wi-fi but a bluetooth link between your phone and the tablet that is established by this app through the "DUN" profile (bluetooth).

    Here are the steps:

    1. Access the Google Play Store in your Nexus 7 and download & install the app "BlueVPN" (this app was developed with Ice Cream Sandwich in mind, but luckily it works on JellyBean making our Nexi 7s 100% compatible.
    2. Both on your phone and in your tablet, do whatever needs to be done to create a pairing bluetooth relationship between these two devices (no need to look for a "connection active" message, just the pairing registered in both devices is enough).
    3. Turn wi-fi off in your tablet.
    4. Execute BlueVPN in your tablet and a list will appear with all the bluetooth devices that your tablet has been registered to will be presented. From this list, select the item that refers to the phone.
    5. Allow for the app to do its thing: negotiating a connection, the handshake, etc... and at the end, you should receive the message that a connection between both devices has been established successfully.
    6. Voilá, it's on baby! :cool:

    NOW, before anyone starts *****ing and whining, here are the caveats of this tethering method:
    • Yes, the throughput of data you get with bluetooth tethering is smaller than the one you get with Wi-fi tethering, making your 3g connection feel slower in your tablet (not as slow as browsing on your phone on EDGE, but not as fast as when browsing on HSPA+. You know what I mean?)
    • This connection feeds the internet to your tablet through a "bluetooth socket", NOT a wifi one, and thus, this makes some apps in the tablet "think" that no network connection is present (which is technically true). What do I mean with this? For those apps that only require access to the internet in a straight forward manner, everything will work fine, such as using the web browser app, the facebook app, etc. HOWEVER other apps that EXPECT to receive data through the "wifi socket" will complain saying "not network connection available" like Google Wallet among other specialized apps. One peculiar case is the Google Play Store app: you will be able to BROWSE the store, but you won't be able to DOWNLOAD/PURCHSAE apps into your device. As for the two email apps, the "regular email" client works as usual (receiving emails, sending emails, pushed notifications of new emails), however the specialized Gmail client DOES not (hey, you can always use the regular client configuring it with your gmail account should this be something you need).

    To end this on a positive note, the good news is that bluetooth tethering does not consume as much battery power when idle as with wifi tethering, this means, that you can have your phone and your tablet in your bag linked and you won't drain your battery as fast as it happens when using hotspot tethering. And also, the non-requirement of rooting/unlocking I mentioned earlier :p

    Yes, I'm aware that this may not be a total satisfactory solution to our problem but AT LEAST now our Nexi-7 have the ability to be connected when no wi-fi is around and we only have our phones to the rescue.

    And finally, the disclaimer: proceed at your own risk, which here is practically non-existent, but still, this solution presented here is meant only as informational and I can't be liable for anything that might go wrong, OK? :silly:

    Enjoy!!!!! :cyclops:
    2
    Finally!

    I found this custom rom (cm10 - 4.2.2 based) that has full IBSS support:

    http://b-real.org/2013/ad-hoc-ibss-mode-support-for-android-4-2-2-with-cyanogenmod/
    http://www.thinktube.com/android-tech/46-android-wifi-ibss

    Here we provide information, patches and a few system images to support Ad-Hoc (IBSS) mode. We base our additions on CyanogenMod 10.1-M2 (Android 4.2.2 JDQ39).

    Our goal is to bring the missing Ad-Hoc (IBSS) mode to Android, in a way that is completely integrated into the Android system API and user-interface. Users should be able to create and connect to Ad-Hoc networks from the standard user interface (Settings – WiFi) and Applications should have an API to configure their “own” Ad-Hoc network. We believe this will help people who need more capability than WiFi Direct and can extend diverse usages of Android mobile devices.

    To achieve this, we have modified the WLAN driver “bcmdhd”, extended the Android framework, the public Android API and added the missing parts to the “Settings” application. At this moment only Nexus S, Galaxy Nexus and Nexus 7 devices are supported and tested, but the same kernel modifications can be made to a number of devices and the UI will automatically show Ad-Hoc mode options when the driver supports it.

    We have submitted these changes to CyanogenMod and Google AOSP Gerrit and provide this page for further information.

    I have tested it on my nexus 7 and it can detect my nokia hotspot (joikuspot) flawlessly :)
    1
    Update March 25, 2013:

    Solved!! The folks over at Thinktube Inc. have developed a fix and submitted it to CyanogenMod and AOSP for merging into their code:
    http://b-real.org/2013/ad-hoc-ibss-m...h-cyanogenmod/
    http://www.thinktube.com/android-tech/46-android-wifi-ibss

    Essentially the EASIEST solution is to ROOT your phone, and install the CyanogenMod nightly as of March 25 or later (note: you will have to wait until the nightly is actually BUILT, since as of today it is not ready yet).

    I have not tested this solution out myself, however others within this thread have confirmed it working.

    Please if anyone develops a easier patch or a step-by-step for people who do NOT want to use CyanogenMod, post and I will update the OP

    Cheers!
    WiKiD24

    -------------------------------------------------------
    Update Oct 9, 2012:

    - Nexus 7 v4.1.2 did not add Wi-Fi Ad-Hoc Support with the stock update from Google.
    To do: Check if any WPA-Supplicant changes previously tested in v4.1.1 now work in 4.1.2

    - Workaround (Recommended): Bluetooth Tethering to Nexus 7 Tablet (via Bluetooth DUN Profile). "BlueVPN" from Google Play Store.
    Tested successfully on many Nokia Symbian phones (N7, E71, E72), and others.
    However, many applications on Nexus 7 Tablet do not support it (without fixes from the developers)

    Confirmed working applications:
    - Pulse
    - Google Chrome
    - Dolphin Browser
    - Facebook
    - Ebuddy
    - Youtube
    - Others (I am too lazy to add them all)

    Confirmed NOT working applications:
    - Gmail
    - Email
    - Google Search
    - Google Play Store
    - Dropbox
    - Words with Friends
    - Scramble with Friends
    - Others (I am too lazy to add them all)

    More details can be found here: http://xdaforums.com/showpost.php?p=29763582&postcount=27

    Issue: Sometimes the phone/tablet do not connect (randomly), due to issues with either the phone or the tablet.
    To resolve: Turn on and off bluetooth on phone, Turn on & off bluetooth on tablet. Try again. If does not work, reboot phone and tablet and try again. Should work.

    -Workaround: Android Phone to Nexus 7 Tablet (via "FoxFI" App on Phone, "FoxFi Addon" App on Tablet, or via "PDANet", or via "Wireless Tether App")

    http://xdaforums.com/showpost.php?p=29763582&postcount=27

    - Workaround: USB Tethering ANY Phone to Nexus 7 Tablet (via "PPP Widget" App on Tablet, requires rooted Nexus 7)

    http://xdaforums.com/showpost.php?p=32431103&postcount=51

    - Workaround: Windows WiFi Laptop Tethering to Nexus 7 Tablet
    http://www.youtube.com/watch?v=klHzMyYFGeQ
    -------------------------------------------------------
    Hi All,

    I've just recently gotten a Nexus 7 and need to be able to enable Ad-Hoc wifi on the tablet.

    I also own a Asus TF101 and previously had the same problem however there was a fix for that.

    The solution was to replace the wpa_supplicant file in the /system/bin folder, however I do not know the code to change it.

    If anyone has the technical know-how, they would be able to reverse-engineer it and apply the same fix.
    http://xdaforums.com/showthread.php?t=1370955
    http://szym.net/2010/12/adhoc-wifi-in-android/
    http://www.slatedroid.com/topic/2752...less-hotspots/
    http://www.olsr.org/?q=olsr_on_android
    http://hostap.epitest.fi/gitweb/gitw...upplicant.conf
    1
    here's some more useful information for enabling ad hoc:

    http://szym.net/2010/12/adhoc-wifi-in-android/

    http://www.slatedroid.com/topic/27522-howto-connect-to-ad-hoc-wireless-hotspots/

    http://www.olsr.org/?q=olsr_on_android

    http://hostap.epitest.fi/gitweb/git...ob_plain;f=wpa_supplicant/wpa_supplicant.conf

    I'm doing what I can right now to try and enable it.

    Some more experienced android users whom know what they're doing would be better than me trying it out, though!!
    1
    Bump!

    Ad-hoc WiFi is now in the CM10.1 Nightly builds for grouper. Now I can leave the house with the N7 without buying coffee!

    Just tested CM10.1 20130416-Nightly against my GB Android phone running Android Wireless Tether 2.0.8 pre-1.

    Seems to work just fine, yay!