Finding bluetooth link key in Win7, to double pair a device on dualboot computer

Posted by Ilari Kajaste on Super User See other posts from Super User or by Ilari Kajaste
Published on 2011-01-06T18:57:11Z Indexed on 2011/01/06 19:56 UTC
Read the original article Hit count: 225

Filed under:
|
|

How can I dig up the bluetooth link key for a paired device in Win7? Is this something that is dependent on the bluetooth stack I'm using (Toshiba), or is there a generic place to store these in Win7?

Note: I'm not talking about the six-digit code usually typed by the user during pairing - that is worthless since it's discarded after pairing process. What I mean is the 128-bit link key that the devices exchange during pairing, and use thereafter to encrypt all their bluetooth traffic.

Background:

I dualboot Win7 / Ubuntu on my laptop, and I would like to have my phone paired to both OS's. Since the dualbooting computer has only one bluetooth adapter and thus only one bluetooth address, I cannot do two pairings to the phone, since on the second pairing (windows) the phone just replaces the previous pairing (linux) to the same bluetooth address.

A thread on Ubuntu forums pointed me to what I have to do - pair first on linux, then on windows, and then replace the link key on linux side with the one windows negotiated.

I can find the linux side pairing key from /var/lib/bluetooth/[BD_ADDR]/linkkeys - no problems there.

However, on windows side I can't find the key. According to the forum post, on windows side the key should be in SYSTEM\ControlSet002\services\BTHPORT\Parameters\Keys\[BD_ADDR] but while that registry key does exist, it has no subkeys. (And a similar registry path in ControlSet001 didn't have any subkeys either.)

One thing I've been instructed to do is to capture all events during pairing with Sysinternals Process Monitor. I did this, but I haven't been able to find any useful information from the captured events, not even by exporting the data to a huge XML and grepping that with the BD_ADDRs (with or without colons).

So how could I find the link key for a paired device in Win7?

Some reference information: Wikipedia: Bluetooth, Security Now: Bluetooth security

© Super User or respective owner

Related posts about windows-7

Related posts about bluetooth