garymansell, Well found, it turns out that this is exactly my problem. I guess a number of other people will be having this issue too, especially if, like me, your router is using channel 12 or channel 13.
Going to Applications/Utilitues/Console.app
Then under kernel.log
It showed the following for me:
Apr 9 15:04:59 1234 kernel: en1: 802.11d country code set to 'X3'.
Apr 9 15:04:59 1234 kernel: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
Apr 9 15:05:07 1234 kernel: en1: 802.11d country code set to 'US'.
Apr 9 15:05:07 1234 kernel: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 149 153 157 161 165
GB is what I expect to find - X3 would seem to suffice though.
According to the internet X3 means other country in South America... but it supports channel 13 which is ok by me.
US does not support channel 13 which is what my router is on! This is why my network is never found but my neighbours' are.
The easy solution is to change the channel but I use 13 because it has the least interference!
Now to find a way of changing the country code on my MacBook or hacking it somehow.
Apple should have this as a setting somewhere because I guess that this problem is probably more frequent than is reported.
It's strange because I used to have that problem, but since I updated to Mountain Lion and have done the things that some users and I suggested I never had the problem anymore, I still have the same router and the same wifi settings and nothing else has changed, so it might be that there's is another issue here ...
I never expericenced this problem with any device ever brought in my house (several iPhones, iPads, many laptops, my 2011 Mac Mini), with an except for new mbp 13" I've bought in Hong Kong this spring.
I can confirm nothing changed when I rolled latest OS and airport updates.
The problem was still reproduceable when I started clean (Harpo's method - deleted all prefs, saved connections ets). I played with wifi authentication, setting all available methods including unsecuring network - nothing changed. Other devices still were able to see the network and connect, and mbp was losing the network each time it was waken up.
iStumbler showed my router was hanging on 13th channel, the only one on that channel among two dosens others, all using channels up to 11th. The log contained quoted messages about channels and country codes. Then I changed my router's channel number to 5th and everything magically started working. It is clear the channel trick did the thing for me.
For what it is worth, problem solved (at least for me).
I am on 10.8.4. A couple of months ago, my Mac would not connect to my work Wifi after sleep. Connection elsewhere - friends, home, etc - was not a problem.
To solve the problem, I deleted my work SSID from my Preferred Networks (Network system preferences > Wifi > Advanced > Wifi), then added it back in. Since then, no problems.
Whenever I startet my macbook air (10.7.5) or after waking up from sleep it never reconnected to wifi. After browsing this and many other forums for a sollution I suddenly came across the sollution myself.
1) Open your network controllpanel
2) Hit the settings (litle gears) symbol down in the left corner - besides the pluss/minus symbols
3) Choose "enter service order"
4) Move Wi-Fi to the top
5) Hit the "use" button down in the left corner.
This fixed my problem
I've got a 13" rMBP on OSX 10.9 that has this problem while on my home network, but seems to be fine at work. I've also got a late-2011 15" MBP on OSX 10.9 that only stays at home and doesn't seem to have this problem at all. There are two things that are immediately different between the two: the 15" MBP is always on AC power on my desk whereas the 13" is mostly on battery while at home. The other difference is that I had previously installed an app called NoSleep (https://www.macupdate.com/app/mac/37991/nosleep) on the 15" MBP. I have since installed that on the 13" and so far it's working well, immediately reconnects to wifi when waking from sleep. I'll try to post an update in a couple of days if it continuees to work.
Update, 5 hours later, back to the same old crap, rMBP won't reconnect to wifi from sleep without turning wifi off and back on. Have tried wiping network preferences etc. I'm on channel 6 on my wifi router. Now turned off "Power Nap" in System Preferences -> Energy Saver, we'll see if that does anything.
Not sure if it's been mentioned, but here's a really simple fix that repaired the following problem on 13in. MBP Retina:
Wireless fine after restart, but after sleep it doesn't want to reconnect to preferred network; it can see it, but I have to click on it to connect. No dropping of connection, just this sleep problem.
Tried most of suggestions above, then as my mac is still under initial warranty, I called the Applecare team. Took a fair bit of troubleshooting, and they indicated it's to do with conflicts with bluetooth (as discussed above). The following seemed to clear it for good (fingers crossed):
Delete connection, turn wi-fi off. Go to: MacintoshHD/Library/Preferences/ and here find the file: com.apple.Bluetooth.plist
Copy it to desktop then delete it. Reboot. Find network and reconnect. Good luck!
It may be a problem with the connection information stored in your network profile.
- Go to System Preferences > Network.
- Click the Wi-Fi connection.
- Click the Advanced... button on the bottom right.
- Click the Wi-Fi tab.
- Under Preferred Networks, select your wireless network.
- Click the - (delete) button.
- Turn off your Wi-Fi connection.
- Shut down your mac.
- Turn it back on.
- Turn on Wi-Fi.
- Select and login to your wireless network. This will re-save your connection under Preferred Networks.
- Again shut down your laptop and reopen it to test whether it worked.