Possible duplicates:
- https://android.stackexchange.com/questions/60139/ice-cream-sandwich-cant-obtain-ip-address-what-do-i-need-to-delete-to-reset-wi
- https://android.stackexchange.com/questions/13793/device-stuck-on-obtaining-ip-address-then-sets-network-to-disabled
---
I have a *Sony Ericcson Mini Pro* (Codename “Mango” at CyanogenMod) with CyanogenMod 9.1.0-mango. This is Android 4.0.4.
# The problem
When trying to connect to a wireless network, it will be stuck in an “Optaining IP Address” loop for a while, until it shows “Bad Connection”. This is what it looks like in the wireless network system settings:
My tablet with CyanogenMod 10.2, Android 4.3, can connect to that wireless network without any problems, so can my Kubuntu 13.10 laptop with an Intel wireless card.
# Tried so far
While looking for the cause and a fix for the problem, I found numerous posts that suggest to use a static IP address. This is a legitamate workaround, and I might resort to that, but I would like to fix this in general.
1. The first thing I tried was to [change permissions of

/system/etc/dhcpcd/dhcpcd-run-hooks
to 555](http://androidforums.com/avail-all-things-root/583407-easy-real-wifi-fix-obtaining-ip-address-loop-found-me.html) . This did not have any effect, though.
2. Then I downloaded the [WiFix](http://mhotspot.com/blog/fix-obtaining-ip-address-android-wifi-problem/) app and ran it in automatic mode. Did not do anything either.
3. Last thing I tried was [deleting /data/misc/dhcp/*
](http://thealarmclocksixam.wordpress.com/2013/10/26/dhcp-failure-on-android-wifi-stuck-on-obtaining-ip-address-how-i-solved-it/) . No effect at all.
4. *Update 2014-02-21*: As you can see in the screenshot, the signal strength is really weak, although the phone is one meter apart from the router with a desk in between. Now it connected while being on the table. The signal strength is full now. I read in [a different question](https://android.stackexchange.com/a/13800/27017) that the issue might be caused by a weak signal. Could that the be underlying issue?
My router does not have an external antenna, therefore, it might be a little unpredictable where the signal is strongest. I set the phone onto the router, and it still had the problem. So signal strength should not be the issue.
5. **Update 2014-03-04**: I installed the [latest nightly build of Cyanogen Mod](http://download.cyanogenmod.org/?device=mango) on the device using their [instructions](http://wiki.cyanogenmod.org/w/Install_CM_for_mango) . This installed Android 4.1.3, which had a severe problem with the wireless. It was turned off when I started the device, and it got stuck at activating wifi. So I reverted to the latest stable version which still has this endless loop.
6. **Update 2014-03-04**: For my home network, I set up a static IP address, although I really do not like it. However, the internet connection works now.
7. **Update 2014-03-06**: Checked for /system/bin/sh -> mksh
, and it is present. This does not seem to cause the issue.
How could I fix this apparent DHCP issue?
Asked by Martin Ueding
(498 rep)
Feb 21, 2014, 01:34 PM
Last activity: Jun 12, 2022, 10:08 AM
Last activity: Jun 12, 2022, 10:08 AM