Balakrishna Vanka's blog

Using bluetooth mouse in windows/linux dual boot machine with out re-pairing

I got a nice Logitech MX Master Bluetooth  mouse. When ever I boot into different OS on my dual boot laptop I used to loose Bluetooth connection. I came across this article in internet which explains how to avoid re-pairing Bluetooth mouse on dual boot machines.

It explains how to extract Bluetooth connections keys from windows registry using sysinternal psexec and then update Bluetooth configuration file under linux to use same connection keys.

http://console.systems/2014/09/how-to-pair-low-energy-le-bluetooth.html

Instead of doing tricky conversions mentioned in above link, you can note down decimal equivalent values from windows registry and use those values to update linux conf file.

Update:

I have to do below two updates to make it work

  1. I updated IdentityResolvingKey in addition to keys mentioned in above link
  2. Left EncSize as 16 instead of changing it to zero.

Tip: Instead of exporting and then doing tricky conversion of registry values do below steps

Issue command: psexec -s -i regedit

from there export folder “HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\BTHPORT\Parameters\Keys”

From Registry editor note down  decimal values of EDiv and Rand such that we don’t need to covert later.

To easily reformat IRK, LSK and LTK values into Linux format, use python interpreter as below:

  1. Open python interpreter and Assign key string to a variable like
    a = ‘dc,07,9f,29,1b,84,23,f1,be,fe,73,73,a4,c3,d8,c7″
  2. Now to get the reformatted value, use below python code
    a.replace(“,”,””).upper()– Good Luck

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *