last day (20 days later) » 

07:47
1
Q: Bluetooth Blues, Redux

SeamusI have asked a similar question here, without getting an answer. Eighteen months have passed, new information has come to light and I have a newer version of Raspberry Pi hardware and software. Unfortunately, the results are much the same, but hope springs eternal. My objective seems simple: Play...

Which version of the Raspberry Pi OS are you using? Lite or Desktop? bluetoothctl relies on D-Bus which doesn't always get started correctly in the lite version. I wrote some notes on connecting to Bluetooth speakers a couple years ago that might have something of interest: ukbaz.github.io/howto/Bluetooth_speakers.html Any tutorial that uses one of the eight deprecated BlueZ tools should probably be avoided (git.kernel.org/pub/scm/bluetooth/bluez.git/commit/…)
@jsotola: I did apply trust to the speaker; it doesn't show in this output, but it does in others.
@ukBaz: I am using the Lite version.
@Seamus: I think that is why you are seeing different results unless you have done extra work to ensure all the services are started. I would suggest running the same experiment in the desktop version (even if you are just ssh-ing) and see if your result is different
@ukBaz: Looked at your github howto. We have diffs right away (see my edit). In your case, agent on gets Agent registered, but I get Agent registration enabled. No extra work done to start services... I don't have a desktop RPi. Not to seem stubborn, but I feel this should work in Lite as well as Desktop. Why wouldn't it? Nevertheless - a v. good observation!
sudo usermod -G bluetooth -a pi seems to have helped starting bluetoothctl! Unfortunately, immediately after trust and pair, the speaker immediately falls back to ServicesResolved: no and Connected: no :(
@Seamus: You are absolutely right, it can work with the lite version. I did manage to get it working once with lite, but then with the next release the recipe to get it to work changed. It was around what packages were installed by default and what systemd services get started by default. I gave up with the lite version. Even though I run headless, I install the desktop version. If you do get it working with lite I would be interested in the recipe to reproduce it. :-)
@Seamus: After pairing it is normal and expected for it to report ServicesResolved: no and Connected: no. Pairing is exchanging security keys. connect is where it should stay connected so that you can play the music.
First time in chat. How does this work?
@Seamus. Are you there?
07:50
@ukBaz: Yes, but it will not reconnect. info reports trusted and paired as yes and connected as no. Repeated connect attempts all fail
Then I suspect that there is not an audio service running on the RPi. As there is not service to communicate with the speaker it disconnects
Looking at service bluetooth status might help
Having sudo btmon -t might help although often it is too detailed
As I say, rerunning the experiment in the desktop to prove the steps to yourself seems like a good next step. If that works then see what is different between the lite and desktop versions
audio service... hmmm let me look at something
I am going to have to drop from the chat as I need to leave for work.... Good luck with it all
I had commented out the line dtparam=audio=on in /boot/config.txt based on another useless suggestion yesterday. Your comment made me recall that! Unfortunately, restoring it (removing the comment) & reboot didn't cure anything. I continue to see this:
[bluetooth]# connect B8:F6:53:12:13:F1
Attempting to connect to B8:F6:53:12:13:F1
Failed to connect: org.bluez.Error.Failed
btmon -t output:
bluetoothd: a2dp-sink profile connect failed for B8:F6:53:AE:13:F1: Protocol not available
But, info report includes:
UUID: Serial Port (00001101-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
08:26
Searching error listed by btmon led here: donjajo.com/…
Which in turn called for installing a huge package called "pulseaudio-module-bluetooth"
sudo apt-get install pulseaudio-module-bluetooth
But this did not help. Will uninstall this monstrosity tomorrow... done for tonight
08:49
This one is worth a follow-up:
 
11 hours later…
19:42
The Bluetooth cheatsheet on raspberrypi.org/blog/… looks like it has some interesting points. ESpecially "Start the PulseAudio server" which is what it sounds like you might have been missing. These are from some longer instructions at: gist.github.com/actuino/9548329d1bba6663a63886067af5e4cb
19:59
@Seamus: One of those links you posted talked about ad2p-sink. You are trying to do a2dp-source right?
 
2 hours later…
21:36
Yeah - the one on the Debian wiki if that's what you meant?
I did install the pulseaudio-module-bluetooth, but that's unsat... 670 MB and ~70 dependencies is obscene. I suspect it installs the difference between Lite and Desktop distros for 1 single package. Crazy.

  last day (20 days later) »