Bluetooth mouse in dual boot of Windows 10 and Linux

I prefer the Bluetooth mouse to the wireless USB mouse because I feel USB mouses caused chattering when I used them for more than one year. I don’t see the problem with Bluetooth mouse.

However I had one critical problem to authenticate Bluetooth 4.0 mouse in the dual boot.

After I made a pairing between Bluetooth mouse and MS-Windows 10, rebooted the system, and launched Fedora 27, and made a pairing between the mouse and Fedora, the mouse worked fine.

But after rebooted the system again and launched Windows 10, the Bluetooth mouse didn’t work and I had to make a pairing by reboot.

It seems the Bluetooth authentication saves a unique key in the host and I got how to fix the problem.

0. Make a pairing in Fedora 27

1. Make a pairing in Windows 10

2. Get PsTools to read some secret regedit keys

3. Right click on MS-DOS prompt and launch it with an Administrator privilege

3. PsExec64.exe -s -i regedit

4. Save the “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\${DEVICE}\${ADDRESS}

My data is:
Windows Registry Editor Version 5.00

5. Reboot the system and Launch Fedora 27

6. Modify /var/lib/bluetooth/${DEVICE}/${ADDRESS}/info with root

  • If $DEVICE or $ADDRESS is different, you have to move the directory. My path is /var/lib/bluetooth/00:1B:DC:0E:34:54/C4:BE:84:43:7B:D0/info and no problem.
  • Copy LTK in Windows to Key in LongTermKey in Linux with capital characters and no comma
  • Reverse ERand in Windows and convert the hexadecimal without comma to the decimal and paste it to Rand in LongTermKey in Linux. In my case, ERand is 80070be36385dd2b and the reverse is 2bdd8563e30b0780 and the decimal Rand is 3160829177541363584
  • Convert the hexadecimal of EDIV in Windows to the decimal and paste it to EDiv in LongTermKey in Linux. It’s no reverse. In my case, EDIV is f548 and the decimal EDiv is 62792
  • Copy IRK in Windows to Key in IdentifyResolvingKey in Linux with capital characters and no comma
  • Copy CSRK in Windows to Key in LocalSignatureKey in Linux with capital characters and no comma

7. Run systemctl restart bluetooth with root

My modified /var/lib/bluetooth/00:1B:DC:0E:34:54/C4:BE:84:43:7B:D0/info file is:
Name=ELECOM Laser Mouse

Then my Bluetooth mouse in dual boot envirinemnt works fine.


About fujiwara

I'm an open-sourced desktop i18n developer.
This entry was posted in RedHat and tagged , . Bookmark the permalink.

10 Responses to Bluetooth mouse in dual boot of Windows 10 and Linux

  1. pablo says:

    I have a Logitech MX master, which I bought for two reasons, one of them being bluetooth. But I see myself forced to use the USB adapter because if I use it through bluetooh my Wifi connection starts lagging more and more until it just does not reach the host (packet loss 100%).

    I see that behaviour in an Asus UX31A and a Dell Latitude E7470, both with Fedora 26 and now 27. Do you know why could that be or where to report it?

  2. I’m using Ubuntu 17.10 and this procedure doesn’t work for me.

    • fujiwara says:

      Probably I can check if you send me Windows 10 registory file and Linux info files.
      Also probably I think you need to reboot the system after you modify the info file.

  3. Ary Kleinerman says:

    I am using Archlinux and you don’t have to reverse ERand from Windows. You just only have to convert from HEX to decimal. Thx

  4. Mat Lilly says:

    echo $(( 16#$(echo “1C EE 99 08 74 B9 F5 77 7E CA C4 CC 08 37 08 C5” | sed ‘s/ //g’|rev) ))
    … but I am seeing some people say don’t reverse it

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s