Can not get the DNS address thru DHCP

332 views
Skip to first unread message

Looong

unread,
Dec 15, 2010, 1:43:10 AM12/15/10
to android-...@googlegroups.com
Hi,

After I turn on Wi-Fi in android 2.2, it can connect to an AP thru DHCP,
but I found its DNS server address is not present, the phone's property:

[wlan.driver.status]: [ok]

[init.svc.wpa_supplicant]: [running]

[net.dnschange]: [2]

[init.svc.dhcpcd]: [running]

[dhcp.wlan0.result]: [ok]

[dhcp.wlan0.pid]: [1783]

[dhcp.wlan0.reason]: [BOUND]

[dhcp.wlan0.ipaddress]: [192.168.1.113]

[dhcp.wlan0.gateway]: [192.168.1.1]

[dhcp.wlan0.mask]: [255.255.255.0]

[dhcp.wlan0.leasetime]: [7200]

[dhcp.wlan0.server]: [192.168.1.1]

The kernel log:

------------------------------------------------------------------------
-------

DUMP OF SERVICE connectivity:

NetworkInfo: type: mobile[UNKNOWN], state: UNKNOWN/IDLE, reason:
(unspecified), extra: (none), roaming: false, failover: false,
isAvailable: false

Mobile data state: DISCONNECTED

Active network: WIFI

NetworkInfo: type: WIFI[], state: CONNECTED/CONNECTED, reason:
(unspecified), extra: (none), roaming: false, failover: false,
isAvailable: true

interface wlan0 runState=Running

SSID: UMTSSW, BSSID: 00:19:e0:d2:43:50, MAC: 00:0a:f5:89:89:ff,
Supplicant state: COMPLETED, RSSI: -65, Link speed: 9, Net ID: 0

ipaddr 192.168.1.113 gateway 192.168.1.1 netmask 255.255.255.0 dns1
0.0.0.0 dns2 0.0.0.0 DHCP server 192.168.1.1 lease 7200 seconds

haveIpAddress=true, obtainingIpAddress=false, scanModeActive=false

lastSignalLevel=2, explicitlyDisabled=false

NetworkInfo: type: mobile_mms[UNKNOWN], state: UNKNOWN/IDLE, reason:
(unspecified), extra: (none), roaming: false, failover: false,
isAvailable: false

Mobile data state: DISCONNECTED

NetworkInfo: type: mobile_supl[UNKNOWN], state: UNKNOWN/IDLE, reason:
(unspecified), extra: (none), roaming: false, failover: false,
isAvailable: false

Mobile data state: DISCONNECTED

NetworkInfo: type: mobile_hipri[UNKNOWN], state: UNKNOWN/IDLE, reason:
(unspecified), extra: (none), roaming: false, failover: false,
isAvailable: false

Mobile data state: DISCONNECTED

Network Requester Pids:

5:

3:

2:

1:

0:

FeatureUsers:

Tether state:

------------------------------------------------------------------------
-------

------------------------------------------------------------------------
-------

DUMP OF SERVICE wifi:

Wi-Fi is enabled

Stay-awake conditions: 0

Internal state:

interface wlan0 runState=Running

SSID: UMTSSW, BSSID: 00:19:e0:d2:43:50, MAC: 00:0a:f5:89:89:ff,
Supplicant state: COMPLETED, RSSI: -65, Link speed: 9, Net ID: 0

ipaddr 192.168.1.113 gateway 192.168.1.1 netmask 255.255.255.0 dns1
0.0.0.0 dns2 0.0.0.0 DHCP server 192.168.1.1 lease 7200 seconds

haveIpAddress=true, obtainingIpAddress=false, scanModeActive=false

lastSignalLevel=2, explicitlyDisabled=false

Latest scan results:

BSSID Frequency RSSI Flags SSID

00:19:e0:d2:43:50 2457 -62 [WEP] UMTSSW

Locks acquired: 0 full, 0 scan

Locks released: 0 full, 0 scan

Locks held:

------------------------------------------------------------------------
-------

Does anybody have a good idea to work out it?

Thanks in advance.

Horace

unread,
Dec 22, 2010, 10:55:06 PM12/22/10
to android-platform
Hello,
It seems that DHCP server didn't give DNS information.

At first, do the same test with your laptop which has the WiFi
interface.
If the PC doesn't get DNS information, DHCP has a problem.
But if the PC does, please check the DHCP configuration in your
device.

Thank you,

Looong

unread,
Dec 23, 2010, 12:19:34 PM12/23/10
to android-...@googlegroups.com
Hi, Horace:
My laptop can get DNS ip address 192.168.6.1 thru WiFi, and other phone also can.
 
Could you tell me how to check the DHCP config in my device?
Modify some source code files or other any thing?
Waiting for your reply.
 
Thanks for your pointer,
Yulong Zhao

2010/12/23 Horace <nic...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.


Horace

unread,
Dec 24, 2010, 12:40:52 AM12/24/10
to android-platform
Hello Looong,
If your device runs on eng. mode, please check "/system/etc/dhcpcd/
dhcpcd.conf" like the below.

$ cat /system/etc/dhcpcd/dhcpcd.conf
..
option subnet_mask, routers, domain_name_servers
...

You can see "domain_name_servers".
If there is no, your dhcpcd might not take DNSs.

Although there is, if dhcpcd doesn't take DNSs, you'd better capture
packets and inspect the sources.

Thank you,

On 12월24일, 오전2시19분, Looong <zhaoyulong0...@gmail.com> wrote:
> Hi, Horace:
> My laptop can get DNS ip address 192.168.6.1 thru WiFi, and other phone also
> can.
>
> Could you tell me how to check the DHCP config in my device?
> Modify some source code files or other any thing?
> Waiting for your reply.
>
> Thanks for your pointer,
> Yulong Zhao
>
> 2010/12/23 Horace <nice...@gmail.com>
> > android-platfo...@googlegroups.com<android-platform%2Bunsubscrib e...@googlegroups.com>
> > .

Looong

unread,
Dec 30, 2010, 7:28:50 AM12/30/10
to android-...@googlegroups.com
Hi, Horace:
Thanks for your kindly help.
Now it works.
Finally I found the wifi driver module I used was not present in /system/lib/modules, so I changed another one, then it works.

Thanks,
Yulong Zhao
 
2010/12/24 Horace <nic...@gmail.com>
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages