[Galaxy S III Q&A, Help & Troubleshooting] kuhfi:
Hey there!

First time poster here.

Well, I intensively searched the internet on this problem - basically, it's just as the title says. When I connect to our local Wi-Fi, the phone is stuck at "Obtaining IP Adress". After a short while, it turns to "Saved", sometimes it gets stuck on "Authenticating" and sometimes it says "Bad Connection". But most of the time, it's just "Obtaining IP Adress".

Fun Fact: Before I flashed CM10.1 (used stock before), it worked fine. But, since CM is really awesome and I'd like to use it, I'm sitting here since 7 or 8 hours trying to fix this because not having WLAN sucks. :)

Here is a list of what I did:

1. Wipe Dalvik Cache and Cache partition (Multiple times)

2. reflashed CM (multiple times, different builds from the past few days)

3. downloaded some Wi-Fi fixing app (didn't work at all)

4. restarted the phone and the router (multiple times - ha. ha.)

5. forgot the network and set it up again

6. changed file permissions of /system/etc/dhcpd/something with hook, changed to execute for all

7. tried to add a "ap_scan=2" line to some other config file (don't know the exact name right now)

8. shortened my phones hostname to see if CM maybe gave it a longer one and my router is *****y about that

Next, here are some lines from the log I think *could* be interesting:

5917. I/wpa_supplicant( 5448): wlan0: Trying to associate with 00:1f:16:2c:c3:e0 (SSID='XXXXXXXX' freq=2462 MHz)
5919. I/wpa_supplicant( 5448): wlan0: Associated with 00:1f:16:2c:c3:e0
5921. I/wpa_supplicant( 5448): wlan0: WPA: Key negotiation completed with 00:1f:16:2c:c3:e0 [PTK=CCMP GTK=TKIP]
5923. I/wpa_supplicant( 5448): wlan0: CTRL-EVENT-CONNECTED - Connection to 00:1f:16:2c:c3:e0 completed (auth) [id=0 id_str=]

Now, until this point, this looks perfectly fine. Until:

5937. I/wpa_supplicant( 5448): wlan0: CTRL-EVENT-DISCONNECTED bssid=00:1f:16:2c:c3:e0 reason=3 locally_generated=1
5939. D/CommandListener( 1904): Clearing all IP addresses on wlan0
5941. D/ConnectivityService( 2277): ConnectivityChange for WIFI: DISCONNECTED/DISCONNECTED

Well yeah, I turned the Wi-Fi off at some point because it was stuck at "Obtaining IP Adress", as stated above.

The next connection attempt gives the above *plus*:

6051. E/DhcpStateMachine( 2277): DHCP failed on wlan0: Timed out waiting for DHCP to finish
6053. E/WifiStateMachine( 2277): IP configuration failed

As said, before I flashed CM, this worked perfectly fine. I am confused. Really confused. Any ideas? I tried to filter the information I'd (partly) understand out of the log, feel free to look for something I could have missed. You guys probably know this better than me.

Well, from the logs point of view, this is the routers problem. But that doesn't make sense, why did it work before? What could cause the router to not assign a new IP to the smartphone after flashing a ROM? Also, no problems with other devices in the network. Of course, the pass I enter is the right one. WPA2.

Here is the whole log (attach to pastebin URL, I'm not allowed to post links yet):

*************

Thanks in advance! I want to avoid a static IP solution, since this would be more of a workaround and I use multiple different Wi-Fi networks. Sucks. I haven't tried it out with other networks yet, will probably do later today.

EDIT: Update: I tried another Wi-Fi network and it works fine, so the problem seems indeed to be on the router side. But what would cause this? I don't know what significant parts of the phone should have changed, MAC etc should stay the same, even if I flash - or am I wrong here? If anyone more experienced on this subject could elaborate what could cause this, I'd very much appreciate. As said, the Wi-Fi itself usually causes no problems, I can connect new devices smoothly and it worked before. But now, with CM10.1, I can't connect to this specific network.

EDIT2: Okay, problem solved. Our DHCP server was out of IP adresses.