nicokaiser/rpi-audio-receiver

BT Pairing requires accepting

bortek opened this issue · 3 comments

I am running server on Pi and raspbian in GUI/Desktop mode(connected via VNC). When I try to pair using my phone via bluetooth what happens is that a prompt asking "do you want to pair" pops up. I am running a headless Pi and want to pairing to be smoothly without any popups. That is anyone should be able to pair.

Is it possible to configure it like that and if yes then how do I do it?

I get asked to enter a PIN :|

I get asked to enter PIN too. So I connected to RPi to SSH and paired devices. However, after changing USB BT dongle to another one, I'm not asking to enter PIN anymore. Weird.

I described it here #119 (comment)

I think (!) it is important to use a Bluetooth 4.0 dongle (hciconfig -a can show the HCI Version – here is a mapping).

I tried with a cheap (Bluetooth 2.0) device and it did not work at all. Simple Pairing Mode is only introduced in BT 2.1. You could try to disable SSP and use a PIN like in this fork: main...holypiece:main

/etc/bluetooth/pin.conf

* 1234

/etc/systemd/system/bt-agent@.service

-ExecStartPre=/bin/hciconfig %I sspmode 1
-ExecStart=/usr/bin/bt-agent --capability=NoInputNoOutput
+ExecStartPre=/bin/hciconfig %I sspmode 0
+ExecStart=/usr/bin/bt-agent --capability=NoInputNoOutput --pin /etc/bluetooth/pin.conf

But last time I tried I had no success without SSP and e.g. Apple devices.