Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,813,583 Members 37,391 Now Online
XDA Developers Android and Mobile Development Forum

no route by dhcp - flock dhcpcd-wlan0.pid

Tip us?
 
41.kretschi
Old
(Last edited by 41.kretschi; 6th March 2014 at 11:39 AM.)
#1  
41.kretschi's Avatar
Member - OP
Thanks Meter 6
Posts: 41
Join Date: Feb 2014
Default no route by dhcp - flock dhcpcd-wlan0.pid

Hi guys,
I have a problem with my wifi connection:
it's connecting and receiving the ip address by dhcp but no route is beeing set. It happens with different routers and wifi networks, so its not a router problem. also with my notebook I can connect to it regularly and everything works fine.
On my phone I have to set the route by hand afterwards - it's the only fix I found so far.
I do it by redoing the dhcp process and I have to do it twice. I don't really understand the problem dhcpcd has the first time but maybe that's the problem why no route is being set in the first place.

Code:
root@serranolte:/ # dhcpcd wlan0
dhcpcd[12685]: flock `/data/misc/dhcp/dhcpcd-wlan0.pid': Try again
1|root@serranolte:/ # dhcpcd wlan0
dhcpcd[12706]: version 5.5.6 starting
dhcpcd[12706]: wlan0: rebinding lease of 10.126.49.136
dhcpcd[12706]: wlan0: NAK: requested address not available from 1.1.1.1
dhcpcd[12706]: wlan0: broadcasting for a lease
dhcpcd[12706]: wlan0: offered 10.126.49.97 from 1.1.1.1
dhcpcd[12706]: wlan0: acknowledged 10.126.49.97 from 1.1.1.1dhcpcd[12706]: wlan0: checking for 10.126.49.97
dhcpcd[12706]: wlan0: leased 10.126.49.97 for 14400 seconds
dhcpcd[12706]: forked to background, child pid 12749
root@serranolte:/ #
I also took a look at the dhcpcd.conf and the hooks files. the properties are not being set. is this an issue? maybe you guys know how to fix this.

Code:
root@serranolte:/ # getprop | grep dhcp
[dhcp.wlan0.dns1]: []
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[dhcp.wlan0.domain]: []
[dhcp.wlan0.gateway]: []
[dhcp.wlan0.ipaddress]: []
[dhcp.wlan0.leasetime]: []
[dhcp.wlan0.mask]: []
[dhcp.wlan0.mtu]: []
[dhcp.wlan0.pid]: [30155]
[dhcp.wlan0.reason]: [BOUND]
[dhcp.wlan0.result]: [ok]
[dhcp.wlan0.server]: []
[dhcp.wlan0.vendorInfo]: []
[init.svc.dhcpcd_wlan0]: [running]
root@serranolte:/ #
I don't know if this is an CM issue? I didn't have problems with other devices running CM connecting to the same AP at the same location.
I already read a lot about similar problems at other phones but nobody ever had a fix for it.
Is it a radio problem or maybe a kernel issue?

I hope this is the right forum for it.

I'm running the latest CM11 nightly on a Samsung Galaxy S4 mini LTE (GT-I9195)
The problem also occurred with the stable builds of cm10.2 and cm10.1

any help will be appreciated

Thanks and cheers 41


Gesendet von meinem GT-I9195 mit Tapatalk
 
41.kretschi
Old
(Last edited by 41.kretschi; 18th March 2014 at 06:12 PM.)
#2  
41.kretschi's Avatar
Member - OP
Thanks Meter 6
Posts: 41
Join Date: Feb 2014
delete
 
htto
Old
(Last edited by htto; 15th March 2014 at 09:34 AM.)
#3  
Member
Thanks Meter 192
Posts: 86
Join Date: Feb 2014
First of all: hi

Second: The props should get set

"
root@mb526:/ # getprop | grep dhcp
[dhcp.wlan0.dns1]: [a.b.c.d]
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[dhcp.wlan0.domain]: [lan]
[dhcp.wlan0.gateway]: [a.b.c.d]
[dhcp.wlan0.ipaddress]: [a.b.c.e]
[dhcp.wlan0.leasetime]: [43200]
[dhcp.wlan0.mask]: [255.255.255.0]
[dhcp.wlan0.mtu]: []
[dhcp.wlan0.pid]: [12193]
[dhcp.wlan0.reason]: [REBOOT]
[dhcp.wlan0.result]: [ok]
[dhcp.wlan0.server]: [a.b.c.d]
[dhcp.wlan0.vendorInfo]: []
[init.svc.dhcpcd_wlan0]: [running]
"
with a.b.c.d being the AP/router and a.b.c.e the phone/client

Interestingly your [....result] prop is [ok]. Anyway, the [...reason] says bound (and your pid file is still there), so do more than one instance of dhcpd run in conflict? Also
"
dhcpcd[12706]: wlan0: NAK: requested address not available from 1.1.1.1
"
looks suspicious. Address collision with another client?

Local dhcpcd.conf reads

"
interface wlan0
option subnet_mask, routers, domain_name_servers
"


EDIT

Ok, forget about the [ok] and [BOUND] stuff...
You could run
"
dhcpcd -B -d wlan0
"

which stops dhcpcd from going background (-B) and should print debug info (-d). dhcpcd defaults to syslog which I don't know how to retrieve, hence no info in logcat either.
The Following User Says Thank You to htto For This Useful Post: [ Click to Expand ]
 
41.kretschi
Old
#4  
41.kretschi's Avatar
Member - OP
Thanks Meter 6
Posts: 41
Join Date: Feb 2014
Thank you!
Actually I found out that it only happens when I use a wifi network with 802.1x security. Standard WPA2 works fine.

It happens with some phones and works fine with some other phones.

Is this a kernel issue?

I'll try the debug next week when I'm back at the 802 network. Will report back then.

Gesendet von meinem GT-I9195 mit Tapatalk
 
htto
Old
#5  
Member
Thanks Meter 192
Posts: 86
Join Date: Feb 2014
Quote:
Originally Posted by 41.kretschi View Post
Thank you!
Actually I found out that it only happens when I use a wifi network with 802.1x security. Standard WPA2 works fine.

It happens with some phones and works fine with some other phones.

Is this a kernel issue?

I'll try the debug next week when I'm back at the 802 network. Will report back then.

Gesendet von meinem GT-I9195 mit Tapatalk
Phew, could have several reasons, but does the dhcp server by chance do MAC based client setup? Though it could also be a phone issue, but the
"dhcpcd[12706]: wlan0: NAK: requested address not available from 1.1.1.1"
makes me think it's a server issue. I guess
"dhcpcd -B -d wlan0"
could provide some useful insights.
The Following User Says Thank You to htto For This Useful Post: [ Click to Expand ]
 
41.kretschi
Old
#6  
41.kretschi's Avatar
Member - OP
Thanks Meter 6
Posts: 41
Join Date: Feb 2014
Quote:
Originally Posted by htto View Post
Phew, could have several reasons, but does the dhcp server by chance do MAC based client setup? Though it could also be a phone issue, but the
"dhcpcd[12706]: wlan0: NAK: requested address not available from 1.1.1.1"
makes me think it's a server issue. I guess
"dhcpcd -B -d wlan0"
could provide some useful insights.
Code:
1|root@serranolte:/data # dhcpcd -B -d wlan0
dhcpcd[12468]: flock `/data/misc/dhcp/dhcpcd-wlan0.pid': Try again
1|root@serranolte:/data # dhcpcd -B -d wlan0
dhcpcd[12472]: version 5.5.6 starting
dhcpcd[12472]: wlan0: using hwaddr c8:14:79:cb:f4:ec
dhcpcd[12472]: wlan0: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd[12472]: wlan0: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd[12472]: wlan0: reading lease `/data/misc/dhcp/dhcpcd-wlan0.lease'
dhcpcd[12472]: wlan0: rebinding lease of 10.126.51.101
dhcpcd[12472]: wlan0: sending REQUEST (xid 0xe082c143), next in 4.33 seconds
dhcpcd[12472]: wlan0: NAK: requested address not available from 1.1.1.1
dhcpcd[12472]: wlan0: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason NAK
dhcpcd[12472]: wlan0: broadcasting for a lease
dhcpcd[12472]: wlan0: sending DISCOVER (xid 0x1fa99d89), next in 3.87 seconds
dhcpcd[12472]: wlan0: sending DISCOVER (xid 0x1fa99d89), next in 8.67 seconds
dhcpcd[12472]: wlan0: offered 10.126.49.192 from 1.1.1.1
dhcpcd[12472]: wlan0: sending REQUEST (xid 0x1fa99d89), next in 4.52 seconds
dhcpcd[12472]: wlan0: acknowledged 10.126.49.192 from 1.1.1.1
dhcpcd[12472]: wlan0: checking for 10.126.49.192
dhcpcd[12472]: wlan0: sending ARP probe (1 of 3), next in 1.44 seconds
dhcpcd[12472]: wlan0: sending ARP probe (2 of 3), next in 1.05 seconds
dhcpcd[12472]: wlan0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd[12472]: wlan0: leased 10.126.49.192 for 14400 seconds
dhcpcd[12472]: wlan0: adding IP address 10.126.49.192/22
dhcpcd[12472]: wlan0: adding route to 10.126.48.0/22
dhcpcd[12472]: wlan0: adding default route via 10.126.48.250
dhcpcd[12472]: wlan0: writing lease `/data/misc/dhcp/dhcpcd-wlan0.lease'
dhcpcd[12472]: wlan0: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd[12472]: wlan0: sending ARP announce (1 of 2), next in 2.00 seconds
dhcpcd[12472]: wlan0: sending ARP announce (2 of 2)
I can't see anything from that. Can you? Any ideas?

