Category: Bluetooth

If you’re experiencing issues with MacID not reconnecting properly, this post outlines some of the things that you can do to try and overcome the problems.

Bluetooth in OS X is becoming the new wifi in OS X. That is to say, it’s now exceptionally buggy for some people.

While we wait for Apple to send out updates there are a few things we can do. There are a few files associated with Bluetooth on your Mac, don’t worry about breaking your Mac by deleting anything I recommend in this post because OS X will re-generate the files when it needs to.

In this post on Stack Overflow you can see there are two main files associated with the Bluetooth cache on your Mac. They’re located in two different places though so if this is your first time digging around in system folders you might get a little lost.

Here’s what to do:

There are two different Bluetooth files you need to find to clear the cache. Although I have already written a post on the first file, it uses Terminal, so here’s how to delete the file manually. Note that the file in the ByHost folder will have a few random characters in, but it will always start with com.apple.Bluetooth

First find these two folders:

/Library/Preferences can be found by opening Finder, clicking Go, then clicking on your hard drive, then choose Library, then choose Preferences.

/Library/Preferences/com.apple.Bluetooth.plist – file to delete

~/Library/Preferences/ByHost can be found by opening Finder, clicking Go while holding ALT on your keyboard, then clicking Library, then Preferences, then ByHost.

But why is this happening?

When MacID disconnects, either OS X or iOS (neither I nor Apple are sure which yet) is making the MacID app look like a new device by changing the identifier associated with it.

When you pair MacID for iOS with MacID for OS X, MacID for OS X stores the identifier and uses it to reconnect (so that it knows your iPhone is the right one). If that identifier changes, as above, then MacID will never be able to reconnect without re-pairing.

To make matters even more complicated, connection attempts never time-out with Bluetooth LE so it will forever sit at “waiting to attempt” assuming that your iPhone is just out of range.

During development this happened a few times, but always sorted itself out. Usually after clearing the cache as described above, and restarting both Mac and iPhone a couple of times.

I have now filed two separate bug reports with Apple and are sending them reports when I can.

OS X really aggressively caches Bluetooth connections, which makes working with Core Bluetooth a royal pain.

After much searching about, I’ve found a way that seems to clear the cache properly. Turn off Bluetooth, open up terminal and copy and paste these three commands in order. You’ll have to enter your password after the first one, and you won’t see your password entered as you type (but it is being entered, so hit return once you’ve entered it and then copy the next two commands):

This was bugging me for quite some time, and although there are numerous posts on the web regarding this issue, nothing worked for me.

The problem I was having, was that Bluetooth was on, and couldn’t be turned off. In Bluetooth preferences in System Preferences the “Turn Bluetooth Off” button was greyed out and not selectable, and in the menu bar (sometimes called status bar), the option wasn’t there at all. Below are some screenshots of how it should look when everything’s working okay:

This is how it SHOULD look.Turn Bluetooth Off didn’t exist for such a long time 🙁

This problem persisted through OS X 10.9 Mavericks to OS X 10.10 Yosemite, so at first I was concerned there was a problem with the Bluetooth radio in my computer.

So how did I fix it? Well, thankfully due to having OS X Yosemite on an external drive (for development testing while it was in beta) I could boot into that and see if Bluetooth worked properly there. Thankfully, it did, and that means that it’s not a problem with the Bluetooth radio in my Mac, rather a problem with my install. So I set about comparing all the Bluetooth related files hidden away I could find.

For some reason, on my faulty OS X install, in
/Library/Preferences/SystemConfiguration/ there was a file called com.apple.Bluetooth. In my working OS X install, this file didn’t exist. It was the only difference I could see, so I deleted it. After a restart, BEHOLD! The option to turn Bluetooth off re-appeared in both System Preferences and the menu bar.

Hopefully this helps others, as I found nothing to do with this on the web anywhere and there still seemed to be some people in forums that couldn’t fix theirs. Maybe this was the issue.