iPhone error "Unable to connect to network" Two iPhone's in the house, a model 4 (on iOS 6) and a model 5 (on iOS 7), can not connect to the home WiFi network, but can connect at the Apple shop. All other devices on the home network, including desktops, laptops and Android's, are fine.

The error message is displayed about 0.5 seconds after hitting "Join", and is simply "Unable to Join Network".

Trawling forums the advice seems to be to a combination of resetting the network settings on the iPhone and turning the router and iPhone off and on again in various orders.

However, this does not work.
Whilst I have no idea what caused the problem, it was solved in this case by 


Disabling security on the Wi-Fi network, 
Connecting the devices to the unsecured network (which worked), 
Re-enable security, 
Connecting the devices to the secured network.


Somehow, this solved the problem and all devices were able to connect normally.

On our TP-LINK router, a reboot was required whenever the security settings were changed, i.e. after steps (1) and (3).

Rebooting the phone's was not required, though I think I may have turned the Wi-Fi on the phone off and on again.

Hope it helps!