Dual Boot Bluetooth Pairing Problem Guide - Linux & OSX

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
esinahkatakki
Level 1
Level 1
Posts: 1
Joined: Wed Mar 11, 2015 6:21 pm

Dual Boot Bluetooth Pairing Problem Guide - Linux & OSX

Post by esinahkatakki » Wed Mar 11, 2015 6:27 pm

I finally managed to get bluetooth work while dual booting. The problem is that when you log in to osx, you loose bluetooth pairing on the linux side and vice versa. You basically had to pair mouse and keyboard everytime again and again.

Just wanted to share this with you, since it took me several days to figure this out. And internets doesn't have a single simple and easily followed guide. Until now:

I've got late 2012 Imac with 3TB fusion drive. I've split the fusion drive into separate SSD and HDD to gain full control of the disks and clean installed Yosemite on one SSD partition and Linux Mint Debian on the other SSD partition. HDD is solely for photos and stuff. I've got refind installed too. But this has nothing to do with bluetooth! Just little background.

I've got Apple bluetooth keyboard and bluetooh Apple Magic Mouse. And here's how you make them work with LINUX / OSX Yosemite dualboot system.

1. Pair the mouse and keyboard while on LINUX
2. Pair the mouse and keyboard while on OSX

then on OSX terminal run:
sudo defaults read /private/var/root/Library/Preferences/blued.plist

after typing your password, you'll get this:
-------------
{
LinkKeys = {
"4b-8g-cd-43-22-g4" = {
"7c-21-aa-cd-33-4c" = <d2a3cd51 3af1247a 11020891 d2b3df83>;
"e4-89-7a-dc-45-8b" = <35194ceb 8b0c9128 0fdfec7e e17f31e7>;
};
};
}

------------
The "4b-8g-cd-43-22-g4" is mac address of computer's bluetooth. 7c-21-aa-cd-33-4c and e4-89-7a-dc-45-8b are mac addresses of keyboard and magic mouse. Make sure the check which one is which!! You can check it from your mac's bluetooth settings for example. You can also check them after pairing them first time on LINUX at phase 1.

Those long hex numbers d2a3cd51 3af1247a 11020891 d2b3df83 AND 35194ceb 8b0c9128 0fdfec7e e17f31e7 after the mac addresses are the pairing codes ! WRITE / COPY THEM DOWN! And under that, write down the pairing code in REVERSED - PAIR - MANNER. confused ?!

Like this:
original: d2a3cd513af1247a11020891d2b3df83
reversed in pairs: 83dfb3d2910802117a24f13a51cda3d2

3. Reboot to Linux, but DO NOT PAIR the keyboard nor the magic mouse, instead use usb keyboard and mouse !
4. Open your file system, go to /var/lib/bluetooth (you need to open it with root priviledges--> right click the folder and select "open as root")

There you'll find folder named after your computer's BLUETOOTH MAC ADDRESS, i.e. in my case "4b:8g:cd:43:22:g4" seen above. Open it (as root of course).

Inside this folder, you'll find a file called LINKKEYS. It contains your Linux bluetooth pairing codes for bluetooth keyboard and magic mouse. Open it, and you'll see something familiar: The MAC addresses of your keyboard and Magic Mouse followed by 16 HEX code, followed by "06" or "04". The 06 means that the original pairing code was 6 digit figure, and 04 means that it was four digit figure i.e. "0000" for magic mouse. After the HEX conversion the pairing code is naturally something nearly cryptical.

Now, replace the HEX figures with the reversed-in-pairs code you wrote down (see above). Leave the "06" and "04" untouched. And MAKE SURE you know which mac address is your mouse and which one is keyboard!

Save the file. Do not pair anything yet.

Reboot and see the bluetooth magic work finally!

I've still got to figure out though how to make the damn keyboard work during REFIND menu when rebooting after using linux. Ideas?
Last edited by karlchen on Wed Mar 11, 2015 8:07 pm, edited 1 time in total.
Reason: Converted all uppercase in title to title case

kainspb
Level 1
Level 1
Posts: 1
Joined: Sun Mar 29, 2015 1:26 pm

Re: Dual Boot Bluetooth Pairing Problem Guide - Linux & OSX

Post by kainspb » Tue Apr 07, 2015 3:04 am

Hello!

I'm faced the very same problem, but unfortunately at april 2015 this problem not solved, and it seems that it will never be solved... See comment from main rEFInd boot loader developer: http://sourceforge.net/p/refind/discuss ... fb52/#d1af

Post Reply

Return to “Hardware Support”