Turn off auto-join. I’ve searched for this several times and always thought it was a stupid design by apple but I finally worked it out.
In your iPhone settings, turn WiFi off then back on again. If it connects to your home WiFi automatically, click on the i (information) symbol next to the connection. Turn off the ‘auto-join’ option. Then you can turn WiFi off then on again to drop the connection without forgetting it.
As the original post I’m replying to is five years old now maybe I’m the only one dumb enough to still be having this problem. But maybe not. :)
Usually the 'Connection time out' happens on weak WiFi signal.
I am assuming you have a decent signal, and further assuming there is something wrong with the saved WiFi profile for that specific location.
To test that:
Follow this guide to connect using copy paste.
In Terminal type following (to turn the airport on)
networksetup -setairportpower en0 on
Next type (to scan for networks and find the one you want)
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport scan
From the Scan above you will get a display of available networks, so pick the one you want and type following (to connect).....while at it look at the RSSI number, the lower the better like (-) 50 or lower. The RSSI is the signal to Noise ration, and if it is a high number (70 or higher) there is your problem.
networksetup -setairportnetwork en0 WIFI_SSID_I_WANT_TO_JOIN WIFI_PASSWORD
skip the password if none.
If above worked, then lets open your WiFi find and Delete that profile, then make a new one.
Best Answer
The latest ios9 has a wifi assist feature. If the phone thinks you're on a lousy wifi connection it will failover to cellular data. I've turned mine off.
Settings > Cellular > Wi-Fi Assist
See https://support.apple.com/en-us/HT205296