GeyikBaba
Posts: 3
Joined: Mon Aug 21, 2017 4:56 pm

Raspbian Stretch - Bluetooth Speakers

Mon Aug 21, 2017 5:31 pm

Just bought and setup up Raspberry Pi Sunday. The version is Raspbian Stretch.

All is working except bluetooth. I have been able to get a bluetooth device, Bose Color Soundlink, to pair with Rasp Pi, but no sound.

The bluetooth icon > Remove Device, says Bose Color SoundLink is paired, and is available to remove.

In the bluetooth dropdown icon, when I click on Connect net to the Bose Color Soundlink , I receive the error

"Connection failed - Use the audio menu to connect to this device"

So where is the "audio menu"? is it Preferences > Audio Device Settings?

If so, the sound card is bcm2835 ALSA (Alsa mixer) (Default)
no controls visible

When I try to pair the speaker, I get the message
"Paired successfully. Use the audio menu to select as output device"

Back in audio device settings, everything looks the same. I made PCM the default control, that's the only one available, ` but nothing changed - no sound.

Plugged headphones into jack in Rasp Pi, no sound. Made PCM the default in Audio Device Settings -- still no sound.

I cannot find anything that is muted.

Any ideas?
Thanks
Mike Thomas

totolkuhitmingaw
Posts: 1
Joined: Mon Aug 21, 2017 7:26 pm

Re: Raspbian Stretch - Bluetooth Speakers

Mon Aug 21, 2017 8:00 pm

same problem with me.

GeyikBaba
Posts: 3
Joined: Mon Aug 21, 2017 4:56 pm

Re: Raspbian Stretch - Bluetooth Speakers

Tue Aug 22, 2017 1:10 pm

Pretty annoying. AlsoMixer seems to be set up correctly. Could it be a defective unit.

Command $ speaker-test

Seems to produce correct output, but cannot hear any noise in plugged in headphones

Mike Thomas

GeyikBaba
Posts: 3
Joined: Mon Aug 21, 2017 4:56 pm

Re: Raspbian Stretch - Bluetooth Speakers

Tue Aug 22, 2017 4:46 pm

Some progress. Can get sound now through external speaker connected to R Pi via cable. Still not working with bluetooth.

https://www.raspberrypi.org/documentati ... -config.md

Mike Thomas

fbe
Posts: 175
Joined: Thu Aug 17, 2017 9:08 pm

Re: Raspbian Stretch - Bluetooth Speakers

Wed Aug 23, 2017 4:35 pm

GeyikBaba wrote:
Mon Aug 21, 2017 5:31 pm
"Connection failed - Use the audio menu to connect to this device"

So where is the "audio menu"? is it Preferences > Audio Device Settings?
Right click on the speaker in the taskbar.

RexRoper
Posts: 64
Joined: Wed Oct 31, 2012 4:45 pm
Location: South Florida
Contact: Website

Re: Raspbian Stretch - Bluetooth Speakers

Tue Aug 29, 2017 1:04 am

I am having the same type of problem. Braven Bluetooth speaker pairs, but will not connect. I get into the same loop as GeyikBaba, "Connection failed - Use the audio menu to connect to this device".

looking forward to getting this to work properly, but I do not know what to try next.

R&R

RexRoper
Posts: 64
Joined: Wed Oct 31, 2012 4:45 pm
Location: South Florida
Contact: Website

Re: Raspbian Stretch - Bluetooth Speakers

Tue Aug 29, 2017 1:07 am

Yes, I posted before reading the last reply :o

...you GO!, boy :roll:

david.benucci
Posts: 2
Joined: Thu Nov 02, 2017 7:53 am

Re: Raspbian Stretch - Bluetooth Speakers

Thu Nov 02, 2017 9:03 am

Thanks! Following your instructions I managed to connect my BT speakers to Pi3. But my goal is using them with mopidy. How can do that? With Jessie version of Raspbian I managed to do it with pulseaudio but with stretch version pulseaudio but with pulseaudio I cannot play a you tube video anymore (with Bt speaker or HDMI). Please help me.

rasgull
Posts: 1
Joined: Sat Nov 04, 2017 10:38 am

Re: Raspbian Stretch - Bluetooth Speakers

Sat Nov 04, 2017 11:31 am

Similar problem here,
I'm testing with my favorite Bluetooth speaker (Anker A7908) what works with all my phones and computers.

In raspberry PI 3
"Raspbian GNU/Linux 9 (stretch)"

[*]Got PulseAudio installed and working with standard output (HDMI)
[*]Got my Bluetooth speaker connected (Anker A7908)
[*]In the "Volume Control" (PulseAudio interface) It shows up as (Anker A7908)
- Tab "Configuration"; (Anker A7908) Options are: "Headset Head Unit (HSP/HFP)", "High Fidelity Playback (ADP Sink)", "Off". When I select between them I can hear the Speaker react.
- Tab "Output devices"; Port: "Headset" (Only option) ! When I move the volume slider above 100% my Anker Beeps as it does when you reach max volume, the physical volume buttons on my speaker also makes the slider react in the right way.
- Tab "Playback" I started a simple Phyton game "Tetromino" and it's sound plays when I have the "bcm2835 ALSA Analog Stereo" selected as the output. BUT, when I select (Anker A7908) NO SOUND PLAYS.

