yashsingh1/xdaforums huggingface dataset:
[Hero, G2 Touch Android Development] HEXcube:
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://xdaforums.com/showthread.php?t=1591207
[Hero, G2 Touch Android Development] blade_h:
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
[Hero, G2 Touch Android Development] luffyp:
How do you see adhoc WiFi in the first place? My phone can't see it even with WiFi Manager :confused:
[Hero, G2 Touch Android Development] babai93:
not working on my galaxy s - jb4.2.1
[Hero, G2 Touch Android Development] HEXcube:
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?
[Hero, G2 Touch Android Development] babai93:
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
[Hero, G2 Touch Android Development] babai93:
Hi,, I am running JB 4.2.1 on my SGS, can u please share wpa_supplicant for the same?
[Hero, G2 Touch Android Development] sergiocues:
Works on ICS?

Did anyone tried it on ICS? Will it work?
[Hero, G2 Touch Android Development] Robotriper:
Stuck on step 2, help!

[MENTION=4801208]HEXcube[/MENTION] 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!
[Hero, G2 Touch Android Development] HEXcube:
Been a long time since I tried this!

Hi [MENTION=8420406]Robotriper[/MENTION] :)

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.
[Hero, G2 Touch Android Development] luvjones305:
help

i flashed it on my droid now my wifi is foreclosing on me why how do i take it off
[Hero, G2 Touch Android Development] blackplatypus:
push your original wpa_supplicant file back (get it from your rom zipfile)

adb remount

adb push wpa_supplicant /system/bin
[Hero, G2 Touch Android Development] luvjones305:
hi

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
[Hero, G2 Touch Android Development] blackplatypus:
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://xdaforums.com/showpost.php?p=7711198&postcount=6

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

Attention: its not my file!!
[Hero, G2 Touch Android Development] luvjones305:
hi

i dont have sdk i have mod recovery with the rom manager app that what i use for swapping roms an kernels i follow the same procedures when i flash roms on my motorola droid flashed an rooted on metropcs froyo frg01b kernel lv-250-1250 an i have connect bot in my sd card an i dont know what its for i bought the phone like this so what is connect bot im a noobie left blackberry to join the android family lol
[Hero, G2 Touch Android Development] zeze_camarao:
how do I apply this patch to SGS?

i dont now how to apply.
[Hero, G2 Touch Android Development] RossLH:
This is causing some serious wifi issues with my Droid (running a rooted version of the original Froyo ROM). Immediately, I noticed that the phone couldn't scan for wifi networks. I replaced the file with the wpa6 file, had the same issues. Replaced both files with the original wpa supplement included in the ROM, and now wifi still wont work.

EDIT: Nandroid restore did the trick.
[Hero, G2 Touch Android Development] blackplatypus:
after pushing the original file "adb shell chmod 0755 /system/bin/wpa_supplicant" might help to set again correct permissions.

a logfile using "adb logcat" would be nice to see the error output.
[Hero, G2 Touch Android Development] manicmoose:
Using the "wpa6_adhoc-signed.zip" version, I can connect to another Android phone's wireless hotspot, but I can't connect to my Windows-7 adhoc connection using wpa2. I can see the connection, but just not connect to it.

Anyone else seeing this behaviour?

Enom 2.11.3 ROM, btw.
[Hero, G2 Touch Android Development] blackplatypus:
yeah thats because adhoc supports only open or WEP encrypted network (in wifi tether too you can only use WEP). It seems that newer windows edition (7, vista) support WPA2 AES, probably a windows only thing, but not sure about that.
[Hero, G2 Touch Android Development] Marshall07:
I'm glad to see people resolving Google lacks! :D

I'd like to patch my wpa_supplicant (I have an HTC Wildfire w/ Android 2.1 and wpa_supplicant v0.5.11)

- Do you think this patched wpa_supplicant will work in my Android 2.1 even if it is compiled for froyo?

- Is it possible to use the v6 over the v5.11 or I have to use the v5 version?

- I guess I must be root to apply the patch, right?

Thanks very much!

Marshall
[Hero, G2 Touch Android Development] xoltrix2000:
I can confirm that the orignal post file has successfully worked on my Nexus One with 2.2 Kang-o-Rama v10 beta rom.

Thank you sir for making this possible.
[Hero, G2 Touch Android Development] meteora:
Obtaining IP address

I can see the adhoc network of my laptop on my phone but when i try to connect it stucks in the phase of obtaining IP address. I use pppoe connection on my laptop for adsl connection and static ip on my nexus one. any solutions?
[Hero, G2 Touch Android Development] blackplatypus:
you need a rooted device to flash the signed update.zip or push the modified wpa_supplicant. Always do a nandroid backup! use the 5.11.