When I turn off Wifi at the phone and turn it on again, the same game starts over again.
 
htto
Old
#7  
Member
Thanks Meter 192
Posts: 86
Join Date: Feb 2014
Quote:
Originally Posted by 41.kretschi View Post
Code:
dhcpcd[12472]: wlan0: adding IP address 10.126.49.192/22
dhcpcd[12472]: wlan0: adding route to 10.126.48.0/22
dhcpcd[12472]: wlan0: adding default route via 10.126.48.250
dhcpcd[12472]: wlan0: writing lease `/data/misc/dhcp/dhcpcd-wlan0.lease'
dhcpcd[12472]: wlan0: executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason BOUND
I can't see anything from that. Can you? Any ideas?

When I turn off Wifi at the phone and turn it on again, the same game starts over again.
Umm... that looks like it gets a route(r) and also sets the default gateway? That is a failure log? If so, what would be the supposed gateway? And the run-hooks with reason BOUND should set the properties you were missing in your first post. I'm a bit puzzled...

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Android M Mentions Spotted in Android Code Review

While we are still waiting for Android L to be officially released, the first mentions of … more

Create a Simple Custom Launcher from Scratch

When you are starting your journey intoany sort of development, it’s never easy at the … more

MediaTek Continues Steps Towards Being Developer-Friendly

Not too long ago MediaTek was very closed off towards the mobile developer … more