I am trying to pair two devices without clicking on "match" on both devices for each pairing cycle. How can I set my own constant PIN? My Devices which should be connected is Notebook and a Smartphone.

I am using Python bluez on ubuntu.

有帮助吗?

解决方案

Finally I could solve that problem!

  1. Kill the Bluetooth-Applet: sudo killall bluetooth-applet

  2. For PIN-Pairing set sspmode to 0: sudo hciconfig hci0 sspmode 0

  3. I opened the simple-agent, so you can edit the code in RequestPinCode Method the if you want to: sudo gedit /usr/local/bin/simple-agent

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top