1

We are trying to connect a Bluetooth device without a passkey and trusting default yes in Python.

I am running a headless Raspberry PI 3, and I want it to automatically accept pairings from any device.

I saw this answer in an identical question:

Automatically accepting Bluetooth connections on a Pi 3

But it seems to be a bit outdated and some of the used commands don't seem to exist. enter image description here

15
  • Which version of BlueZ are you using? Does it have to be python commands or is it OK to just use BlueZ commands directly? Mar 7, 2019 at 6:54
  • "some of the used commands don't seem to exist" - which ones specifically? Mar 7, 2019 at 9:36
  • Latest Version of BlueZ was using. @Youssif Saeed
    – ViGoRa
    Mar 7, 2019 at 16:24
  • hci0 is showing error @Dmitry Grigoryev
    – ViGoRa
    Mar 7, 2019 at 16:25
  • Can you try doing this using normal BlueZ command line tools first? You can run 'btmgmt bondable on' to set your device to be pairable/bondable, then 'btmgmt io-cap 3' to set your IO capabilities to NoInput/NoOutput. After that, test that your raspberry pi accepts incoming pairing without requiring a passkey and see if it works. If this fails, please post the error message that you are getting. Mar 7, 2019 at 22:02

1 Answer 1

1

Taken from raspberryPi.org

To pair type pair xx:xx:xx:xx:xx:xx where xx:xx:xx:xx:xx:xx is your BD address of the 
device you want to pair
Next type trust xx:xx:xx:xx:xx:xx

You should read the full thread from the link, this can help you.

Basicly the idea is to pair bluetooth device without user gui.

[The raspberry is much faster without a Desktop envoirement]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.