The file was compiled for android 2.2 so it shouldn't work with eclair, depends how much the system libs have changed (bionic libc, libwpa_client.so..), so make a backup try it out ;) and revert in case of fail, or ask a eclair rom developer to build a patched wpa_supplicant for you, unfortunately I have no 2.1 toolchain ready at the moment.
[Hero, G2 Touch Android Development] eortizr:
Having same issue... any help please...
[Hero, G2 Touch Android Development] Marshall07:
Thanks for the reply blackplatypus,

At the moment Wildfire devices can be only "Soft Rooted" (the rooting must be applied manually after each reboot) because they have NAND protection which hasn't been hacked yet. In few words it's possible to execute programs as root but it's not possible to write into some system directories (e.g. /system IIRC).

So probablly I will not be able to replace the wpa_supplicant, even the correct version compiled for Eclair.

I'm just guessing...

Marshall
[Hero, G2 Touch Android Development] alakin:
try to connect with another laptop or smartphone, so that you know if the problem is in the device or in the connection of your laptop. i had the same problem but it was in the wifi connection on my pc
[Hero, G2 Touch Android Development] zioalex:
Thanks guys!

it works on CM6 RC2 on my HTC Magic
[Hero, G2 Touch Android Development] nothas:
Working on HTC Magic, Superfroyo 2.8.2 (based on Cyanogen RC2).

Not getting IP from WEP adhoc network, but ok with open one. Tested with ubuntu 10.04 and zydas chip.
[Hero, G2 Touch Android Development] blunden:
You need a rooted phone and a custom recovery to modify /system and/or flash user-made updates.
[Hero, G2 Touch Android Development] eortizr:
Still nothing.. it just get stock obtaining IP.. but never gets it... the iphone connects just fine to the same computer...
[Hero, G2 Touch Android Development] eXop:
I've installed it on Cronos Droid 2.1.3, which is a Android 2.1 rom. On a GSM Hero.

It works like a charm, no known issues whatsoever.

I'm able to connect to normale WiFi ap's and i'm able to connect to ad-hoc connections made from my laptop which runs Win7.
[Hero, G2 Touch Android Development] luvjones305:
hi

im new what is ad-hoc because i cant never connect to NETGEAR or even D-LINK OR EVEN TP-LINK-DE814C but i can connect to any linksys an all of them are open plus hotels they are not locked i even change my last 3 numbers on my ip address is those netgear an d-link tp-link are they ad-hoc i even installed it in my phone it won't let me connect to any thing it keep foreclosed the wifi before i even turn it on but i took it off an every thing is normal but i cant connect to those other wifi access thanks help
[Hero, G2 Touch Android Development] eXop:
Some punctuation would make this readable ... How can you function with this spelling?
[Hero, G2 Touch Android Development] lefsp:
+1

works great on Cronos 2.1.3

so it should probably work in all 2.1 based Hero roms!

great work really needed that!
[Hero, G2 Touch Android Development] Japanska Buba:
+1

works on Kimera 2.1
[Hero, G2 Touch Android Development] luvjones305:
shut up

shut up an just read the sht this aint skool
[Hero, G2 Touch Android Development] ZedeN:
anyone had any success with Desire? Mine gets stuck on obtaining IP adress.. But im able to connect to the same connection with my Magic
[Hero, G2 Touch Android Development] shixue:
my desire unable to obtain ip...tried manually set static ip, it will keep on reconnect

LeeDrOiD_v1.9

Radio 5_09_00_20

Hboot 0.82
[Hero, G2 Touch Android Development] Gootah:
uuuhhhh....

I have this same error in my myTS after applying this, I didnt read that it was G1/Hero ONLY. Can I restore my files also? Where do I get them? Do I have to adb or can I just flash a ROM?
[Hero, G2 Touch Android Development] PandaKiller:
Any chance to make it work on HTC Desire?
[Hero, G2 Touch Android Development] luvjones305:
help

im new what is ad-hoc because i cant never connect to NETGEAR or even D-LINK OR EVEN TP-LINK-DE814C. but i can connect to any linksys an all of them are open plus hotels they are not locked. i even change my last 3 numbers on my ip address is those netgear an d-link tp-link are they ad-hoc i even installed it in my phone it won't let me connect to any thing. it keep foreclosed the wifi before i even turn it on but i took it off an every thing is normal but i cant connect to those other wifi access thanks help
[Hero, G2 Touch Android Development] trinityEon:
Ad-hoc is connecting two devices wirelessly without the need for a hotspot, access point or hub. meaning if your phone/laptop and a friends phone/laptop set up an ad hoc network you can share files via wireless.

Great work here guys for achieving the once thought impossible :)

+1 vote from me too if someone has this working on hTc Desire, Please share the how to, I would love to be able to use ad-hoc desire to my laptop.

