Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试配对两个设备,而无需在每个配对周期中单击两个设备上的“匹配”。如何设置自己的固定 PIN?我应该连接的设备是笔记本电脑和智能手机。
我在 ubuntu 上使用 Python bluez。
我终于可以解决这个问题了!
杀死蓝牙小程序:sudo killall bluetooth-applet
对于 PIN 配对,将 sspmode 设置为 0:sudo hciconfig hci0 sspmode 0
我打开了 simple-agent,所以你可以在 RequestPinCode Method 中编辑代码,如果你想的话: sudo gedit /usr/local/bin/simple-agent
启动简单代理: su -c /usr/local/bin/simple-agent