蓝牙5.0 Manjaro/Linux & Windows 10双系统共享设备设置
  1. 需要在两个系统各连接一次
    我是先在Linux下连接后去Windows下连接的, 我以我的视角进行参数的, 逆序视角只需要后续操作反一下就行.
  2. 导出注册表项
    目标注册表项为 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BTHPORT\Parameters\Keys\ 但因为这个注册表项是受保护的项, 所以得使用微软官方发布的PsExec来提权.
    使用方式其实挺简单的, 使用管理员权限打开cmd/powershell, cd到对应的目录中去, 执行一下psexec64.exe -si regedit就行, 如果是powershell, 前面还要加个./让命令变为 ./psexec64.exe -si regedit. 当然, 你的系统不支持64位程序就别用后面带64的程序, 灵活使用.

    1. 打开目标注册表项, 找到蓝牙设备物理地址对应的注册表项导出
      这里可能比较麻烦一点的就是如何找到蓝牙设备的物理地址了, 其实很简单, 就在控制面板->硬件和声音->设备与打印机里面你就能找到连接的蓝牙设备, 选中就会在最下面看到物理地址, 通常是一串十六进制数. 找到对应的数据之后在注册表编辑器里把物理地址的整个项都导出来(等会要用)
    2. 切换到Linux下
      重启切过去, 如果是关机可能触发Windows的快速开机功能导致开机秒进Windows.
  3. 切换到root用户
    sudo su - 切过去, 后续都是在root用户下操作的
  4. 进入蓝牙设备目录并进入本机蓝牙设备
    cd /var/lib/bluetooth/
    这里我一开始在etc找了一段时间, 还很疑惑不在, 结果是在var的. 可能是这种即插即用设备变化太频繁了吧.
    至于本机蓝牙设备, 一般这个只有一个, 有多个的话欢迎在评论区探讨.
  5. 查找外部蓝牙设备地址
    这个一般会与Windows下的地址不一样, 此时第一阶段连接过的蓝牙信息就起作用了, 使用之前的连接记录, 找到你的设备. 你可以使用这个命令: find ./ -iname "info" -type f |xargs grep "Name"; 或是在它后面再加一个grep的管道来过滤它的友好名称找到物理地址.
    找到后将其按照之前的规则, 重命名为与Windows下的物理地址值(重点)
  6. 修改info文件
    注意: 这里是重点

    其实看原文就已经足够了, 我这里简单阐述一下过程, 主要就是按照刚刚导出的注册表项中的值, 修改对应的info文件

    1. IdentityResolvingKey部分
      IRK转为大写后放到这个字段的Key里去
    2. LocalSignatureKey部分
      CSRK转为大写后放到这个字段的Key里去
    3. LongTermKey
      LTK转为大写后放到这个字段的Key里去
      ERand需要按字节逆序转为十进制数放到这个字段的Rand里去, 什么叫按字节逆序呢?
      e.g.
      假如有(ef cd ab)这些数据在ERand里, 你要将其转为(ab cd ef), 这个数字再转为十进制数才是Rand需要的
      EDIV可以直接转为十进制数放进EDiv

    现在就完成了所有的步骤, 你需要重启系统之后稍微等一小会, 系统就会询问你是否信任一个新的设备(你也可以主动去蓝牙设备列表里授予信任), 你通过后就可以正常连接了.

其实这个方案应该是所有*nux都通用的(包括MacOS).

参考文章

评论

  1. 1 月前
    2024-10-16 1:39:26

    Hi Neat post Theres an issue together with your web site in internet explorer may test this IE still is the marketplace chief and a good component of people will pass over your fantastic writing due to this problem

  2. 1 月前
    2024-10-16 0:14:28

    Hi i think that i saw you visited my web site thus i came to Return the favore I am attempting to find things to improve my web siteI suppose its ok to use some of your ideas

  3. 1 月前
    2024-10-16 0:14:27

    I simply could not go away your web site prior to suggesting that I really enjoyed the standard info a person supply on your guests Is going to be back incessantly to investigate crosscheck new posts

  4. 1 月前
    2024-10-16 0:14:23

    Thank you I have just been searching for information approximately this topic for a while and yours is the best I have found out so far However what in regards to the bottom line Are you certain concerning the supply

  5. 1 月前
    2024-10-16 0:05:16

    Nice blog here Also your site loads up very fast What host are you using Can I get your affiliate link to your host I wish my site loaded up as quickly as yours lol

  6. Thank you for sharing this insightful post! Your writing is clear, informative, and engaging. I appreciate how you’ve broken down complex concepts into easily digestible parts. It's evident that you have a deep understanding of the topic, and your tips are practical and actionable. I particularly liked the way you addressed [specific point from the article], as it resonated with my own experiences. This kind of content is invaluable for readers looking to expand their knowledge and apply new strategies effectively. Looking forward to reading more from you. Keep up the excellent work!

  7. 4 月前
    2024-8-04 9:57:30

    Your exemplary work demonstrates remarkable potential. With strategic enhancements, this foundation can be transformed into a pioneering contribution that advances the field and solidifies your position as an industry authority.

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