I have a iPhone 4 iOS 5.11.
I've noticed that , most likely since my upgrade from 4.21 to 5.11, I could only connect to my own wifi, secure wifi... but not on free/public/bars/shopping center wifi. The iPhone would try to connect. Get a dhcp IP then get disconnected when normally a safari web page should have shown up inviting me to login or press a button to access the public wifi.
I have tried:
* shutdowns of the iPhone
* resets of networking settings
* forgets of wifi connections
* turning on/off wifi/Bluetooth/airplane mode
* auto proxy
* switch static ip
* switch bootp
* switch manual proxy
* .....,
Until I've noticed two options that don't show up when I connect to a secure/home/office network... :
* Auto Join
* Auto Login
So I've set Auto Login to off and bam! What do you see! Full connection to that bar free/public wifi!!!!! I wanted to make sure that wasn't a fluke so I went to a drug store that offers free wifi for customers that are waiting for their prescriptions. This time I simply tried to connect as I would normally do. Again that didn't work. Connection would get established for like 40 seconds then IP and all network entries would disappear. So I did my newly found trick: set auto login to off .... BA-BAM!!!
So before you go through the whole restore ordeal, gives this a try.