9

Possible duplicates:


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. This did not have any effect, though.

  2. Then I downloaded the WiFix app and ran it in automatic mode. Did not do anything either.

  3. Last thing I tried was deleting /data/misc/dhcp/*. 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 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 on the device using their instructions. 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?

  • I remember having a similar problem a while ago (exactly the same thing), but I cannot remember anymore how I solved it. Hints which didn't work for me included e.g. switching to airplane mode, wait a few secs, switching back. Didn't help. In most cases it solved itself "within an hour". // Another ROM might solve it, if a newer radio-image is available, that might help as well. No guarantees, however. – Izzy Feb 21 '14 at 14:33
  • Newer ROM (nightly Cyanogen Mod) did not help, it only made things worse. I updated the question accordingly. – Martin Ueding Mar 4 '14 at 21:26
0

I had the same symptoms while cooking a ROM when the symlink of /system/bin/sh to mksh was missing.

  • I checked, both /system/bin/mksh and /system/bin/sh are present, the latter being a symlink to the former. So this does not seem to be the issue. – Martin Ueding Mar 6 '14 at 21:01
0

As you described that on static IP, connection works. This leads to problem to setting to the router of yours.

For that you need to login on 192.168.1.1 as admin when your are connected to the router. (Please use laptop to get use of all functions of router. Since, many router have desktop UI setting only.)
Go to settings and search for advance setting which has DHCP setting. Now, check for range of DHCP wifi IP addresses. You may need to increase the range.

  • This also does not work on networks I do not administrate. I would suppose that the admins at my university have enough IP addresses for everybody. – Martin Ueding Dec 30 '15 at 15:24
  • Every router has its own capacity to provide number of connection. If you are in range of a router, of which capacity to provide connection is already full. Then, how can it provide IP to you. For more research on no of connection you can use some network tools. Eg.. FING is good to find every connection on that router with every device name. – Vivek Ji Dec 30 '15 at 17:54
0

On the router set static ip addresses. If that doesn't fix it go to Setting > Wifi > Select your network and go to advanced settings. There select (input) a ip address that is not taken. Such as 10.0.0.24. That should fix the problem.

  • That does not work on networks like Eduroam where I must use DHCP. – Martin Ueding Dec 30 '15 at 15:23
0

This exact symptom can be fixed by changing permissions on

system/etc/dhcpcd/dhcpcd-run-hooks

to execute on all accounts: user group and others

As mentioned here

You need rooted device and root browser.

Hope this helps

-2

Try changing the WiFi channel in your router settings. This fixed the issue for me.

  • I do not see how this should help for other wireless networks. – Martin Ueding Mar 25 '15 at 11:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.