Android Ad-hoc support hack/wpa_supplicant

Search This thread

krohn

Member
Oct 4, 2009
6
0
just got this working on evo 4g

used a3e00f284ddff04804ba8d59364712b1 wpa_adhoc-signed.zip (v0.5.11)

used ra recovery to flash zip.

clock work 3.0 blocks due to deleted file to get to newer version. doesnt let you edify or script

had to turn on wifi, and set up manualy a static ip and all the rest of that stuff. i mimicked a comcast router setup.

ip 10.0.0.9
gate way 10.0.0.1
net mask 255.255.255.0
dns 1 75.75.75.75
dns 2 75.75.76.76

start ad hoc on computer.

once i hit menu and save. said connected. not obtaining ip address.

then on my pc i bridged my lan connection to my linksys AE1000 wifi reciever dongle thing.

fyi, WEP will connect also , but the other security WPA2 doesn't connect

and bam, i get ad hoc shared internet on my evo 4g. small write up for some one to follow.

thanks much guys. :highfive:
 

HEXcube

Senior Member
Aug 18, 2012
118
48
hexcube.github.io
Edit wpa_supplicant.conf instead of wpa_supplicant

I changed data/misc/wifi/wpa_supplicant.conf instead of /system/bin/wpa_supplicant.
Step1:First i scanned my adhoc network using Wifi Manager. It shows adhoc networks. I ignored it's warning and tried to connect. It'll fail.No problem! We now have the adhoc network listed in wpa_supplicant.conf.
Note: you can skip this step if you know how to edit wpa_supplicant.conf manually or if your device already lists adhoc networks on scanning.
Step2: You'll need to root your device if you're doing this through your device itself. If you use adb you may not need to root your device.(I had root access by default through adb. So rooting the device wasn't necessary for me). If you're using pc(windows or linux), i recommend Android Commander. If you're doing this from device itself, use some Root Explorer and Terminal Emulator.
Pull and/or edit data/misc/wifi/wpa_supplicant.conf. Add the following line
ap_scan=2
Find line like
network={
ssid="your adhoc name"
bssid=*some value*
.
.
}
Delete bssid line.
Add/Change the following
scan_ssid=1
priority=1
mode=1

Push back/save the modified file.
chown ownership back to system.wifi. Type the following in adb/Terminal Emulator
#chown system.wifi data/misc/wifi/wpa_supplicant.conf
Ok, done! Now you can turn on wifi and if the specified adhoc network is nearby, your device'll automatically connect to it. Don't scan for new networks. If you do, adhoc support will be lost and you'll have to start over again!
Advantage: Safer than modifying system/etc/wifi/wpa_supplicant binary. Saves you the trouble of compiling modified wpa_supplicant or finding a compiled one for your platform.
Drawback: This is just a temporary solution.You'll have to repeat this process for every new adhoc network as it doesn't enable adhoc forever. It is good for connecting to your home network or other known networks, but if you want to connect to any adhoc network you scan,then this is not your method. Because, wpa_supplicant.conf will be overwritten every time you scan a new network.
For more details refer to
http://forum.xda-developers.com/showthread.php?t=1591207
 

blade_h

Senior Member
Mar 18, 2012
81
5
Thanks This work great!!....also can someone give me name or link for some WiFi tethering ...so to be able to share my 3G try Wifi to my friends
I try few from market bt no one work correct
Thanks
 

HEXcube

Senior Member
Aug 18, 2012
118
48
hexcube.github.io
To which network did you try to Connect?

Hi babai,
to which Adhoc network did you try to connect? One from Windows XP/Vista, Linux or Nokia Joikuspot?
Maybe, it's due to Android 4.2 Jelly Bean. It has new features like WiFi Direct which is a replacement for Adhoc WiFi. This may have changed something in the wireless framework. I'm not sure though. Can you see the Adhoc network on Wifi Manager?
 

babai93

Senior Member
Feb 5, 2010
193
124
38
Sambalpur
Hi babai,
to which Adhoc network did you try to connect? One from Windows XP/Vista, Linux or Nokia Joikuspot?
Maybe, it's due to Android 4.2 Jelly Bean. It has new features like WiFi Direct which is a replacement for Adhoc WiFi. This may have changed something in the wireless framework. I'm not sure though. Can you see the Adhoc network on Wifi Manager?

I am using HCT Touch 3G (Windows 6.5 Phone) to share internet over Wifi over WMWifiRouter.
My Laptop can access but my Android mobile are not accessing the WIFI Access Points.

I need a solution to Share the same for all the device. or a good application for my windows mobile
 

babai93

Senior Member
Feb 5, 2010
193
124
38
Sambalpur
its included in the android sdk toolchain.



Can all the people which had problems, check the version of wpa_supplicant their rom is using? connectbot or via adb in cmd.exe/shell (adb shell wpa_supplicant -v) and post the output?.

It seems like some newer roms are using wpa_supplicant v6 with different libs.

You can try to use the precompiled wpa_supplicant from daveba http://forum.xda-developers.com/showpost.php?p=7711198&postcount=6

our flash the attached signed update zip. (its the same file)

Attention: its not my file!!

Hi,, I am running JB 4.2.1 on my SGS, can u please share wpa_supplicant for the same?
 

Robotriper

New member
Jul 18, 2017
1
0
Stuck on step 2, help!

@HEXcube Im trying this out on my Samsung galaxy core 2 (sm g355m running android 4.4.2, wpa_supplicant v2.1).

I'm trying to use this phone as a MIDI controller for a DAW using Touch OSC app, but I need to connect to my ad-hoc network from my macbook so I can send MIDI messages from Touch OSC app to my macbook via WIFI, so I don't really need internet at all, I just need the phone to send the MIDI data through the network.
I've managed to open the .conf file and I can clearly see my ad-hoc network listed in there but I just see this lines of text:

network={
ssid="MIDI Link!!"
key_mgmt=NONE
group=WEP104 WEP 40
auth_alg=OPEN SHARED
wep_key0="monas"
priority=4
autojoin=1
usable_internet=0
skip_internet _check=0

{

I dont understand where is it that I need to write the "ap_scan=2" command line, also I dont see the "BSSID" anywhere (not even on my regular wifi networks).

So, do I have to just add/change the following?:

scan_ssid=1
priority=1
mode=1

And where do I write the "ap_scan=2" line?

I hope you can help me out, I just want to use this phone (or any android phone) for this purpose.

Thanks!
 
Last edited:

HEXcube

Senior Member
Aug 18, 2012
118
48
hexcube.github.io
Been a long time since I tried this!

Hi @Robotriper :)

It's been a long time since I did this, I don't even remember running an AdHoc hotspot, lol! :laugh: Anyway, I think one of my old posts might help u: Link to "How to connect to an Ad-Hoc (IBSS) network?"

However, it's a very old method, so I'm not sure if it's even working now. My suggestion'd be to try running a proper Access Point mode mobile Hotspot from your fone or notebook. Most relatively new Android fones have a Portable Hotspot/Tethering option in their settings.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Heya,

    Unfortunately android, to be precisely wpa_supplicant does not show ad-hoc networks, the following modified wpa_supplicant shows them, haven't seen it before so I posted it :).

    all credits go to szym (http://szym.net/android/adhoc-wpa-supp.html)

    The patch below modifies the wpa_supplicant code in the external/wpa_supplicant AOSP repo to make ad-hoc networks appear as regular APs with a (*) prefix.

    The patch:

    * removes the [IBSS] flag from scan results,
    * masquerades and demasquerades ad-hoc ssid with (*) prefix
    * sets mode 1 (ad-hoc) if the ssid is for IBSS
    * permits the supplicant to select an IBSS when associating to a given ssid

    patch: http://szym.net/android/wpa_supplicant-ibss.patch

    The only thing I did was to apply the patch compile it for froyo and supply a signed update zip with the modified wpa_supplicant, work was done by szym.

    Flash the attached wpa_adhoc-signed.zip in recovery and your done :).

    a3e00f284ddff04804ba8d59364712b1 wpa_adhoc-signed.zip (v0.5.11)

    Works with:

    - Froyo/Eclair roms on HTC Hero (confirmed)
    - roms using wpa_supplicant v0.5.x

    Attention:
    - It _seems_ like some rom using wpa_supplicant v0.6.x do not work! take care (e.g HTC Desire). Please report back.

    you may check this post: http://forum.xda-developers.com/showpost.php?p=7716862&postcount=24

    Always do a nandroid backup!!
    3
    i took it off by reinstalling the same rom over it deleted the kernel an the wifi to so im back to normal now but yea how do i do this properly i thought i just it on the rom an every thing is ok lol an whats adb

    its included in the android sdk toolchain.



    Can all the people which had problems, check the version of wpa_supplicant their rom is using? connectbot or via adb in cmd.exe/shell (adb shell wpa_supplicant -v) and post the output?.

    It seems like some newer roms are using wpa_supplicant v6 with different libs.

    You can try to use the precompiled wpa_supplicant from daveba http://forum.xda-developers.com/showpost.php?p=7711198&postcount=6

    our flash the attached signed update zip. (its the same file)

    Attention: its not my file!!
    2
    Sweet.

    I got this working on my HTC Flyer WiFi with FlyHigh Rom.

    Extract the wpa_supplicant from the zip file. Back up your original. Turn WiFi off. Use Root Explorer to paste it into your system/bin folder. Change the permissions on the file to rwxr-xr-x. Turn wifi back on. When scanning it should show (*) in front of any adhoc networks. I have it running with barnacle wifi tether on my OG Droid! W00tness!
    1
    Would anyone provide "ad-hoc support in wep" in a signed update zip? Thanks.
    1
    I got this working on my HTC Flyer WiFi with FlyHigh Rom.

    Extract the wpa_supplicant from the zip file. Back up your original. Turn WiFi off. Use Root Explorer to paste it into your system/bin folder. Change the permissions on the file to rwxr-xr-x. Turn wifi back on. When scanning it should show (*) in front of any adhoc networks. I have it running with barnacle wifi tether on my OG Droid! W00tness!

    Thank you. you are a genius
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone