Friday, September 13, 2013

Mac Dropping the Wi-Fi Connection

Starting in the late spring or early summer, my main MacBook Pro started losing its Wi-Fi connection to the AirPort Extreme Base Station (fifth generation) several times per day. Instead of five black signal strength bars in the menu bar, I would suddenly see five gray ones. This seemed to happen most often while the Mac was doing an unattended Arq backup. I could always re-select my network from the menu, and it would instantly connect again with full signal strength. It would never auto-reconnect, however. The problem never affected other computers or iOS devices, even ones the same 35-foot distance from the base station.

I saw Console messages like this:

9/9/13 12:01:14.000 AM kernel[0]: MacAuthEvent en0   Auth result for: 70:73:cb:bb:ae:47  MAC AUTH succeeded
9/9/13 12:01:14.000 AM kernel[0]: wlEvent: en0 en0 Link UP virtIf = 0
9/9/13 12:01:14.000 AM kernel[0]: wl0: Roamed or switched channel, reason #8, bssid 70:73:cb:bb:ae:47
9/9/13 12:01:14.000 AM kernel[0]: en0: BSSID changed to 70:73:cb:bb:ae:47
9/9/13 12:01:14.000 AM kernel[0]: en0::IO80211Interface::postMessage bssid changed
9/9/13 12:01:17.000 AM kernel[0]: wlEvent: en0 en0 Link DOWN virtIf = 0
9/9/13 12:01:17.000 AM kernel[0]: AirPort: Link Down on en0. Reason 2 (Previous authentication no longer valid).

Searching the Apple discussion forums, people have been reporting symptoms like this (probably with different causes) since since Lion, if not earlier.

I found a potential workaround in that there’s a command-line tool that can check whether Wi-Fi is active:

networksetup -getairportpower en0
Wi-Fi Power (en0): On

Which means that it should be easy to write a cron job that re-enables it if necessary:

networksetup -setairportpower en0 on

That could be my backup plan, but I wanted to actually fix this. I called AppleCare, and the specialist walked me though some basic troubleshooting steps: resetting the SMC, resetting the PRAM, doing a safe boot, and resetting the base station. He then got some more specialized information. I was told that:

  1. In the Network preferences, “Require administrator authorization to: Turn Wi-Fi on or off” should be checked. I had thought that this was for when the user turns it off, but the wireless specialist said that it also prevents the Mac from turning off the Wi-Fi chip due to inactivity.
  2. In the Energy Saver preferences, “Wake for Wi-Fi network access” should be checked. I had thought this was for waking the Mac from sleep, but the wireless specialist said that this prevents the Mac from putting the wireless card to sleep, which it tries to do even when the Mac is plugged in and set never to go to sleep.

I was skeptical about this advice, but I tried it. It didn’t help.

It was then suggested that I run Wireless Diagnostics by holding down the Option key and choosing it from the AirPort menu. I had done this before, and it found no problems. However, rather than immediately seeing the report, you can choose the option to “Monitor my Wi-Fi connection.” It will then keep running in the background. When there’s a problem with the connection, it will bounce its Dock icon, write a lot of log files to the desktop (reminiscent of sysdiagnose), and present some recommendations.

In my case, one of the suggestions was to use a dual-band wireless router (which I already had). Another was that the 5GHz band is typically less susceptible to interference from other devices than the 2.4GHz band. I had been using the standard configuration in AirPort Utility with the both the 2.4Ghz and 5GHz channels set to Automatic. On this advice, I checked the box to specify a separate “5Ghz network name,” so that the Mac doesn’t try to connect at 2.4Ghz. After selecting this network in the AirPort menu, the Mac has been reliably connected to the network ever since. (With Wireless Diagnostics running in the background, it has detected several disconnections, but it is apparently reconnecting automatically and immediately so that this is not noticeable.)

Wireless Diagnostics: Crowded Wi-Fi Channel Wireless Diagnostics: Poor Wi-Fi Environment

11 Comments RSS · Twitter

I ran into very similar problems with my MacBook Pro. In my case I wondered if it coincided with new neighbors moving in, possibly adding interference to my existing WiFi, err, airscape?

I ended up "solving" the problem the same way you did, by adopting 5Ghz. In my case It was necessary to strategically place an airport express to stretch the 5Ghz as far as the 2.4 would go. I also have an older Airport Base Station that doesn't support dual band, but I had an unused base station in my cable provider's box, so I ended up adding a second network with a different name for the benefit of any 2.4-only devices that need to connect.

[...] Link. Option key to run AirPort Diagnostics Monitor. Great review. [...]

@Daniel I think my problem was related to neighbors as well. I now count 17 other nearby networks, whereas it used to be more like 10.

I'm seeing this as well and I have both many neighbors (12-20 networks), separately named 2.4-5 networks on a dual band base station and a very small flat where it ought to be impossible to walk out of range. The one time I got something useful out of Wireless Diagnostics, I got the Crowded Wi-Fi Channel deal.

Since I'm running Snowy, I can't really help diagnose if it's a Lion originating client-side issue .

However, I will note that since I've never seen the advantage of Cupertino wireless infrastructure gear over commodity networking gear, and thus employ the latter, and since I long ago created single-band 5ghz Access Points for all gear that supports 5ghz, (since all my gear is single-band in either direction), I've never seen anything like these problem with my Mac clients, despite living in a high-density urban environment with more 2.4ghz networks than one could shake a 50 sticks at...

We were having similar problems. Turned out it was our cable modem. Ours was from 2007 and was not fully DOCSIS 3.0 (I think that's what it was called) compatible. Replaced cablE modem in June and its been rock solid ever since.

@Chucky: I've tried with wireless infrastructure from outside of Cupertino and it still happens.

Actually, I may have spoken too soon. I woke up this morning to find that the 5Ghz network had disconnected.

@Chucky I switched to the AirPort Extreme after years problems with routers from other manufacturers. Overall, I prefer it.

@Bryan Sounds like you were having the Internet connection dropping out rather than the Wi-FI.

Yes, in my case it was wired and wireless, though theses days only the Mac Pro is still wired (and doesn't even get used all that often anymore). For a long time I thought our issue was just wireless and related to our airport.

I've done the 5Ghz thing, and it helped some but I'd still get random disconnects. I finally threw in the towel and wrote a script to watch it. If it can't access a file on my NAS, then it powers the WiFi off then back on. So far, this seems to be working well.

Had the same issue with a 2014 iMac - it only connected to 5GHz wifi networks. Ended up being one of the wifi antennas was disconnected (either not properly assembled, or during transportation) - reconnecting it solves the issue;

Leave a Comment