I had that same problem for quite some time and I think I may have something that may help.
Several times I have reset my phone to factory mode and each time I did that my phone was fine and I could connect to any wifi in my home, work and other places. Yesterday I noticed that my wifi would...