I got tired of my wireless mouse not working after I paired with Windows, only to have to re-pair when I booted OS X. It's an aggrevating little annoyance. Now I can pick up my mouse and walk from desktop to laptop and not have to stop and pair because I did this procedure on both. I still need to change the laptop's OS X link key, that gets done with a hex editor.
One more thing, the registry keys referred to in this tut, point to where the standard Microsoft bluetooth driver records the link keys. If you see anything in device manager in Bluetooth radio, you should try changing to the generic bluetooth driver. If you have broadcom drivers installed or others, they write their keys to different parts of the registry and I don't support them.
Converting OS X link key to Windows registry format tutorial
Here's an example of what a portion of a link key might read in OS X : ABCDEF12
Of course it will be longer but I want to keep this as simple as possible at first.
Here's how you convert it to Windows registry format.
You start at the right with 12, and work your way left, grouping up in pairs, so the next is EF, CD, AB.
This is what it should read after you're done: 12 EF CD AB
All we're doing is taking the furthest two right digits off and putting them in the beggining. Reordering
Now lets apply this to a hypothetical link key.
98542ff9 88e19449 475250e1 3943255b
Start with the furthest right group
5b 25 43 39
then the second from the right
e1 50 52 47
third from the right
49 94 e1 88
and the furthest from the right
f9 2f 54 98
Putting them back together in Windows registry format:
5b 25 43 39 e1 50 52 47 49 94 e1 88 f9 2f 54 98
Understanding how to decode the OS X link key is the difficult part. Converting from little endian to big endian, or vise versa.
Accquire your link key, convert, install to Windows registry
1.Pair the device in Windows first. So the entry and services are all created in the registry.
2. Find your device id aka unique identifier. (Open bluetooth devices icon in system tray, right click on device (mouse etc), go to properties, bluetooth.) Make a note of it
3. Boot OS X and pair the device.
4. Copy/Write down the link key from OS X into a text document or email to yourself so you have access to it when you go back in Windows.
sudo defaults read /private/var/root/Library/Preferences/blued.plist
Link key will be 16 bytes long, it looks like 4 groups of 8 characters in hex.
such as: 98542ff9 88e19449 475250e1 3943255b
To find the one you want, if there are more than one, you would need to find you device unique identifier. Refer to step 2 or you can do it in OS X. Bluetooth preferences, show more info.
5. Convert the 16 byte long string to Windows registry format. Refered to as little endian to big endian. (Refer to mini tutorial above)
5a. Boot to windows
6. Get a free utility from technet psexec (google) copy to desktop.
7. Start > type cmd > hit control+ shift+ enter to create a command prompt with Administrator privledges.
psexec -s -i regedit
9. Find the key in registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BTHPORT\Parameters\Keys\(Unique ID of your network adapter not your device)
10. Your device unique id for your mouse should be visible on the right pane, right click and "Modify binary data".
11. We want to erase Value data, and replace our own. Open that scratch pad where you've been taking notes and hopefully have converted the OS X link key to registry format without any typos, you need to enter it in here, one digit at a time, as it doesn't support copy paste from notepad.
valuedata.jpg 24.33KB 141 downloads
12. Hit OK, close registry, now you have the same link key in OS X and Windows 7. Changes take effect upon pressing OK. No need to reboot to see results.
If you try to pair that device to something else now, you'll need to repeat this process because the link key will have changed on the device. I paired my mouse to the laptop then my desktop (Windows first for the sake of this guide, I still need to test my reverse theory to change OS X's link key values, but first I need rest.) Bootcampers automatically have this done. This procedure is just an outline of what it takes, having a streamlined process like Apple would be the goal here.