Reputation: 1280
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.
Upvotes: 3
Views: 6582
Reputation: 1280
Finally I could solve that problem!
Kill the Bluetooth-Applet: sudo killall bluetooth-applet
For PIN-Pairing set sspmode to 0: sudo hciconfig hci0 sspmode 0
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
Start simple-agent: su -c /usr/local/bin/simple-agent
Upvotes: 5