I am running LeeDroids 1.9a
[Hero, G2 Touch Android Development] luvjones305:
THANKS

thank you did this work for you cuz i tried it it cut my wifi off i uninstall it an its working fine now an how will i know if my ad-hoc is on my phone or working thanks
[Hero, G2 Touch Android Development] trinityEon:
i found this page http://www.ott.net/knowledge/htc-desire-adhoc/, not sure if it has anything to do with this, but supposed to be meant for HTC desire, maybe someone can put 2+2 together for us?
[Hero, G2 Touch Android Development] gene83:
It works on my HTC Hero. Rom:VillainROM12

Thank you very much for it. I am waiting this for long time.
[Hero, G2 Touch Android Development] eortizr:
Not working on Aria... stock Obtaining ip add...
[Hero, G2 Touch Android Development] joshcom:
How do I remove the patch.zip since it gets stuck on obtaining ip?
[Hero, G2 Touch Android Development] Niggo372:
Hey,

when I try to flash the update.zip (Bootloader->Recovery->Power+Up-Key->apply sdcard:update.zip - hopefully right) I get a "E:signature verification failed" message.

Device:

Nexus One

Froyo FRF91

Rooted

What am I doing wrong?

Thanks,

Niggo
[Hero, G2 Touch Android Development] blackplatypus:
seems like your bootloader is not unlocked, but dunno got no Nexus, probably doing a forum search should help.

@people being stuck at "obtaining ip address" what about setting the ip network settings (dns,ip,gateway) manually does that work?
[Hero, G2 Touch Android Development] Niggo372:
Ok I solved my problem by using a diffrent Recovery Image: showthread.php?t=611829

That one worked for me. =) But now it gets stuck on obtaining ip. How do i set up IP, DNS and gateway manually?
[Hero, G2 Touch Android Development] blackplatypus:
Menu > Settings > Wireless controls > Wi-Fi settings > Menu > Advanced

there you can select static ip.
[Hero, G2 Touch Android Development] bren7:
Hi,

I'm setting static ip, but my HTC Magic is still trying to obtain an IP. Does Anyone have any idea??
[Hero, G2 Touch Android Development] rogstro:
Does anyone know if this works on HTC legend with Azure 0.5?
[Hero, G2 Touch Android Development] joshcom:
Bump ;)
[Hero, G2 Touch Android Development] yuliusaje:
does it work for galaxy s?
[Hero, G2 Touch Android Development] mysticg:
I want to know if this possible on epic 4g. I use mywi on my iPad, want to be able to use the connection. My phone can't see it at the moment...
[Hero, G2 Touch Android Development] Cristrauss:
Alternative

I´ve been looking like crazy over a bunch of forums to make this thing work in my adhoc conection, and i got nowhere, probably i messed up somehow, but the point is... THERES NO NEED ANYMORE... i found a software that can emulate an AP connection with my pc´s wifi... CONNECTIFY is its name.

It creates a network that the android phones recognize as a normal AP conection. And it works pretty well. No need to Ad-hoc ... modifications... roots... or anything

just install the software and run it...

i hope this is helpfull for someone, the way it was for me!

Thanks a lot for your help anyway people! Is was very enlighting.
[Hero, G2 Touch Android Development] gmmurphy:
droid

anyone get this to work on droid 1. force close, cannot scan networks, oh how i need this to work.
[Hero, G2 Touch Android Development] bradleydsmith:
ad-hoc

I am new to Android and unsure how to build wpa-supplicant--with patch--for donut 1.6. I have downloaded the source for wpa_supplicant and have the android 1.6 sdk. I can't seem to find any info on building binaries for android.

Any help would be appreciated.
[Hero, G2 Touch Android Development] n1ghtm4r:
This thread is really interesting, I just received yesterday my new HTC HD2.

I have already installed HSPL than immediately substitutedoriginal WM ROM with ChuckyROM and loaded the Android ROM mattc Leo + Froyo 1.7 using an Android launcher via WM.

This morning at work I had the bad surprise that Android does not support ad hoc wireless connections.

As suggest I performed the command

adb shell wpa_supplicant -v

and here it is the result

wpa_supplicant v0.5.11 Copyright (c) 2003-2008, Jouni Malinen <j@w1.fi> and contributors

Do you think that the patch discussed in this topic could work? And if yes how to install in my Android ROM on HTC HD2?

Thank you for help
[Hero, G2 Touch Android Development] 1999TL:
ditto. Did anybody get this to work on an HD2?
[Hero, G2 Touch Android Development] n1ghtm4r:
regarding HTC HD, my first attempt was to save

/system/bin/wpa_supplicant

using adb pull and replace with the version attached in this post using adb push

I did a reboot but unfortunately now WiFi does not work at all. It can't be even activated