PROBLEM: when I select (Anker A7908) NO SOUND PLAYS.

I want to follow this thread to see if we find a solution.

mercurybreza
Posts: 9
Joined: Mon Sep 05, 2016 8:29 pm

Re: Raspbian Stretch - Bluetooth Speakers

Sat Dec 30, 2017 9:17 pm

I am having a similar issue followed all the prompts in previous post and my speakers are detected and connected but no sound. Is there an easy fix for this ? I have a pi3 and the latest release. Is pulse audio the problem and is it required to run bluetooth speakers ?

mattmiller
Posts: 1777
Joined: Thu Feb 05, 2015 11:25 pm

Re: Raspbian Stretch - Bluetooth Speakers

Sat Dec 30, 2017 9:59 pm

Assuming its paired OK , have you done the bit about right-clicking the volume control and selecting your BT speaker as the playback device

graham-h
Posts: 4
Joined: Tue Mar 10, 2015 9:25 pm

Re: Raspbian Stretch - Bluetooth Speakers

Tue Jan 02, 2018 11:17 pm

Same issue here. BT speaker is connected, and selected in drop-down, but sound (from banshee) still goes to HDMI.

User avatar
Douglas6
Posts: 4306
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspbian Stretch - Bluetooth Speakers

Tue Jan 02, 2018 11:32 pm

Try using raspi-config to force audio to the onboard audio-out jack.

graham-h
Posts: 4
Joined: Tue Mar 10, 2015 9:25 pm

Re: Raspbian Stretch - Bluetooth Speakers

Wed Jan 03, 2018 8:13 pm

Thanks for the suggestion, but that wasn't it. After some poking about I find I can play music with mpg321 or aplay to a BT speaker. speaker-test does not work as reported above. banshee does not work and I suspect most other media players won't work from what I read on the bluez-alsa git comments.

User avatar
fruitoftheloom
Posts: 16208
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: Raspbian Stretch - Bluetooth Speakers

Wed Jan 03, 2018 9:32 pm

graham-h wrote:
Wed Jan 03, 2018 8:13 pm
Thanks for the suggestion, but that wasn't it. After some poking about I find I can play music with mpg321 or aplay to a BT speaker. speaker-test does not work as reported above. banshee does not work and I suspect most other media players won't work from what I read on the bluez-alsa git comments.

omxplayer is the default media player in Raspbian OS.
""understanding the theoretical, but not always the end goal""

My other Devices are the ChromeBit CS10, ChromeCast & Huawei Mate 10 Pro SmartPhone

W9JSW
Posts: 10
Joined: Mon Sep 28, 2015 1:28 pm

Re: Raspbian Stretch - Bluetooth Speakers

Fri Jan 05, 2018 10:13 pm

Same problem here. Paired Anker Soundcore. selected it in audio list. and I get a paired beep. No audio. Does not list a device under aplay -l. I will note that the audio icon config does not work as well for a C-Media USB device. It does not change the default away from the onboard audio. I am wanting to run Pithos which is a Pandora streaming player. It plays to the default sound.

nhatchett
Posts: 3
Joined: Thu Mar 08, 2018 3:44 pm

Raspbian Stretch - Bluetooth Speakers Now Working

Thu Mar 08, 2018 4:58 pm

THIS MEMO APPLIES TO RASPBIAN STRETCH ONLY
==========================================

I am currently building Juke Box using a PI 3. This consists of a service (written in mono) that plays music tracks and a web front end (Apache and PHP) that enables the control of the Juke Box.. My problems began when I decided to use Bluetooth speakers as well as cabled speakers. The only sign of Bluetooth is on the GUI and all attempts at using the GUI to connect to the speakers ended in failure (not a peep was to be heard anywhere)

I then investigated the underlying systems (ALSA and Bluetooth) built into Raspian (Debian) and found the following article:

https://github.com/Arkq/bluez-alsa

Ignore the Installation instructions as the software is pre-installed on Rasbian Stretch. The interesting part is the Configuration and Usage.

I eventually got it to work by:

a/ Forgetting the Bluetooth controls built into the GUI - at present these do not seem to work.
b/ Using 'bluetoothctl' command to find, pair and connect to my speakers.
c/ Tested the connection using 'aplay'.
d/ Amended the '20-bluealsa.conf' file to remember the details of my speakers.
e/ Currently I can play music on my bluetooth speakers from 'aplay' and 'OMXPlayer'.

DETAILS
=======

STEP B/ Find, Pair and Connect the speakers

1/ Open 'bluetoothctl' from a command prompt
2/ Switch your speakers in to discovery mode and then run 'scan on'.
3/ Wait for your speakers to be discovered (their MAC address will be displayed).
4/ Note the MAC address
5/ Run 'scan off'
6/ Run 'pair XX:XX;XX;XX;XX' where'XX:XX;XX;XX;XX' is the MAC address of your speakers.
7/ Wait for confirmation that the speakers are paired.
8/ Run 'connect XX:XX;XX;XX;XX' where'XX:XX;XX;XX;XX' is the MAC address of your speakers.
9/ Wait for the connection to complete (takes a few seconds).

