balena-io-experimental / balena-sound

Build a single or multi-room streamer for an existing audio device using a Raspberry Pi! Supports Bluetooth, Airplay and Spotify Connect
https://balena.io/blog/turn-your-old-speakers-or-hi-fi-into-bluetooth-receivers-using-only-a-raspberry-pi/
MIT License
2.41k stars 428 forks source link

bluetooth: unreliable bluetooth pairing status on balenaSound #526

Open tmigone opened 2 years ago

tmigone commented 2 years ago

Describe the problem

Devices that have been previously unpaired are still retained and listed as if they were paired. This can lead to devices not being able to re-pair. Manually removing the devices using bluetoothctl or btmgmt fixes the issue.

This probably needs to be fixed upstream: https://github.com/balenablocks/bluetooth

jellyfish-bot commented 2 years ago

[tmigone] This issue has attached support thread https://jel.ly.fish/0e0199aa-f925-45c4-8cd2-b37a1f5c230b

petrosagg commented 2 years ago

I was facing the same problem on my bluetooth speaker setup where my bluetooth agent was: bt-agent --capability NoInputNoOutput

I fixed this problem by switching the parameters to bt-agent --capability DisplayOnly --pin ./pins.conf where pins.conf contains * * (accept any pin for any device). Now it doesn't matter how many times I unpair my phone, I can always re-pair it.

The technique is described here https://forums.raspberrypi.com/viewtopic.php?t=304434

I haven't tested it but it might be as simple as changing this line https://github.com/balenablocks/bluetooth/blob/master/bluetooth-agent#L28

jellyfish-bot commented 2 years ago

[rcooke-warwick] This issue has attached support thread https://jel.ly.fish/abce5e6e-b32a-48af-ab56-6e2a8fb0a4d2

rcooke-warwick commented 2 years ago

I was able to reproduce, creating upstream issue here: https://github.com/balenablocks/bluetooth/issues/28

jellyfish-bot commented 2 years ago

[rcooke-warwick] This issue has attached support thread https://jel.ly.fish/830551c7-b0d6-4016-bcdf-7cb7e906053f

jellyfish-bot commented 2 years ago

[rcooke-warwick] This issue has attached support thread https://jel.ly.fish/17452ac7-ef2b-4552-a872-53e9bc577a34

jellyfish-bot commented 1 year ago

[myarmolinsky] This has attached https://jel.ly.fish/abce5e6e-b32a-48af-ab56-6e2a8fb0a4d2