Android Wifi not getting DNS settings via DHCP

Anything related to the other OS running on the Touch Book

Android Wifi not getting DNS settings via DHCP

Postby sirlark » Mon Jan 03, 2011 9:56 am

Hi,

I'm having trouble with android and wifi in 2010.12a. Initially I had the same problem as 2010.11a, i.e. it never connected to my home network, just cycled indefinitely through connecting and authenticating. After a bit of twiddling I finally got it to connect to my home wifi network, and I've no idea why it suddenly started working. Maybe it just needed some time for the first connect. Took about two minutes eventually, now it's connecting in about 10 seconds. The problem is that I can't actually do anything over wifi, because DNS isn't resolving. I can connect to my home router by IP using connectbot. So I tried CTRL-F1 and got a console then had a look at /etc/resolv.conf which had only one line

Code: Select all
nameserver 0.0.0.0


I tried manually changing the nameservers in /etc/resolv.conf, and could then ping by domain name, I tried my home router by name and also google and yahoo to verify the problem wasn't with my NAT box. No problems. But none of the android apps seemed to pick up the changes to resolv.conf. I even killed and restarted firefox in the hopes it would pick up the new settings on a restart, but no dice.

So there seem to be two problems here:
1. TB Android doesn't update resolv.conf via DHCP as it shold
2. TB Android apps do not monitor or use resolv.conf settings

Of course this is my first foray into android internals, so I figure they might use something completely different for DNS lookups, but I'm guessing it's unlikely, especially since ping definitely uses it.
sirlark
 
Posts: 26
Joined: Thu May 27, 2010 6:44 am

Re: Android Wifi not getting DNS settings via DHCP

Postby linuxha » Mon Jan 03, 2011 12:00 pm

Still something flaky with Android and WiFi. I found the same thing you did and I edited the /etc/resolv.conf file. I could kinda get to one google page but not another. With the browsers I could get to local IP addresses but I could not resolve names (works with ping, sometimes). While the latest release is much more stable something odd is going on with the WiFi. I'll play some more to see if I can get a stable setup.
linuxha
 
Posts: 6
Joined: Wed Dec 30, 2009 2:22 pm

Re: Android Wifi not getting DNS settings via DHCP

Postby alexandre » Wed Jan 05, 2011 1:30 pm

Have you tried to manually update DNS in the advanced wifi settings GUI (located at Settinggs/Wireless&Networks/Wi-Fi settings/ + menu button to go to the advanced config options)?
alexandre
 
Posts: 214
Joined: Tue Sep 08, 2009 11:25 am

Re: Android Wifi not getting DNS settings via DHCP

Postby linuxha » Sat Jan 08, 2011 7:56 am

alexandre wrote:Have you tried to manually update DNS in the advanced wifi settings GUI (located at Settinggs/Wireless&Networks/Wi-Fi settings/ + menu button to go to the advanced config options)?

Well it worked, as long as I use static (but it does seem to eventually fail - as in no longer can get to anything even an IP address). I'll reboot it later and try DHCP. At least now the default browser and Firefox can reach the internet.
linuxha
 
Posts: 6
Joined: Wed Dec 30, 2009 2:22 pm

Re: Android Wifi not getting DNS settings via DHCP

Postby cld » Wed Jan 12, 2011 5:19 pm

Try the following from console:

#setprop net.dns1 208.67.222.222
#setprop net.dns2 208.67.220.220

You can substitute the DNS servers of your choice if you don't want to use OpenDNS. You can check to see if the settings stuck by running getprop.

Exit console (alt-F7). You should have working DNS now, at least until you reboot. I've created a script to run the above commands, but I have to invoke it manually every time I reboot. I'd like to run it in a startup script, but I'm not sure how to do that in Android.
cld
 
Posts: 7
Joined: Sat Nov 13, 2010 8:16 pm


Return to Other OS

Who is online

Users browsing this forum: No registered users and 2 guests

cron