csnewb
csnewb

Reputation: 1280

Bluetooth bluez pairing without matching the autogenerated PIN on Ubuntu 12.10

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

Answers (1)

csnewb
csnewb

Reputation: 1280

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

Upvotes: 5

Related Questions