A useful script to simultaneously pair a bluetooth device to your Mac in OS X and Boot Camp Windows
OS X Bluetooth Pairing Value To Windows Value
A script to get the Windows equivalent bluetooth adress/link key pair (little endian?)
This is useful if you would like to pair a bluetooth device to both OS X and Windows (in BootCamp).
Thanks to user pacnow (Camoguy) at discussions.apple.com for doing the leg work and figuring out the algorithm
Follow these steps to get your bluetooth device working.
- pair device with windows
- reboot and pair with OS X
- run this script/app
- save the link key/s somewhere you can reach from windows
- boot to windows
- download psexec from https://technet.microsoft.com/en-us/library/gg697102.aspx
- copy psexec to C:\Windows\System32\
- open CMD with admin rights run "psexec -s -i regedit" with admin rights
- go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\BD_ADDR
- edit the key of the device
- reboot
- read the link keys
up to Sierra:
sudo defaults read /private/var/root/Library/Preferences/blued.plist LinkKeys
High Sierra and onwards:
sudo defaults read /private/var/root/Library/Preferences/com.apple.bluetoothd.plist LinkKeys
- parse the data with awk
- display it in a window
- export a bluetooth.reg file with all paired link keys, if desired
sudo defaults read /private/var/root/Library/Preferences/com.apple.Bluetoothd.plist LinkKeys
Here's an example link key. Instead of just typing that in you want to break it apart starting from the right, taking a pair of two characters at a time.
98 54 2f f9 88 e1 94 49 47 52 50 e1 39 43 25 5b
(What is shown in OS X)
5B 25 43 39 E1 50 52 47 49 94 E1 88 F9 2F 54 98
(What you enter in Windows)
-Help from Camoguy-
Note, this script requires administrator privileges.
Your password is not saved anywhere and only known to you and your OS.
-
Adnaan Soorma
-
Twitter: @Soorma07
-
broeckelmaier
-
Twitter: @broeckelmaier