Finding Bluetooth link key in Windows 7, to double pair a device on dualboot computer

Solution 1:

The registry key you should use is :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys.

On my computer, it refused to let me access this key. I had to change the owner to Administrators before I could see the sub-key.

If you are using the Toshiba Bluetooth stack, its keys are stored somewhere else. One can either find where, or simply return to the Microsoft stack. In the later case, the Bluetooth keys will be stored in the registry as above.

This thread describes the process :

  1. Uninstall Toshiba Bluetooth (Add/Remove programs),
  2. Reboot,
  3. Windows should now detect the "new" Bluetooth device and install its own drivers for it.

Caution: Create a system restore point first, and ensure you have the installation media for the Toshiba driver for going back (just in case). Test well the functionality of the paired phone before crying victory.

Solution 2:

The keys are not visible to the admin, you should open the registry as the system account:

This is for Windows 7 on a ThinkPad with thinkpad bluetooth 4.0 adapter but might work with other windows systems

Download PsExec: http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

Unpack it to c:\portable\pstools\ open cmd click start, type cmd, press enter, inside the black and white window type:

c:\portable\pstools\psexec -s -i regedit

regedit opens up, navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\

there you'll find MAC address of all of your bluetooth adapters, and under each adapter, are all the paired devices's MAC addresses with their link keys.

to figure your adapter's MAC address:

bluetooth settings> Hardware > ThinkPad Bluetooth 4.0 > Properties > Advanced > Address

to figure your device (keyboard/mouse) mac address:

Control Panel > Hardware and Sound > Devices and Printers > right click your device > Properties > Bluetooth > Unique Identifier 

Solution 3:

I had exactly the same problem, so I found this post and now want to share my experience. If you have android smartphone that task might be actually much more easy since pairing linkkey should be present on both of your devices.

The most useful tool is the ADB from Android SDK.

Let's assume the phone have XX^6 address and PC -- YY^6

$ adb shell
~ # find|grep linkkeys
~ # ./data/misc/bluetoothd/XX:XX:XX:XX:XX:XX/linkkeys
~ # cat ./data/misc/bluetoothd/XX:XX:XX:XX:XX:XX/linkkeys
YY:YY:YY:YY:YY:YY 393FCA48F0DB57AA4D59F423E4EA60D5 5 -1
~ #

Thus you can just pick the key from that file and put it into similar file on your PC:

pc $ sudo -s
pc # cat /var/lib/bluetooth/YY:YY:YY:YY:YY:YY/linkkeys
XX:XX:XX:XX:XX:XX 393FCA48F0DB57AA4D59F423E4EA60D5 5 0

This way seems to be most easy as linux and android usually use the same bluez bluetooth stack.

Still, if you personally despise such a technique, there is another way for getting the key from the windows registry provided standard windows drivers are used. I did receive that security message dialog, so I used "chntpw" native linux utility which allows one to reset the password or edit the windows registry file. The file requiered was "windows\system32\config\SYSTEM".

Here it goes:

$ chntpw -e SYSTEM
blah-blah-blah
> cd ControlSet001\services\BTHPORT\Parameters\Keys\yyyyyyyyyyyy
(...)\BTHPORT\Parameters\Keys\5cac4c10c4f1> ls
Node has 0 subkeys and 1 values
  size     type            value name             [value if type DWORD]
     16  REG_BINARY        <xxxxxxxxxxxx>

(...)\BTHPORT\Parameters\Keys\5cac4c10c4f1> hex xxxxxxxxxxxx
Value <xxxxxxxxxxxx> of type REG_BINARY, data length 16 [0x10]
:00000  39 3F CA 48 F0 DB 57 AA 4D 59 F4 23 E4 EA 60 D5 9?.H..W.MY.#..`.

As you can see that is exactly the same numbers as in files above. Hope it will help future generations.