Just try power cycling your WiFi router (unplug, wait 30 seconds, than plug back in). This clears up WiFi connections issues more often than not.
In particular, if you are getting stuck on obtaining IP address, it might be that the router just needs to get the IP addresses freed up (which power cycling the router will accomplish). The router is supposed to free up the addresses after past users have disconnected, but it doesn't always happen.
Also, if your WiFi network has security enable, you can try a different encryption protocol (WEP, WPA, WPA2). In particular, if its on WEP, try WPA or WPA2, which are much more secure anyway. Some devices don't play well with one encryption types or another.