If all has gone well you have connected your speakers to Raspbian.

STEP C/ Test the connection

At a PI command prompt enter:

aplay -D bluealsa:HCI=hci0,DEV=XX:XX:XX:XX:XX:XX,PROFILE=a2dp test.wav

where 'XX:XX;XX;XX;XX' is the MAC address of your speakers
and 'test.wav' is any test wav file you have on your PI

You should hear the sound file.

STEP D/ Save details

1/ Open '/usr/share/alsa/alsa.conf.d/20-bluealsa.conf' with an editor as superuser (sudo).
2/ Add the following at the bottom of this file:

pcm.YYYYY {
type plug
slave.pcm {
type bluealsa
device "XX:XX;XX;XX;XX"
profile "a2dp"
}
hint {
show on
description "JUSTOP BTR006"
}
}

where 'XX:XX;XX;XX;XX' is the MAC address of your speakers
and 'YYYYY' is your preferred name for your speakers (keep it simple - letters and digits only).

3/ Save the file.

PLAYING MUSIC
=============

To play 'WAV' file in 'aplay':

aplay -D YYYYY 'path to wave file'

To play and 'MP3' file in omxplayer

omxplayer -o alsa:YYYYY 'path to mp3 file'

NOT SO GOOD
============

Every time you power your PI down you will loose the connection to the speakers and will need to reconnect them when you restart the PI . To do this:

1/ Open 'bluetoothctl' at a command prompt.
2/ Enter 'connect XX:XX;XX:XX:XX' where 'XX:XX;XX:XX:XX' is the MAC address of your speakers
3/ Wait for the connection to complete.
4/ Enter 'quit'

Your speakers are now ready for use.

I wrote the following bash shell script to make the reconnection:

#!/bin/bash
bluetoothctl << EOF
disconnect
connect XX:XX:XX:XX:XX
EOF

It appears that the underlying ALSA and Bluetooth utilities do work quite smoothly.

I could find no way of getting VLC to use my bluetooth speakers but I live in hope.

nhatchett
Posts: 3
Joined: Thu Mar 08, 2018 3:44 pm

Re: Raspbian Stretch - Bluetooth Speakers

Sat Mar 10, 2018 6:35 pm

This is an update to my previous post.

On further investigation into the bluetooth on Stretch mystery I have uncovered the following.

The Raspian GUI can successfully Pair and Connect to my bluetooth speakers.

When I connect my speakers it creates a '_default' PCM entry in the '~/.asoundsrc' file. I assume (I am no expert on alsa) that this is identifying my bluetooth speakers as the DEFAULT alsa sound device.

When I attempt to play music via my speakers I can find no way of telling 'vlc' or 'omxplayer' to use the DEFAULT sound device as its audio device.

Thus you can successfully pair and connect a bluetooth speaker using the GUI but there is little software (none I have found yet) that will use the results of this operation to play music.

It appears that the guys who built Raspian and those that built vlc and omxplayer did not speak to each other - nothing unusual in the software industry (at the end of the day we are all divine) - I am sure they will sort it out eventually.

For the time being I am using the method explained in my previous post as it does create an alsa PCM that 'vlc' and 'omxplayer' can use.

To use the PCM created in my previous post you need to configure vlc to use alsa as it audio device (tools->preferences->audio->outputmodule = ALSA Audio Output, restart vlc and then Audio->Audio Device select your bluetooth sprakers (remember to connect them before playing any music)).

User avatar
Douglas6
Posts: 4306
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspbian Stretch - Bluetooth Speakers

Sat Mar 10, 2018 6:50 pm

Omxplayer has a flag to tell it to use the ALSA system for output (-o alsa, I believe). Others here have reported successfully using omxplayer with Bluetooth speakers.

nhatchett
Posts: 3
Joined: Thu Mar 08, 2018 3:44 pm

Re: Raspbian Stretch - Bluetooth Speakers

Sat Mar 10, 2018 7:08 pm

omxplayer does have such a flag and I do use it to play music. The syntax of the flag is '-o alsa:XXXX' where XXXX is a PCM of the bluetooth speakers but the GUI does not appear to create a unique PCM (that I can find) when you connect to the bluetooth speakers. I had to create the PCM manually having identified the MAC address of the speakers. Additionally '-o alsa:default' does not appear to work.

AlekEagle
Posts: 10
Joined: Sat Nov 04, 2017 11:29 pm

Re: Raspbian Stretch - Bluetooth Speakers

Thu Mar 15, 2018 10:37 pm

I JUST DID IT!!! all i had to do was right click the speaker on raspbian Full and click the name of my bluetooth device

mattmiller
Posts: 1777
Joined: Thu Feb 05, 2015 11:25 pm

Re: Raspbian Stretch - Bluetooth Speakers

Fri Mar 16, 2018 8:17 am

all i had to do was right click the speaker
unless you have a magic bluetooth device - I'm pretty certain that you had to pair it as well first :)

Return to “Beginners”

Who is online

Users browsing this forum: tomek2864 and 14 guests