• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root "Obtaining IP Address" loops on DHCP error

RBEmerson

Android Enthusiast
Jun 12, 2011
546
29
SE PA
Long story short, there's a problem with Android and DHCP. Specifically, the problem of the "Obtaining IP address loop" comes down to a botched record of IP lease times. That is, an IP associated with a router doesn't die when it should and attempting another connection goes back to this IP instead of using the correct (new) IP.

The good news is to head into /data/misc/dhcp/ and remove the remaining files. That flushes the DHCP lease information and life should be good - at least for a while (repeat as needed). However in my case, and other folks', too, /data is empty. At least I can't find any sub-dirs. So where is the lease info? Beats me! I did a search for dhcp_lease (lives under /data/misc/dhcp/ - if /data is populated) and couldn't find it, period.

In starting this topic, the list of "look at these threads first" topics included a suggestion to alter execute permissions for /etc/dhcpd/dhcpd_run_hooks to allow user, group, and others to execute this file. Unfortunately, while I can find this file, I can't find anything but rw pwrmission on it.

I'm not sure my file tool has superuser status (I've rooted the phone but use the stock ROM). I'll address that issue next.
 
1) Rooting is what gives you access to superuser (or root) access. Most RPMs come rooted, so if you flash a ROM you're probably rooted, but you can root without flashing a ROM.

2) Have you tried forgetting the connection? That'll blow all the connection's leases.
The phone has been rooted for several months; I use the standard ROM. Initially I rooted the phone to deal with a compatibility issue with the Bahamian phone system. I had to edit a file to avoid a problem that killed data connections. That's a topic for another thread.

I've "forgotten" the connection I want make so many times I've lost count. If I have it right, the problem is that forgetting doesn't always clear out DHCP lease info. At any rate, I found some where it shouldn't exist.
 
Upvote 0
I want to sort out one important detail in this process:
Tinkering with the files cited above requires that the phone is rooted and files are examined as superuser.

CAUTION
: For anyone reading this thread, and who is squeamish about rooting or hacking files:
Your only option, and this is only a poor workaround, is to use a static IP address. This may or may not work. If you don't understand the concept and installation of static IP's, your only choice is to not use access points using WEP security.

The problem is an Android bug. The patch seems to be very slow in making its way to the user community. WEP is a very insecure way to secure an access point. Moving to WPA is more secure and avoids the above stated bug. If you cannot change from WEP to WPA and using a static IP fails, in two words: you're screwed. Sorry, but there it is.

- - - -

All of that being said, this thread should stay on the issue of fixing DHCP lease problems and not rooting, etc. Either you know how to root and work as su or you don't. See above caution. 'Nuff said.
 
Upvote 0
Here's where things stand. The file in /data/misc/dhcp/ is a PID file, and it's empty, even when trying to connect. There's nothing in there according to FX's binary viewer. The recommended fix (add execute permission for "others" - AKA "global") is installed. (I did a reboot to be sure the permission change was picked up, although it shouldn't be needed) I think the PID file is empty because DHCP didn't assign an IP to the phone.
 
Upvote 0
At this point I can usually avoid the looping. Part of the problem that, for some reason, the ADSL modem/router I'm stuck with doesn't like long, secure passwords, period. Relatively short simple words work but using numbers, changing case, and using punctuation bring the router to its knees.

It's possible to authenticate a connection, but DHCP never gets into the game. Maybe this is unique to the modem/router, maybe not. However, rebooting it didn't help.

One suggestion seems to help: change the phone's network name.

See this page for a summary of what the name looks like and how to change it. Note the caution that rebooting the phone clears the name change.
 
Upvote 0
Things get weirder... two things seem to be happening that make no sense: 1) the connection can be broken for a poor signal even though I unchecked that option and 2) both Chrome and Firefox browsers rarely get to a given page, even though other net tools such as Play Store work just fine.

On point 1, the general signal strength around here fair to good. Why the connection is being dropped, with a usable signal and the "drop if the signal is poor" option off, makes little sense.

The browser thing is even stranger. All I can think of is that they share some common service(s) that misbehave. CatLog shows some suggestion Chrome is struggling, but I can't tell for sure what's happening. FF is still doing the same thing (going in to navel gazing mode instead of bringing up the requested page) despite an update this morning.

If I were on a laptop or desktop machine, I'd scrub FF and re-install it and ditto for Chrome. And I'd look hard at dropping and reinstalling the WiFi "card" - not much of an option here...
 
Upvote 0
I scrubbed FF and Chrome and didn't improve a thing. At the end of the time spent on the looping issue, there are only a few certain conclusions.

1a) The T-Online Sinus 111 DSL modem/router (as offered here in Germany) sucks. Plain and simple.

1b) It doesn't like some passwords (such as this example: Wh33zy-Horn!).

1c) It has other problems that make the RAZR MAXX a less than welcome user device.

2) Changing net.hostname didn't fix anything. YMMV however.

3) The looping effect seems to be tied to the password issue in 1b above. I used "something" as a password and the looping issue went away. I tried a password with a-z 0-9 and back to looping. The current password won't survive a dictionary attack but it's used under WPS and the system is otherwise just a browser and email machine. Whatever - movin' on.

The big conclusion:
4) Rooting the phone, to fix any of the above issues, isn't needed. The same phone, tied to other routers, works as expected. The laptop I'm writing this post on has no problems with the router. The problem seems to be how the stock OS/ROM combo in this RAZR MAXX copes with a particular router.

Thus this thread is a rain dance that hasn't produced much more than one cloud that rained a drop or two. Life is like that some days...

End of story. #30# Ciao.
 
Upvote 0
This is a follow-up to the thread above.

Part of the problems that prompted the thread included miserable performance with the router I have to use while I'm in Germany. My laptop has no problems other than the lack of speed seen with a DSL connection. Stuff happens. The RAZR MAXX was just barely usable.

Today I spent some time in a book store and signed on to their free (no registration or fees!) net. Since then the RAZR MAXX has worked as it should while using the Router From Hell. All I can think of is the use of the free net somehow flushed out some trash that caused the problems. Or not... It's all very Twilight Zone.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones