Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top