1

I have recently set my Pi up as a Bluetooth speaker. But when I connect a new device to it I have to go on to my Pi, pair and authorize services. This is very impractical for what I plan to do with my Pi (a portable speaker). Is there any way I can make it so I don't have to sign into my Pi and it just accepts everything by default?

Also I am using a Pi 3 with the inbuilt Bluetooth.

5
  • 1
    You do realize that this presents a security threat? Dec 21, 2016 at 14:49
  • yes i do but i dont have anything of worth on the pi and it will only be running when i am using it, which will be rarely Dec 21, 2016 at 15:07
  • 1
    What about what is on the rest of your network, and any sites you visit in your browser? Dec 21, 2016 at 15:08
  • when it's done it will not be connected to a network Dec 21, 2016 at 15:09
  • I agree with Steve, your idea is dangerous for reasons I don't think you fully understand. How about adding a button to the RPi that accepts the next connection provided it's made within 30 seconds (or something else)?
    – Jacobm001
    Dec 21, 2016 at 17:11

1 Answer 1

2

This article seems to describe a similar setup. Basically, you'll have to do the following:

Configure your RPi as a speaker:

hciconfig hci0 piscan
hciconfig hci0 sspmode 1
hciconfig hci0 name BT_Speaker

Run the pairing agent with a pin of your choice:

bluetooth-agent 1234

Your RPi will then request any new device for a pin 1234 in order to pair, but there will be no pin to enter on RPi itself.

Alternatively, if you don't want any pin at all, check out this answer. You'll have to edit bluez-simple-agent to set pairing method to NoInputNoOutput. You'll have to check whether that will be acceptable for the devices you want to pair.

Your Answer

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

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