241. 双系统蓝牙同步

预备工作

下载 extract_reg, 并运行 chmod +x ./extract_reg

步骤

  • logi m750
    1. run: ./extract_reg logi.reg
    2. 将原始的 /var/lib/bluetooth/<蓝牙mac地址>/<设备mac地址> 复制一份到<新的mac地址>, 详见: grep -E '# Address=' logi-bluez-snippet.ini
    3. 备份 /var/lib/bluetooth/<蓝牙mac地址>/<设备mac地址>/info
      1
      sudo cp /var/lib/bluetooth/<蓝牙mac地址>/<设备mac地址>/info{,.bak}
    4. 将如下值同步一下
      1. IdentityResolvingKey.Key -> IdentityResolvingKey.Key
      2. LongTermKey.Key -> PeripheralLongTermKey.Key
      3. LongTermKey.Key -> SlaveLongTermKey.Key
    5. run: sudo systemctl restart bluetooth
    6. run: bluetoothctl connect <新的mac地址>
  • 其他设备
    1. run: ./extract_reg device.reg
    2. 备份 /var/lib/bluetooth/<蓝牙mac地址>/<设备mac地址>/info
      1
      sudo cp /var/lib/bluetooth/<蓝牙mac地址>/<设备mac地址>/info{,.bak}
    3. 将如下值同步一下
      1. IdentityResolvingKey.Key -> IdentityResolvingKey.Key

补充

  • 查看蓝牙设备信息: bluetoothctl devices
  • 查看蓝牙信息: sudo find /var/lib/bluetooth -type f -name info
  • 官方文档见这里