New error

I solved my previous Bluetooth issue, but now my problem is that every time I try to connect something (per Bluetooth) with the Pi Zero W it disconnects very quickly.

If I try to connect it to my PC, everything is fine, but I tried one headset, one mini headset (the stuff for running around outside) and a box and every time it says connected: yes and one moment later connected: no.

So what can I do? (If I run it with GUI it's working perfect but headless and with bluetoothctl it doesn't work).

  • You net to add logs and more facts about your problem. – MatsK Oct 11 '17 at 16:45
  • @MatsK and were do i get them from? Is a screenshot enough? – Flajt Oct 11 '17 at 16:50
  • @MatsK here it is everything except "TJ" isn`t working and thats a pc.. – Flajt Oct 11 '17 at 16:55
  • Noop, check /var/log/messages for errors when the connection/disconnection happened. – MatsK Oct 11 '17 at 16:55
  • @MatsK I /var/log/messages isn´t something the latest time for today is 8:28:31. But i got lots of that[CHG] Device 88:C6:26:8C:0B:82 UUIDs: 0000fe61-0000-1000-8000-00805f9b34fb [CHG] Device 88:C6:26:8C:0B:82 ManufacturerData Key: 0x0003 – Flajt Oct 12 '17 at 9:46

I had a similar experience: I was trying to play sound over bluetooth with a raspberry pi zero w, on rasbian lite (headless) stretch.

Having read that you should use pulseaudio, since "the bluetooth stack" aka bluez doesn't support ALSA anymore, I saw that the above error message (protocol not available) disappeared whenever I had pulseaudio running, with certain bluetooth modules loaded (module-bluetooth-policy and module-bluetooth-discover), and I was able to connect and maintain the connection as well as use the bluetooth device as an audio sink.

But I couldn't get pulseaudio to run properly when deploying it as a service, neither in system-mode nor in user-mode... finally I gave up, especially since I discovered a project that brings back integration of bluetooth with alsa directly, and which is available in the standard repositories as bluealsa (with stretch!).

So since I unfortunately can't comment, this half answer is saying: If you're using pulseaudio, make sure to start it manually with modules loaded. Otherwise I suggest using bluealsa. And as far as I understand, the error message is telling you that it doesn't know how to handle this A2DP thing, which should give you a clue - have something running that knows how to communicate with devices through the A2DP protocol...

  • Ok thx I will try it – Flajt Oct 16 '17 at 11:30
  • Is this bluealsa working with other voice output that is not saved in a .wav(example) file? So if I got a script that create sound or something can you hear that too? – Flajt Oct 16 '17 at 18:11
  • I've successfully played a wav using the alsa player as described on bluez-alsa (aplay), and mplayer using mplayer -ao alsa:device=bluealsa $MP3FILE after setting up asound.conf as also described under the above link. – Valentin Krasontovitsch Oct 17 '17 at 8:51
  • And another question: During the second installation step I get this error configure: error: Package requirements (bluez >= 5.0) were not met: No package 'bluez' found But I got Bluez Version: 5.43-2+rpt1+deb9u1. Whats wrong do I need exactly Version 5.0? (Here I find out how to grab the version maybe that is wrong: askubuntu.com/questions/352283/… , second answer) – Flajt Oct 17 '17 at 14:49
  • hmm, not sure, sounds like it should be fine O_o are you installing bluez-alsa? I maybe should have mentioned that with the stretch version of debian, it's already part of the standard repos, under the name bluealsa. – Valentin Krasontovitsch Oct 17 '17 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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