蓝牙bluez配对没有匹配Ubuntu 12.10上的自动生成的PIN

csn*_*ewb 2 python ubuntu bluetooth bluez

我试图配对两个设备,而不是在每个配对周期中点击两个设备上的"匹配".如何设置自己的常量PIN码?我应该连接的设备是笔记本电脑和智能手机.

我在ubuntu上使用Python bluez.

csn*_*ewb 5

最后我可以解决这个问题!

  1. 杀掉蓝牙小程序:sudo killall bluetooth-applet

  2. 对于PIN-Pairing,将sspmode设置为0:sudo hciconfig hci0 sspmode 0

  3. 我打开了simple-agent,所以你可以在RequestPinCode方法中编辑代码如果你想:sudo gedit/usr/local/bin/simple-agent

  4. 启动simple-agent:su -c/usr/local/bin/simple-agent