Enables connection to ad-hoc WiFi networks, WEP semi-working

Search This thread

manekineko

Senior Member
Jul 26, 2009
1,008
231
Happened across this in another XDA thread:
http://forum.xda-developers.com/showpost.php?p=7674767

They have a patched wpa_supplicant file that can connect to ad-hoc wifi networks, which our default one cannot. It shows ad-hoc wifi networks with a * in front. This can be useful if you're traveling and want to connect to a computer's Internet connection sharing.

Interestingly, it seems to get farther in connecting to WEP networks as well, in that it connects and thinks it's connected, but then the Internet still doesn't work. I took a look at the logs but didn't see anything helpful in there. Maybe someone smarter than I can figure out what the issue is? They're unsecure, but sometimes if you're at a hotel, it's the only game in town.

You can install this just by copying it to your sdcard's root and editing your froyo.user.conf to include a line like:
mount --bind /sdcard/wpa_supplicant /system/bin/wpa_supplicant

Edit: Update, it turns out that when connected to WEP, it's actually working as well! Unfortunately, the issue seems to be that somehow the DNS is not working. Things that only need IP addresses like sync and entering IP addresses into the browser work fine. If anyone wants to take a stab at fixing this, it'd be much appreciated.
 
Last edited:

arrrghhh

Inactive Recognized Developer
Feb 10, 2007
11,906
3,851
Cooooooool!

You should get this committed. /system/bin I would think be in the system image... so mention it to stinebd.

Eh, I'll mention something to him now

Seems it'll never get committed...
Code:
+#define ANDROID_IBSS_HACK
+
+#ifdef ANDROID_IBSS_HACK
lol!
 
Last edited:

arrrghhh

Inactive Recognized Developer
Feb 10, 2007
11,906
3,851
cant you remember the other thread about ad-hoc?... whatever

i have the code in a bat file is there a way to mount it on start up?

Sorry, lots of threads man...

manekineko included a way to mount it at boot:
manekineko said:
You can install this just by copying it to your sdcard's root and editing your froyo.user.conf to include a line like:
Code:
mount --bind /sdcard/wpa_supplicant /system/bin/wpa_supplicant
 

manekineko

Senior Member
Jul 26, 2009
1,008
231
I played around more with the WEP thing, and I think it's getting really close.

It actually really is connected, there's no incorrect reporting by Android. What's failing is the DNS somehow.

If you run the Terminal Emulator, you're able to ping IP addresses no problem (for that matter you can enter IP addresses into the browser and load webpages no problem). My Gmail sync already had an active connection beforehand, and so it had an IP address to work off of, and even that connected fine on WEP and downloaded new email.

However, no matter what I do, I can't seem to get DNS working.

Here are the things I've discovered in case anyone else wants to carry on the torch:
-In the terminal emulator, DNS never seems to work. Android does not use the standard Linux resolv.conf file, so none of the command line tools can resolve DNS. Puzzlingly, even when using nslookup and specifying your own DNS server does not seem to work.
-Instead, what Android does is store the DNS into two properties: “dhcp.eth0.dns1” and “dhcp.eth0.dns2”. You can read these using the command line command "getprop", and there is already an IP address set in dns1 for me after connecting to WEP, so the problem isn't there I think.
-You can modify these properties, and that normally works to change the DNS server in Android, using the command "setprop". I changed dns1 to the OpenDNS server, and I could verify the change took on the command line using getprop, however, still in my browser I couldn't load any pages by domain name.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Happened across this in another XDA thread:
    http://forum.xda-developers.com/showpost.php?p=7674767

    They have a patched wpa_supplicant file that can connect to ad-hoc wifi networks, which our default one cannot. It shows ad-hoc wifi networks with a * in front. This can be useful if you're traveling and want to connect to a computer's Internet connection sharing.

    Interestingly, it seems to get farther in connecting to WEP networks as well, in that it connects and thinks it's connected, but then the Internet still doesn't work. I took a look at the logs but didn't see anything helpful in there. Maybe someone smarter than I can figure out what the issue is? They're unsecure, but sometimes if you're at a hotel, it's the only game in town.

    You can install this just by copying it to your sdcard's root and editing your froyo.user.conf to include a line like:
    mount --bind /sdcard/wpa_supplicant /system/bin/wpa_supplicant

    Edit: Update, it turns out that when connected to WEP, it's actually working as well! Unfortunately, the issue seems to be that somehow the DNS is not working. Things that only need IP addresses like sync and entering IP addresses into the browser work fine. If anyone wants to take a stab at fixing this, it'd be much appreciated.