You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Dual pairing in OS X and Windows

If I understand the bluetooth pairing process correctly, the MAC addresses of a bluetooth receiving device (the bluetooth adapter itself) and a bluetooth emitting device (in this case, the Magic Trackpad) are paired shared a randomly selected 16-bit link key. I might be wrong, but my hunch is the link key is stored (possibly encrypted) in the Trackpad itself and, additionally, somewhere in a file in OS X (com.apple.bluetooth.plist???). After pairing the Trackpad with OS X and booting into Windows (using Boot Camp), the link key (stored in the clear in the Windows registry under System\ControlSet???\services\BTHPORT\Parameters\keys, followed by the bluetooth adapter MAC address, then the Trackpad MAC address and then, as its value, the link key itself) will be different from the one stored in the Trackpad. For them to be the same, pairing is required, thereby destroying OS X pairing, et cetera.


So, put in a nutshell, for dual pairing to be effective we need one of two things:

  1. Apple could provide either OS X or Windows tools capable of reading the relevant link key from one system and writing it into the relevant plist or the Windows registry.
  2. Someone could let us know where exactly the blue tooth link keys are stored in Snow Leopard, so that the relevant OS X link key can be copied to the relevant entry in the Windows registry.

Advice will be most welcome.

Magic Trackpad-OTHER, Mac OS X (10.6.7)

Posted on Jun 11, 2011 3:28 PM

Reply
12 replies

May 9, 2017 1:32 PM in response to Edumara

Sorry for bumping a 6-year-old thread, but I want to add my solution in case someone comes to this page with the same question.


It was totally by accident, but a bit of fooling around with the BT adapter drivers worked for me. I was rather surprised to say the least. This may not work for everyone, but I it worked for the Insignia BT mouse that looks almost like the Apple Magic Mouse (except it has no touch). Note I am also using a newer MacBook Pro that uses BT 4.0 LE (Low Energy). These were my steps (you need to use another non-BT mouse or a trackpad to do this):


0) Pair the mouse in OS X

1) Pair the mouse in Bootcamp (I used Windows 10.1)

2) Go to Control Panel

3) Open Device Manager

4) Open Bluetooth

5) Right-click on your BT adapter (mine was Microsoft Bluetooth LE Enumerator) and select Properties

6) Click the Driver tab, then click "Update Driver"

7) Click "Browse my computer..."

8) Click "Let me pick from a list..."

9) Uncheck "Show compatible hardware"

10) Select Apple from the right list, then select the only entry in the left list

11) Click Next and you should have the latest Apple BT driver

12) Your BT mouse will stop working, and cannot be paired again

13) Repeat steps 2 through 4

14) You should see a BT adapter with a warning icon, right-click on it and go to Properties

15) Click the Driver tab, then click "Roll Back Driver"

16) Restart in OS X and your BT mouse should be working


That's it! You will never have to re-pair that mouse again, unless you reformat, pair to another PC, or change adapter settings. It is also possible that updating either OS, or the Bootcamp drivers, can erase the pairings. If that happens, just repeat all the steps.

Jun 16, 2011 11:32 PM in response to Edumara

If an Apple engineer has read this, it appears they aren't willing to share their knowledge. Be that as it may, this is what I've discovered so far:


The Snow Leopard link keys can be found in /private/var/root/Library/Preferences/blued.plist. This file can be opened with a Pist editor. In my case, it contains a couple of entries (couplings) for my only Bluetooth device, i.e., the Magic Trackpad, whose MAC address is paired with a couple of entries, which I supposed are MAC "identities" of my Bluetooth USB receiver. The Plist editor shows one 16-bit hex key for each pairing.


Now, in theory, these keys should be copied to the relevant Windows registry entries in Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BTHPORT\Parameter s\Keys\

(these entries MUST be accessed running psexec -s -i regedit.exe).


There are two main entries under ...\Parameters\Keys, each coinciding with what I presume are the two (?) MAC addresses of the Bluetooth dongle. Under each of these entries there's a REG_BINARY key whose name is the MAC address of the Magic Trackpad and whose value (the Bluetooth link key both devices share to communicate) SHOULD be made the same as in blued.plist.


Unfortunately, the operation doesn't work. Now my Windows registry contains the same link keys as my blued.plist, but the Magic Trackpad doesn't do anything in Windows (and I don't want to pair it again, or I would be forced to do the reverse operation in blued.plist.


I must be missing something. Are the link keys in blued.plist to be interpreted as big-endian, so that bits should be swapped in the Windows registry? Any advice will be most welcome.

Jun 17, 2011 1:37 PM in response to Edumara

As a continuation of the above, analysis of the relevant MAC addresses has revealed that the "extra" link key both in blued.plist and the Windows registry is, as far as I can see, an unexplained false pairing between the Magic Trackpad and another person's iMac just a short distance from my Mac Pro. Apparently, both Macs were paired at the time the pairing of the Trackpad occurred.

Sep 24, 2011 10:59 AM in response to Edumara

I found the answer.


We have to enter the link key from right to left, two digits pairs at a time. I setup boot camp, and inspecting the link keys, I saw they were backwards, but in two digit pairs. So if OSX says 12345678 you will enter 78 56 34 12 on Windows. I believe it's little endian, but I am very sleep so might have to double check.


1. Pair mouse with windows, then go back in and pair in OS X.


2. Get the link key from OS X and email it to yourself or put it somewhere you can reach from Windows.

[code]sudo defaults read /private/var/root/Library/Preferences/blued.plist[/code]


3. Boot Windows, open cmd as admin, [code]psexec -s -i regedit[/code]


4. Navigate to HKLM\System\CurrentControlSet\services\BTHPORT\Parameters\Keys\ (BT ID of Mouse/Keyboard) and begin modify binary data


Here's an example link key, instead of just pluggin that in, what you want to do is break it apart starting from the right, working two digits at a time in pairs.


98542ff9 88e19449 475250e1 3943255b ( What is shown in OS X)

5B254339 E1505247 4994E188 F92F5498 (What you enter in Windows)


-Camoguy

Dec 11, 2014 9:48 PM in response to pacnow

I took pacnow's great steps and turned them into an AppleScript to help automate the process a bit. After you pair the device first in Windows then in OS X, run the script, and it will popup a dialog with the OS X and Windows bluetooth pairing [Key,Value] pairs which are [Bluetooth device mac address, Bluetooth device pairing value]. The script will automatically format the Windows pairing value to the correct little endian.


I've uploaded my AppleScript to this git repository. Feel free to clone it and run the script. Enjoy!

https://github.com/Soorma07/OS-X-Bluetooth-Pairing-Value-To-Windows-Value.git


Note, the script does require admin rights to run and prompts for your current user's password. I have no interest in your passwords. I'm strictly using this password in the script. The code is all open source, feel free to dig in and confirm. 🙂

Nov 20, 2016 10:51 AM in response to feitianw

Similar to Soorms, i created a little script.

It parses the plist and creates a registry file which can be imported with the regedit tool on windows.

No need to manually editing the values.


You can find it here:

https://github.com/digitalbirdo/BT-LinkkeySync


I have also problems like feitianw, getting my Bluetooth 4.0 LE device (Logitech MX Master) to work.

Does someone has an idea, how to exchange BLE Linkkeys?


I'm using macOS Sierra 10.12.1 and Windows 8.1 Prof.


- DigitalBird

Dual pairing in OS X and Windows

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.