双系统共享蓝牙配对
linux 生成配置模板
进入 linux 系统连接蓝牙设备,配置生成在路径 /var/lib/bluetooth/XXX/YYY/info
其中 XXX
和 YYY
分别为主机和蓝牙设备的 mac 地址。
windows 配对
配对蓝牙设备
下载
PSEXEC.exe
地址:https://technet.microsoft.com/en-us/sysinternals/bb897553
提取
PsExec64.exe
到c:/windows/system32
终端中输入
psexec64.exe -si regedit
打开注册表编辑器进入蓝牙设置:
搜索路径:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BTHPORT\Parameters\Keys\
找到对应的蓝牙设备,对该文件夹右键可导出配置为 txt 文件
修改 linux 配置
win | linux | format |
---|---|---|
IRK |
[IdentityResolvingKey]-Key |
转大写,去空格和短线 |
CSRK |
[LocalSignatureKey]-Key |
转大写,去空格和短线 |
LTK |
[LongTermKey]-Key |
转大写,去空格和短线 |
EDIV |
[LongTermKey]-EDiv |
转 10 进制 |
ERand |
[LongTermKey]-Rand |
转 10 进制 |
[SlaveLongTermKey] |
不要动 | |
LSK |
不明 |
修改完 linux 配置文件后放回
/var/lib/bluetooth/XXX
中,记得修改文件名YYY
为新的 mac 地址刷新配置
systemctl restart bluetooth
登录自动连接设置:修改
/etc/bluetooth/main.conf
中的AutoEnable
为true