Solution: pairing Bluetooth devices with win10 and Linux dual systems


My computer is equipped with windows (win10) and Linux (Ubuntu 18.04) dual systems. I usually use Logitech’s wireless keyboard, but I find that every time I switch the system, although I have paired before, I can’t connect successfully. You must delete the paired device and re link it every time. Occasionally there will be device delete unsuccessful, very angry. So I want to connect (pair) two systems with one Bluetooth device once and for all.

Device deletion failed

Solution: (reprint, delete)

1. Download the repair tool and complete the installation with the default options. To prevent link failure, attach Baidu network disk link
2. Open shell, input btpair – u from the command line, and press enter to execute
3. Wait, and you will find that the paired bluetooth device has been successfully and completely deleted


Solution: (reprint, delete)

Basic steps:

1. First pair Bluetooth mouse under Linux (used to generate configuration file)
2. Switch to pair Bluetooth mouse under windows (used to read pairing information)
3. Modify pairing information under Linux to be consistent with that under windows

Of course, you can also do the opposite. The pairing information under windows is consistent with that under Linux, but it is not recommended.

Reading Bluetooth pairing information in Windows

The Bluetooth pairing information of windows is stored in the registry

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\<本机蓝牙 MAC>\<鼠标蓝牙 MAC>

The MAC address does not have a separator, and the system permission is required to access it. I found two ways to read this part of information. (I used the first way)

use psexec.exe Start with system permissions regedit.exe
psexec.exe </ code> can be downloaded from this page to ), will In PsExec.exe Or psexec64.exe (here I copy it directly to Windows/system32), and run CMD with administrator privileges (also in Windows/system32), and then Enter the following command to start regedit.exe :

psexec64.exe -si regedit

Then we can view the corresponding key value in the registry editor, and we can also export it: (my length is like this)

Windows Registry Editor Version 5.00


Modifying Bluetooth pairing information under Linux

The pairing information of Bluetooth devices under Linux is stored in the/var/lib/Bluetooth/& lt; local Bluetooth MAC & gt; directory, such as/var/lib/Bluetooth/60:57: XX: XX: XX: XX. The letters in the MAC address are all uppercase and contain colon separator.

Enter the directory: (of course, it’s more convenient to click directly)

sudo su
cd /var/lib/bluetooth/60:57:XX:XX:XX:XX

You can see the paired bluetooth devices in the system:

[email protected]:/var/lib/bluetooth/60:57:XX:XX:XX:XX# ls -l
All 24
drwx------ 2 root root  4096 3月  13 19:48 4C:57:XX:XX:XX:XX
drwx------ 2 root root 12288 3月  13 22:38 cache
drwxr-xr-x 2 root root  4096 3月  13 21:52 EB:50:XX:XX:XX:XX
-rw------- 1 root root    69 3月   9 13:21 settings

Enter the directory of Bluetooth mouse we want to configure:

cd EB:50:XX:XX:XX:XX

What we need to modify is the info file in this directory. Take mine as an example, the file is as follows (it has been modified here. We only need to change the key into the key in the registry exported under windows. Specifically, delete the comma in win and change the lowercase to uppercase)

Name=Keyboard K380



Reset computer

Read More: