Win10 + Linux dual system share Bluetooth device
I will follow the article win10 + deepin dual system Bluetooth 4.0 mouse sharing tutorialDocument
My system: Windows 10 + Deepin (Linux)
My device: Bluetooth mouse (surface Arc)
I believe that many people will encounter a problem when using the dual system. Every time the system is switched, the connection of the mouse must be rematched, which is very annoying. After looking for a long time of tutorial, I finally solved this problem
- First, connect to the mouse or Bluetooth device correctly under Linux
- Under the windows system, also connect to the mouse or Bluetooth device
- Next, delete all devices in win10 system, leaving only one device to be shared, so that you can find the corresponding device MAC address
- Then go to Microsoft to download psexec tool
- After decompressing the file, open CMD with administrator’s permission and enter the psexec tool folder
- Execute the command
psexec.exe -s -i regedit
and it will open the registry - Find the following address
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BTHPORT\Parameters\Keys\
and record the LTK (long term key) - Then, close windows and switch to Linux system
- Enter the
/var
file as an administrator premission - After entering the user password, enter terminal from here, and enter
cd lib/bluetooth
to enter the Bluetooth device management interface (in essence, it is the path to/ver/lib/bluetooth
‘ with the administrator’s permission) - It is to modify the file
/var/lib/bluetooth/XX:XX:XX:XX:XX:XX(computer Bluetooth address)/YY:YY:YY:YY:YY:YY(mouse Bluetooth address)/info
file. - Modify the value of
key=XXXXXX
ofLongTermKey
to the address of the device under win10 - After modification, save it. If you do not use VI or VIM to modify the file, you can directly use the text editor to modify it
- However, there is a very important problem. Your mouse address in Linux may be different from that in windows
- However, the Linux task manager does not support modifying the format of the file name
XX:XX:XX:XX:XX
, so you need to use the command line to modify the file name
Usecd ..
to go back to the previous level, and then modify the original Bluetooth addressmv XX:XX:XX:XX:X1 XX:XX:XX:XX:XX:X2
to replace the name of X1 with X2. The effect is as follows - It’s finished here. Restart the system or type
service Bluetooth restart
in the terminal, and then reconnect to the mouse under Linux!
Have a good time!