Carnation Software

 

MacWise - Macintosh Terminal Emulation - telnet / serial for OS X - Wyse, Viewpoint, VT100, VT220
Icon Pallet - Program and Document Launcher for Mac OS X MacWise - Macintosh Terminal Emulation - telnet / serial for OS X - Wyse, Viewpoint, VT100, VT220 Program and Document Launcher for Mac OS X Beautiful panoramic photographs from Austin, Texas Program and Document Launcher for Mac OS X What's up Dock?

 

Mac Wireless Sleep / Wake
Wireles Connection Problem Explained

(Here is the exact cause of this problem)

April 13, 2014
Last modified April 14, 2014

I have spent the last two months trying to solve this problem and have finally discovered the cause and have a temporary fix.

Since the release of Mavericks in October 2013, there has been a widespread problem with Macs that are unable to reconnect to a wireless network after waking from sleep. This is most prevelant on MacBooks because they are on battery power most of the time and are set to sleep after two minutes of inactivity by default. MacBooks are also mobile and can be used in many locations.

The problem is caused by an interaction with Bluetooth and specifically Bluetooth devices that use Advanced Audio Distribution Profile (A2DP) which is used to stream bluetooth audio from devices such as Bluetooth headsets and Bluetooth speakers.

The problem is caused when the Mac goes to sleep and wakes back up. It tries to connect to the A2DP device that was last used by the Mac. If that device is not powered on or is not in bluetooth range, it will keep trying to connect to that device (for an unknown amount of time). While it is looking for that Bluetooth device, the 802.11 wifi is also looking for the last wireless router or access point and fails to find it.
Why the wifi is unable to reconnect after waking from sleep is not exactly clear because wifi is a different protocol than Bluetooth. One hint is that it only seems to fail with wireless routers that run on the 2.4 Ghz band. That is the same frequency that Bluetooth uses (even though Bluetooth hops through different smaller bands within that frequency.)

I do not have the problem when at home and connected to my Airport Supreme Wireless AC router which is running on the 5 Ghz band.

To prove this, here is what I did...

1. Go to a location where you are having the sleep / wake wireless problem and take your Bluetooth speakers or headphones with you.

2. Now while at that location, Connect to the wireless network there.

3. Turn on the power to your Bluetooth device (speakers or headphones).

4. Turn Bluetooth on and connect to your Bluetooth device.

5. Put your Mac to sleep for 45 seconds (that is enough time for the Macbook to shut down power to Bluetooth.)

6. Wake your Mac back up and you will notice that there is no problem reconnecting back to the wireless network.

7. Now turn OFF the power to your Bluetooth device and put your Mac to sleep for 45 seconds.
You will see that your MacBook will not connect back to your wifi wireless network after it wakes from sleep.
That is because it is looking for your Bluetooth device that it cannot find.

Note that this test is only valid if you are using a Bluetooth device that uses the A2DP protocol. I did my tests with a Bose Soundlink Mini speaker.
I am connecting to a Netgear N300 Wireless Router (WNR2000)


TEMPORARY FIX

The temporary fix for this problem is to trash your Bluetooth preferences file and reboot your Mac. This Wireless Fix app will do that for you. When you run that app, you must restart your Mac for the changes to take effect. Trashing the Bluetooth Preferences removes any Bluetooth devices that you previously had paired (including your Bluetooth speakers or headset).

Also, open Bluetooth Preferences (Apple Menu, System Preferences, Bluetooth)
Remove any audio devices that are shown in the upper section of that list. Those are the devices that have been previously paired.

Then do not use your Bluetooth speakers or headsets until Apple fixes this problem.
(most importantly, do not pair those devices again).

Pairing your iPhone is OK and does not appear to cause this problem. Bluetooth mice and keyboards should be OK (anything that does not use Bluetooth Audio).

If you don't need to use any Bluetooth devices, then turn Bluetooth off.


THE EXACT ITEM IN BLUETOOTH PREFERENCES CAUSING THE PROBLEM

The specific item in the Bluetooth preferences file that causes the problem is
"LastA2DPDevice", which contains a string of data containing the MAC address of the last A2DP device that was used.

The Bluetooth Preferences file is located here...

/Library/Preferences/com.apple.Bluetooth.plist

You can open that file with Xcode and see the LastA2DPDevice item and it's MAC Address.


HOW DO YOU KNOW IF YOU ARE USING A2DP BLUETOOTH DEVICE?

Trash your Bluetooth preferences, restart your Mac.

Open Bluetooth Preferences (Apple Menu, System Preferences, Bluetooth)
Remove any audio devices that are shown in the upper section of that list.
Pair your Bluetooth Speaker or headset device and then connect and disconnect it.
Open /Library/Preferences/com.apple.Bluetooth.plist
If the LastA2DPDevice item is present, then you know you have just paired a A2DP device. You need to trash your Bluetooth preferences and restart your Mac again.


So now that we know the exact problem, it is up to Apple to come up with a fix.
Note that the current version of OS X as of this writing is 10.9.2
I have submitted an Apple Bug report.

Rich Love
Carnation Software


 

About Us | Email

Terminal Emulation | MacWise | AppleScript | Icon Pallet

Privacy Policy

Software Author - Rich Love richlove@carnationsoftware.com




Driftwood, TX 78619


Copyright 1990 - 2014, Carnation Software. All Rights Reserved.