[Bug 1001825] Re: apple bluetooth keyboard and mouse: conflict between ubuntu and OS X

esinahkatakki esinahkatakka at mailinator.com
Wed Mar 11 22:01:46 UTC 2015


This bug nearly made me throw my mac through the window and move to
forest. None of the above works. After spending several days struggling
with this, searching the whole internets, I finally managed to get
bluetooth work while dual booting. And here's how it goes:

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. WTF ?!

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?

-- 
You received this bug notification because you are a member of
Bluetooth, which is subscribed to bluez in Ubuntu.
https://bugs.launchpad.net/bugs/1001825

Title:
  apple bluetooth keyboard and mouse: conflict between ubuntu and OS X

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1001825/+subscriptions



More information about the Ubuntu-bluetooth mailing list