Hello! I have Sony Xperia Z2 and everything was good till I started to have issues with Wi-Fi connection.
While connecting to wi-fi network it drops after "Obtaining IP address", it tries to connect and then go again and again obtaining IP. I tried to reset it, then "Forget network" and connect again, it worked for some time, but after it stuck again. What else can I do? Thank you in advance.
Wi-Fi connection in Xperia Z2 keeps Obtaining IP address
Some reasons that your mobile phone seems to find it hard on connecting with your WiFi; One, too many devices are already connected with the WiFi network that you have or using. Second, your Xperia may be too far away from the WiFi network and the signal is poor for the mobile to be able to connect uninterrupted. These reasons provided a hint on how to be able to resolve your issues. Knowing few possible reasons is solving the problem by 50% already.
Wi-Fi connection in Xperia Z2 keeps Obtaining IP address
Hello Kimberly walker,  There is not any problem with your Sony xperia device. There is a problem in your WiFi connection. Check and be ensure that is your WiFi works and connect with other devices. I am confident enough that it would not work. Please re-fix the setting of your WiFi. It will be worked.
Wi-Fi connection in Xperia Z2 keeps Obtaining IP address
 Hi Kimberly!
 The first that comes up to my mind is your router settings. I had the same problem a while ago.
– The closer you are to your router, the better signal you will have, with less blocks on your way. You will confirm the doubt if you try to connect your phone with another network and see if it is working. If it connects to another router, then depending on the router you own, try entering the router's address in the browser of your computer to check manually and change necessary settings and see if the DNS server is not the problem.
– If your phone doesn't connect to another router that emits signal properly, then it must be the phone settings. Make sure if the WiFi sleep policy under the advanced option in phone settings are turned ON. Afterwards, reboot your phone.
You can find all the necessary information on following link – Xperia Support Forum , that has covered all the problems regarding WiFi issues.
Regards,
Mathew Tand