Share bluetooth mouse between dual boot Win10/Linux

I have recently wiped my old laptop with dual boot Win10 and Arch Linux. My bluetooth mouse can store 3 paired devices but it will be nice to use the same slot.

Thanks to stackexchange, I found it is possible. But some updates are needed.

  1. Windows Regedit will not show content of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BTHPORT\Parameters\Keys No additional tools are needed as other posts, just “Export” it. The subkey values will be in the exported file.
  2. The key is not a single hex string, there are 4 of them: IRK, LTK, EDIV and ERand. They mapped to /var/lib/bluetooth/[Adapter MAC]/[Device MAC]/infokeys IdentityResolvingKey/Key, LongTermKey/Key, LongTermKey/EDiv and LongTermKey/Rand
  3. EDIV is a DWORD on Windows but decimal for Linux. For my case, I converted "EDIV"=dword:0000c8ae to EDiv=51374
  4. ERand needs conversion as well, two bytes to decimal, "ERand"=hex(b):e4,26,8e,2f,52,4d,a7,5a to Rand=58406363992106942842

As other posts reminded, keep the device off when boot Linux.

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.