Using unsupported Bluetooth 4.0 USB dongle with OS X
UPDATE: Looks like with OS X Mountain Lion, you don’t have to do the following hack anymore! The Broadcom dongle I describe in this article is supported on OS X Mountain Lion by default! In fact, the new kext includes support specifically for the IOGEAR GBU521 Bluetooth 4.0 Micro Adapter! Also, you might want to consider getting the IOGEAR one since the eBay one I got has a bright blue LED that’s always lit and can be pretty annoying at night.
MORE UPDATE: There’s been reports that while this guide worked in getting the drivers loaded for the external Bluetooth adapter, some was still stuck with the Apple’s built-in adapter. I’ve added some further tips at the bottom on how you can manually select which adapter to use. However, since my MacBook’s internal Bluetooth device is actually already dead, I cannot verify this at this point of writing. Please let me know if it works.
SOME MORE UPDATES: It seems that a lot of visits to this page comes from users who are looking to try and enable Handoff to work on older Macs. From what I’ve read and seen, all you need is to get a compatible Bluetooth 4.0 module like the IOGEAR GBU521 Bluetooth 4.0 Micro Adapter and then enable it using the Continuity Activation Tool available here.
—– End of Update —–
If you find yourself wanting upgrade your Mac’s Bluetooth 2.1 support with a USB dongle that supports Bluetooth 4.0, here’s a tip for you to get it on the cheap with those Bluetooth 4.0 USB dongles you find posted on eBay.
Why I even explored getting a Bluetooth 4.0 USB dongle was due to the untimely demise of the onboard Bluetooth 2.1 chip on my 2010 MacBook Pro. It just went dead without any warning after about 1.5 years of me using my MBP. So I searched for a Bluetooth dongle that has Mac support. You’d be surprised that there isn’t many that officially states OS X support, especially so for a Bluetooth 4.0 dongle. So in the end, I decided to pick one that apparently used a photo of the dongle (see below) plugged into a MacBook Pro and hoped that it would work.
If you’re wondering which Bluetooth 4.0 dongle I bought, this link will bring you to the item page on eBay and it cost me US$12.98 for the dongle.
And jumping ahead, it works, so you could go ahead and get the same too, especially if you decide to use the same kext file that I’ll post up in this article as a sample. Unfortunately, it’s no longer listed as of my last check.
Update: In retrospect now that I’ve been using the cheaper eBay dongle, you might want to consider getting the IOGEAR one. Why? The eBay one has a bright blue LED that’s always lit and can be pretty annoying at night. So unless being a little ‘bling-bling’ is your thing, get the IOGEAR GBU521 Bluetooth 4.0 Micro Adapter which looks a little more discreet. Also, you can sometimes get pretty good deal on Amazon and get this dongle for as low as US$13.50.
But of course any Bluetooth 4.0 USB dongle would do as long as it is using the exact same chip as the IOGEAR’s dongle, which is Broadcom’s BCM20702A0 chip. You can read more about the chip here.
Now, you’d probably guessed that the dongle didn’t work right out of the box, hence this article. When I plugged in the dongle, Bluetooth support was nonexistent. However, the USB dongle did register up in the USB Device Tree when I checked with the System Information.
What that means is that OS X does see the hardware. However, there isn’t a driver that the OS can find for the Bluetooth dongle and therefore didn’t ‘load’ it up.
The solution then is to perhaps hack the kext (kernel extension) that handles the Bluetooth devices and include support for this dongle! And since the newer Macs all have Bluetooth 4.0 support, I’m sure that the drivers included with OS X Lion (10.7.4 as I’m writing this post) would have drivers that supports it. And in my case, support for the Broadcom BCM20702A0 chip.
A quick search around the Internet reveals the exact kext to edit. Basically the one that you need to hack is /System/Library/Extensions/IOBluetoothFamily.kext.
Within that kext, BroadcomUSBBluetoothHCIController.kext, is another next that is basically the Broadcom driver.
In order to get to them, just head over the /System/Library/Extensions/ location in finder. Seek out the IOBluetoothFamily.kext and open up the package contents. Note to the newbies, a kext ‘file’ is really just a special folder that holds a collection of files that make up the kernel extension.
And before we continue, I found that the best and sure fire way is to create a copy of the IOBluetoothFamily.kext to a different location, i.e. the desktop or anywhere you like, edit it there and use the Kext Utility to ‘install’ the kext. I’ll come to the installation steps soon, but go ahead and make a copy of the kext file now.
Ok. Now you have the copy of the kext file, open up the IOBluetoothFamily.kext package, continue to navigate to /System/Library/Extensions/IOBluetoothFamily.kext/Contents/PlugIns/ and you’ll find another kext named BroadcomUSBBluetoothHCIController.kext.
Do the same again for the BroadcomUSBBluetoothHCIController.kext and open up the Contents folder. In that folder you should find the Info.plist file.
This is the file that you would need to edit to add the support for your new Bluetooth USB dongle.
But before we edit the file, let’s get some information of the Bluetooth device, specifically the product and device id, that you’d need in order to edit the plist file. You can actually get this information from the System Information utility. Just do a spotlight search for “System Information” if you don’t know where to find it.
Once open, you would need to browse to the USB device tree and look for the bluetooth dongle. Now, it may show up in various names depending on the Bluetooth USB dongle you get, but it should be easy enough to identify which is the exact device. In my case, it just showed up with the name BCM20702A0 . Selecting the item reveals the information you need which would be the Product ID and Vendor ID values.
Now the values you see for both the Product ID and Vendor ID are in hex. And if you’ve gone ahead to open up the Info.plist file, you’ll then notice that the idProduct and idVendor values are in integer. So you’ll need to convert it from hex to integer.
In my case with the BCM20702A0 chip, the Product ID value is 0x21e8. Converting 21e8 to integer gives me the value of 8680. As for the Vendor ID, 0x0a5c is 2652 in integer. If you don’t know how to convert hex to integer, just use this site here to do so. Now that you know your Product ID and Vendor ID in integer form, let’s move on to edit your plist file!
To do so, just open the Info.plist file with any text editor. As for me, I’m using TextWrangler to do so. You should see a bunch of text in the form of an XML document. Just scroll down all the way to the end till you find a key by the name of “Microsoft Bluetooth 2.0 USB Dongle”.
What you need to do is simply copy and paste a new entry using the “Microsoft Bluetooth 2.0 USB Dongle” entry and edit it with the new information you found (see the red text below). Note that for the new of the device, you can basically use any name you want. What OS X cares about is only the idProduct and idVendor keys as that’s what it uses to match and load the appropriate drivers.
.... .... <key>Microsoft Bluetooth 2.0 USB Dongle</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.driver.BroadcomUSBBluetoothHCIController</string> <key>IOClass</key> <string>BroadcomUSBBluetoothHCIController</string> <key>IOProviderClass</key> <string>IOUSBDevice</string> <key>idProduct</key> <integer>156</integer> <key>idVendor</key> <integer>1118</integer> </dict> <key>Bluetooth 4.0 USB Dongle</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.driver.BroadcomUSBBluetoothHCIController</string> <key>IOClass</key> <string>BroadcomUSBBluetoothHCIController</string> <key>IOProviderClass</key> <string>IOUSBDevice</string> <key>idProduct</key> <integer>8680</integer> <key>idVendor</key> <integer>2652</integer> </dict> </dict> .... ....
If you aren’t sure about this, you can use the sample edited kext file here – IOBluetoothFamily.kext. You could use my kext file right off the download. However, I’d advice you to try editing it yourself to be familiar with the process since every OS X update is likely to ‘wipe’ off your hacked ‘kext’ and you’d need to re-do the steps again, and it’s always best to edit it from the latest kext file.
Once you have the edited kext. Next is to use the Kext Utility (download) to replace the original kext file. When you load up the Kext Utility, you’d see that it would be running some activities upon start-up. Just leave it to do whatever it’s doing until it’s done with whatever that it’s doing. Then, drag the edited kext file over into the Kext Utility and you will see it installing it onto your system. Again, it will let you know when it’s complete.
When finish, just quit the Kext Utility and reboot your system. Once restarted, your Mac should now recognize the new Bluetooth device and you’re good to go!
But to make sure that the new dongle is the active one being use, hold on to the option key and click on the Bluetooth icon on the menu bar. If you see the version to be 4.0 then you’re ok.
If it’s not version 4 (assuming your internal MacBook’s Bluetooth dongle is not BT 4.0 that is), one way to change this is to use the Bluetooth Explorer tool that should be already installed on your Mac. Just follow the screenshots below since it’s pretty self explanatory.
Let me know if the Host Controller Selector works!