I re-copied the original wpa_supplicant and rebooted again. Now WiFi doesn't work anymore even with the original one... ops :(
[Hero, G2 Touch Android Development] pascanu:
FTP server not working

I had to revert back to the original wpa_supplicant because FTP server applications didn't work any more. I tried both SwiFTP and FTPServer. After restoring both worked normal (no other files or settings changed).

Can anybody else confirm this?

Is there a way to keep both functionalities?
[Hero, G2 Touch Android Development] eXop:
Scroll back ...
[Hero, G2 Touch Android Development] psfan:
A froyostone v2 build has perfectly solved adhoc problem, it can even see an adhoc network and connect with wep authetication.
[Hero, G2 Touch Android Development] n1ghtm4r:
I tried two Androids ROM based on Froyo and I cannot see Ad Hoc network. The current mounted is CyanogenMod-6.0.0-N1 (shubCRAFT 1.5) Kernel 2.6.32.9

Do you think that FroyoStone builds are different than the one I am currently runing?
[Hero, G2 Touch Android Development] 1999TL:
Darkstone's was the only one that I tried that had it working. I Think I Tried them all.
[Hero, G2 Touch Android Development] SycoLTH:
Any chance to see this patch work with a acer liquid + Froyo?

I tested:

5.11 -> WiFi seems to work as expected, but fails to get ip.

6 -> WiFi fails to work (fortunately flash back to 5.11 again as before)

where can i get my original wpa_supplicant to apply patch directly to it?

thanks, and sorry for bad english
[Hero, G2 Touch Android Development] mysticg:
Anyone get this to work on Epic 4G? please help!
[Hero, G2 Touch Android Development] FlaNKoUTt:
Ad-hoc on SGS

Was anyone able to have ad-hoc on a Samsung Galaxy S? I'm doing a thesis that abords this feature. I would be really apreciated if anyone could help please. I already 'asked' google but still with no positive result..

Regards.
[Hero, G2 Touch Android Development] n1ghtm4r:
Move this post

If there is a moderator I would ask if this topic can be moved in general android development forum because the problem is not only related to HTC Hero but to all Android phones in general

Thank you!
[Hero, G2 Touch Android Development] SycoLTH:
where can i get the source for acer liquid, and how to compile? sorry, but this is a great thing, must be available for every phone
[Hero, G2 Touch Android Development] Infernal Satan:
I hope to see a working version for SGS soon :)
[Hero, G2 Touch Android Development] Merlin868:
Could someone post a compiled wpa_adhoc-signed.zip for Android 1.6 and wpa_supplicant v0.5.11?

That would be very appreciated.

Greez

MERL|N
[Hero, G2 Touch Android Development] akshaypune:
HELP ME!!

understood what u uploaded. does it work even on emulators? i dont have an android phone. so i am developing application in ad hoc networks for android phone in emulator. is there any way to enable networks there?
[Hero, G2 Touch Android Development] webvan:
Promising topic but it seems to be dead, is the OP still around ? How would I implement this on a Milestone with 2.1update1 ?

I've wasted hours using the tiwlan.ini and wpa_supplicant tricks and it works with AdHoc networks created by PCs, but NOT to the AdHoc networks created on my iPad or iPhone and I understand a friend has the same problem with his MAC...so the question is whether anyone has been able to connect to an Apple AdHoc network with this new hack?

Thanks !

continued : ok so I tried both the 05 and 06 versions on my Milestone and both kill WiFi, so I guess the next step is trying to inject the patch in the wpa_supplicant of the Milestone...not sure where to start with that though, any pointers?
[Hero, G2 Touch Android Development] ajiaboya:
Hello,

Can someone give step by step instructions for this newb?

Thanks.
[Hero, G2 Touch Android Development] dadyal:
Hello pleas make a patch for

Samsung Galaxy S I9000 : 2.1
[Hero, G2 Touch Android Development] ducktiger:
Ad-hoc on Samsung Galaxy S

I would also be very happy to find any hints on how to install this on Samsung Galaxy S with Android 2.2.

Thanks.
[Hero, G2 Touch Android Development] webvan:
Installation seems easy enough using "root explorer" in R/W mode, problem is finding the proper wpa_supplicant! Would be great if someone in the know could say whether applying the patch can be done easily with the proper tools or if only a dev can do that.

Thanks!
[Hero, G2 Touch Android Development] me200:
This is what worked for me

I know there are several workarounds for this problem, but this is what worked for me without messing with my new phone (Samsung Galaxy S, Android 2.2). I downloaded Connectify (to PC) and it actually DID work, I swear to my phone :) just wait for Connectify to stop configuring itself (it can take a while, it shows in status bar at the top). I'm running Windows 7 x64.