Android phones support Wi-Fi connectivity. While this works most of the times, sometimes users face common issues where the users are not able to connect to Wi-Fi. Usually this kind of problem can be resolved by turning off the the Wi-Fi and turning on again. This solution works most of the times. However sometimes the problem persists.
We do not know the exact reasons of the problem, but the solution is as simple as reloading the WLAN driver. This is not as difficult as it sounds. There is a secret hardware code by which you can unload and reload the WLAN driver.
The secret code is: *#*#526#*#*
Just dial this secret code. You will see the following screen:
After this screen is seen, activate your Wi-Fi again and hope that it works . If it doesn’t then try rebooting the phone.
Credits:
LINK