2

I followed the tutorial to setup the Raspberry pi 3 running on Raspbian Jessie as a bluetooth speaker: https://raspberrypi.stackexchange.com/a/48055

After setting it up, it actually worked for a few seconds. My smartphone could pair to the raspberry pi 3 and I could actually stream music to the 3.5mm audio jack output on the raspberry pi, but a few seconds after I started streaming the music, it suddenly stopped playing music.

It started playing the music again when I restarted everything, but it stopped playing the music just a few seconds after it started playing the music again. So this was very unreliable!

The error shown in dmesg was

Bluetooth: hci0: Frame reassembly failed (-84)

This turns out to be a reproducible error: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=151633

1) Does anyone have an idea of how to make the raspberry pi 3 a more reliable bluetooth speaker that does not stop playing music after just a few seconds?

2) Does anyone know how to make it a dedicated bluetooth speaker, that just works when you boot up the raspberry pi without needing to type in command line commands (such as to start bluetooth, start pulseaudio, confirm the passkey, etc.)

Nofima
  • 53
  • 1
  • 2
  • 7
  • any "clues" in the output of CLI command`dmesg` - anything in any of the log files in `/var/log` shed light into any errors? – Jaromanda X Mar 09 '17 at 05:48
  • @JaromandaX "Bluetooth: hci0: Frame reassembly failed (-84)" in dmesg and "Unable to find a bluetooth device compatible with pulseaudio" in /var/log_bluetooth_dev – Nofima Mar 11 '17 at 19:15

1 Answers1

3

I was not satisfied with the above solution either, although I had different problems. (More like the ones in the Raspberry forum)

So I made a working solution that doesn't require PulseAudio at all.

You can get it from here: https://github.com/lukasjapan/bt-speaker

Improvements:

  • one liner install
  • a daemon on startup
  • slightly better sound quality
  • automcially accepting players
  • remote volume control

Hope this helps.

Lukas
  • 356
  • 2
  • 4
  • Thanks, that was exactly what I was looking for. I wondered if you also know how to get rid of the background noise that you can hear when you connect a speaker on the 3.5mm audio jack output on the raspberry pi 3 – Nofima Mar 15 '17 at 03:20
  • As far as I know, its a problem of the Pi itself. The solution would be to buy a quality soundboard and use that instead. – Lukas Mar 15 '17 at 04:13
  • Do you know how I can output the sound on the GPIO pins (using an I2S interface)? I already tried "dtparams=i2s=on" in /boot/config.txt, but that did not work: http://raspberrypi.stackexchange.com/questions/63401/how-to-output-all-audio-on-the-i2s-interface-by-default – Nofima Mar 16 '17 at 08:52
  • Hmm, I have never tried that, sorry. – Lukas Mar 16 '17 at 10:46
  • Thank you for your reply. I was able to output data on the GPIO pins after running `curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | bash` (from: https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp/raspberry-pi-usage) and playing sound on the raspberry pi using the vlc player. But the problem was that my smartphone did not recognise the Raspberry pi as an A2DP audio sink anymore. It could still pair to the raspberry pi, but it could not stream audio to it anymore. Not even after removing and reinstalling your bt-speaker program – Nofima Mar 16 '17 at 15:26
  • It could also be a problem of the iphone. Maybe you can try to restart it if you haven't yet. Or better, double-check with another device. I remember having some trouble during development because of the iPhone. Good luck – Lukas Mar 16 '17 at 21:19