When multibooting Windows and Ubuntu you continuously have to repair your Bluetooth devices in order to use them. This is because during the pairing process the link-key is created. This key is to be associated with a specific MAC adress. This causes problems as the Bluetooth stack in Ubuntu and Windows have separate keys but use the same MAC adress (same bluetooth hardware to communicate to the device).
In my case this caused a Bluetooth-enabled headphone to be either paired with Windows or with Ubuntu. But never with both at the same time.
If the same key were to be used in both operating systems this problem can be solved. If the standard Windows Bluetooth Stack is used a description is here: finding-bluetooth-link-key-in-windows-7-to-double-pair-a-device-on-dualboot-com.
For the said headphone I am required to use the 'Toshiba Bluetooth Stack' to get A2DP working in Windows 7. In that system the keys are not stored in the registry, instead they can be found in the following file:
C:\Users\%USERNAME%\AppData\Local\Toshiba\BluetoothStack\V1.0\SDP#####.sdb
Where the ######
is replaced by an incrementing number for each boot/pair? I have only tested this while paired with one device, but the key is located after the device name at position 0x910 in my case:
$ hexdump -C SDP00025.sdb
00000000 2a 54 6f 73 42 74 53 44 44 42 2a 00 00 00 00 00 |*TosBtSDDB*.....|
00000010 01 00 50 9d 83 94 0e 68 d2 01 30 12 00 00 00 00 |..P....h..0.....|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000080 7e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |~...............|
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000800 00 00 00 00 36 04 00 00 36 04 00 00 00 16 94 1a |....6...6.......|
00000810 57 46 04 04 24 00 50 58 43 20 35 35 30 00 00 00 |WF..$.PXC 550...|
00000820 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000910 6d 49 0b 42 66 e8 b1 7f ad 5d 6c 4b a0 5f 10 aa |mI.Bf....]lK._..|
00000920 30 f5 13 3e 0b 68 d2 01 20 3f 9e 6f 06 68 d2 01 |0..>.h.. ?.o.h..|
The relevant key is 6d 49 0b 42 66 e8 b1 7f ad 5d 6c 4b a0 5f 10 aa
for the device by the name PXC 550
. The aforementioned link provides explanation on where to place this key for Ubuntu to use. Remember to use service bluetooth restart
to restart the entire Bluetooth stack, just changing the linkkey
file is not enough, a reload is required.