Cannot join WIFI, previously no problem My Macbook runs El Capitan, 11.5. This morning, it failed to connect to my home network - which has been working for years. I'm now getting the


  Cannot join wifi network X “please move closer”


message. My other devices still connect. I have tried from this question to connect manually and it chucks the following error:


  com.apple.wifi.apple80211API.error error -3905


I have also:


deleted my network preferences etc
reset PRAM
reset SMC
changed modem channel


Tethering to my phone still works, but that's not through WIFI. Any suggestions?
You can change the channel of your router, maybe it is the problem with it. 
Another possibility is that a Firewall is preventing this. Go to System Prederences-Privacy and Security and then find the Firewall option. Check if it is turned on or off. Change it to either way and check if you can connect now.
Additionally, you can go to Keychain Access app and try to remove everything related to the router such as its password or ... But be careful and don't remove important passwords. 
You can also use the built in diagnoser, which is in System Preferences- Network-Assist Me. See what it suggests. It usually says that you'd better turn your router off for a minute and turn it on again.
You actually have to play (!) with three files in your System Configuration, which the link below explains how.

This discussion in Apple Discussions is also noteworthy : https://discussions.apple.com/thread/6354581?tstart=0