Max2Play Home › Forums › Max2Play on Raspberry PI › Bluetooth does not auto connect
- This topic has 33 replies, 2 voices, and was last updated 5 years ago by Heiner premium.
-
Posted in: Max2Play on Raspberry PI
-
6. März 2019 at 11:23 #44671
Hi all,
I successfully setup a bluetooth connection to my SB Roar speaker. When I manually connect and manually start a multisqueeze instance it works fine, but it will not auto connect.
Here is what I did:
– Turn off speaker
– Reboot raspi
– Turn on speaker
=> nothing happens.When I click „Connect“ on the max2play Bluetooth page, the speaker makes a sound and the bluetooth address turns green. But the multisqueeze instance is still inactive until I click „Start squeezelite“.
I am using max2play 2.47 on a Raspi.
Here is the DEBUG info from the Bluetooth page:
—
#### Bluetooth Installation ######## Bluetooth Dongle ####
hci0: Type: Primary Bus: UART
BD Address: B8:27:EB:ED:96:81 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN
RX bytes:766 acl:0 sco:0 events:49 errors:0
TX bytes:2264 acl:0 sco:0 commands:49 errors:0#### DEVICE SB ROAR SR20A ####
[00:02:3C:5F:60:AA]
Name: SB ROAR SR20A
Alias: SB ROAR SR20A [rw]
Address: 00:02:3C:5F:60:AA
Icon: audio-card
Class: 0x2c041c
Paired: 1
Trusted: 1 [rw]
Blocked: 0 [rw]
Connected: 0
UUIDs: [Headset, AudioSink, AVRemoteControlTarget, AdvancedAudioDistribution, AVRemoteControl, Handsfree]#### BLUEALSA RUNNING ####
1
—And here is the DEBUG info from the multisqueeze page:
—
#### SQUEEZELITE VERSION ####
Squeezelite Max2Play v1.0.2 based on v1.8.4-726, Copyright 2012-2015 Adrian Smith, 2015-2016 Ralph Irving.#### AUDIOPLAYER CONFIG ####
### Configuration of Audioplayers
SQUEEZELITE_PARAMETER=-o sysdefault:CARD=sndrpihifiberry -a 80:4:: -C 5
SQUEEZESLAVE_PARAMETER=-n plugequal
SHAIRPORT_PARAMETER=-d default:CARD=sndrpihifiberry
USE_USB_DAC=0
USE_EQUALIZER=0
SYSTEM_USER=pi
YMPD_PARAMETER=–webport 8081
GMEDIARENDERER_ALSA_DEVICE=plug:equal
BLUEALSA_PLAY_AUDIOCARD=hw:0,0
MULTISQUEEZE_PLAYERCOUNT=2
MULTISQUEEZE_NAME_1=Max2Play_Bluetooth
MULTISQUEEZE_PARAMETER_1=-o plug:bluetooth -a 80:4::
MULTISQUEEZE_NAME_0=Max2Play_WZ
MULTISQUEEZE_PARAMETER_0=-o sysdefault:CARD=sndrpihifiberry -a 80:4::
LMSIP=squeeze:box@goofy:9000/#### SQUEEZELITE -l ####
Output devices:
null – Discard all samples (playback) or generate zero samples (capture)
equal
plugequal – Equalizer for plughw:0,0
bluetooth – Your Bluetooth device 00:02:3C:5F:60:AA
default:CARD=ALSA – bcm2835 ALSA, bcm2835 ALSA – Default Audio Device
sysdefault:CARD=ALSA – bcm2835 ALSA, bcm2835 ALSA – Default Audio Device
dmix:CARD=ALSA,DEV=0 – bcm2835 ALSA, bcm2835 ALSA – Direct sample mixing device
dmix:CARD=ALSA,DEV=1 – bcm2835 ALSA, bcm2835 IEC958/HDMI – Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0 – bcm2835 ALSA, bcm2835 ALSA – Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1 – bcm2835 ALSA, bcm2835 IEC958/HDMI – Direct sample snooping device
hw:CARD=ALSA,DEV=0 – bcm2835 ALSA, bcm2835 ALSA – Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1 – bcm2835 ALSA, bcm2835 IEC958/HDMI – Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0 – bcm2835 ALSA, bcm2835 ALSA – Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1 – bcm2835 ALSA, bcm2835 IEC958/HDMI – Hardware device with all software conversions
default:CARD=sndrpihifiberry – snd_rpi_hifiberry_dacplus, – Default Audio Device
sysdefault:CARD=sndrpihifiberry – snd_rpi_hifiberry_dacplus, – Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0 – snd_rpi_hifiberry_dacplus, – Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0 – snd_rpi_hifiberry_dacplus, – Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0 – snd_rpi_hifiberry_dacplus, – Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0 – snd_rpi_hifiberry_dacplus, – Hardware device with all software conversions
—Where does the LMSIP parameter come from? That’s the address to the old squeezeboxserver. Meanwhile I am using the squeezebox server on max2play. How do I get rid of this setting?
Regards
Clarenze
7. März 2019 at 15:17 #44691Hi Clarenze,
That should be Shairport’s advanced options‘
Shairport/Squeezelite automatic Audio-Switch
.8. März 2019 at 8:19 #44712thanks, but that was only a side question. do you have an idea why bluetooth does not connect and why squeezelite instance #2 does not start?
8. März 2019 at 16:44 #44715Sorry, the answer was half out the door yesterday.
We’ve not had any experience with the SB Roar nor with the automatic switch on MultiSqueeze.
Could you try changing the outputs to BT on Audioplayer and your primary player on MultiSqueeze to see if this makes a difference?
8. März 2019 at 20:37 #44718no, it does not. the first problem is that BT does not auto-connect. the multisqueeze instance not being started is problem #2.
11. März 2019 at 12:39 #44740The auto-connect function works in tandem with the BT device’s own protocol for connection. Some speakers need constant re-connection, some are completely open to all pairings, some require a code to be entered. As mentioned, we have not had any experience with the SB Roar but seems to be an advanced Bluetooth solution.
Please try to do the apt-get update upgrade (takes a few minutes) through our Raspberry Settings to rule out any possible dependency issue with Raspbian’s packages (our BT solution is directly based upon the official Raspbian solution).Please also make sure the „Bluetoooth-Speaker“ player below the pairing list is not active or in autostart.
Meanwhile, I will try to recreate the issue here with a Pi3B and Max2Play 2.47 image. Please let me know if there any other factors in your system (like LMS installed) that might also recreate.
12. März 2019 at 9:26 #44749I did the upgrade and a reboot but the speaker still did not auto-connect. Then I did a manual connect and turned off the speaker again. After that the auto-connect worked. Also the second squeezebox instance was started automatically. But I don’t hear any sound. Squeezebox server shows that it is playing something on the bluetooth output, but the SB Blaster stays silent.
Bluetooth-Speaker is not active and I don’t have anything special installed (only what you can configure through max2play).
14. März 2019 at 20:44 #44769Do you have any more tips for me?
Today I noticed that when Bluetooth is not connected and I play radio via the hifiberry output, the stream stops every couple of minutes. Also squeezeplayer will ignore my attempts to select „No synchronization“. I killed the blueooth squeezeplayer instance now. Hope that will help.
15. März 2019 at 15:42 #44780Hi clarenze,
Very odd. We’ve had a few RPi 3B+ whose Bluetooth connection was very unreliable. It also shares the same antenna as the WiFi connection, so using both can cause dropouts.
If you have not yet, try using the BT pairing with ethernet connection and WiFi disabled.16. März 2019 at 9:01 #44781Thanks, but it still does not work reliably.
Here is what I did:
– connected ethernet
– disabled WIFI
– rebooted
– turned on Bluetooth speaker
=> speaker connected, max2play started second multisqueeze instance
– started radio stream on squeezeplay bluetooth channel
=> worked
– turned speaker off
=> bluetooth connection turns red in max2play GUI; bluetooth multisqueeze instance stays; squeezebox continues to stream (seconds count up)
– turned speaker on
=> bluetooth connection turns green; squeezebox continues to stream; no sound
– stopped bluetooth squeezebox instance
– started bluetooth squeezebox instance
=> sound starts playing on speakerSo the problem seems to be that mulitsqueeze does not stop the bluetooth squeezeplayer, when bluetooth is disconnected.
25. März 2019 at 10:19 #44859Yes, we are currently looking into this issue specifically.
We will keep the community up to date on our findings.
27. März 2019 at 14:32 #44900Hi clarenze,
Our bug fix is now live in the current beta. Here’s the announcement:
Hello everyone,
We are glad to announce that he have found a fix for the current bug in Bluetooth. It’s only available in our current beta at the moment. To get the fix on your device, do the following:
– Head to Settings/Reboot and click the Beta Update button
– When the update is finished, head to Bluetooth and „Uninstall Bluetooth“
– Refresh the Bluetooth menu if necessary and „Install Bluetooth“
– Reboot after the installation is finishedYour system should now be able to connect to any Bluetooth device again.
29. März 2019 at 21:03 #44931I did as you told but the behavior is still the same.
1. April 2019 at 14:20 #44939Hi clarenze,
We tested Bluetooth with the new fix on MultiSqueeze and did not encounter any errors.
Please try running a new image, making a Beta update from the start and then installing Bluetooth to rule out any possible dependencies from previous installs as a possible source of error.
14. April 2019 at 13:46 #45039Done. Still does not work. 🙁
When I turn off and on the bluetooth speaker, the squeezelite instance isn’t stopped and apparently cannot reconnect to the speaker at a later point. So I have to manually stop and start the squeezelite instance.The re-install was a pain, btw, as the „Restore Settings from File“ function in the Squeezeplayer tab does not work. I only get „Upload NOT successful!“.
15. April 2019 at 9:41 #45043Squeezelite should not be stopped by the speaker. The bluetooth output should remain active on one Squeezelite instance and the speaker should be able to reconnect when started. You can check the Bluetooth menu for the entry which should indicate trusted and paired and connected when active.
Best backup option to get the whole system safed is to create an .img file with our image burner plugin, which you can burn or save onto another device. However, saving the LMS settings should also not be an issue. We recently upped the max file size because someone had a huge save-file, how big was yours? This might the issue here.
20. April 2019 at 9:26 #45080The bluetooth output should remain active on one Squeezelite instance and the speaker should be able to reconnect when started.
It is not able to reconnect. Apparently Bluetooth does not really work (yet?) on Max2Play – at least for me.
23. April 2019 at 10:05 #45101It works here, however, I always reiterate how diverse Bluetooth issues can be.
What happened when you tried to reconnect? Do you have other BT devices paired? Which version of BT does your speaker use?
23. April 2019 at 19:21 #45123When reconnecting, the speaker makes a beep to indicate that it established a bluetooth connection and that’s it. No sound after that. Only when I kill and restart the squeezeplayer instance, it works again.
I do not have any other bluetooth devices paired with the max2play box.
How can I tell which bluetooth version my speaker is using?
25. April 2019 at 14:56 #45144Hi clarenze,
I think we misunderstood each other in reconnecting. The issue before was that you could not reconnect to the Bluetooth device at all. It indicated paired and trusted but never connected. This was fixed in the last beta update which has now gone live. The reconnection with the Bluetooth speaker is the point.
To restart playback when abruptly shutting down the BT speaker is not possible as far as I know. However, if you restart the player (be it with a simple command HTTP command or a click from your smartphone) the playback should immediately be re-initiated.
27. April 2019 at 8:43 #45157If I turn off and on the speaker and then stop and restart playback, I do not hear anything. The timer continues to count up, but all speakers (including the bluetooth) stay quiet. Until I stop and restart the squeezeplay instance.
30. April 2019 at 11:51 #45176Yes, as mentioned this is because you remove an active component in the playback-system while playing to it.
1. Mai 2019 at 9:46 #45196On 25 Apr. you said „if you restart the player (be it with a simple command HTTP command or a click from your smartphone) the playback should immediately be re-initiated.“
But this does not work.Or am I doing it wrong?
Here is what I did:
1) turn on BT speaker
BT speaker beeps to indicate that a connection is established
2) configure squeezbox to synchronize the main output (hifiberry) with the bluetooth output and start a tunein stream
the radio starts playing on both speakers
3) turn off BT speaker
radio continues on main speaker
4) turn on BT speaker
BT speaker beeps, then silence
5) press pause, select a new radio stream and press play
radio only plays on main speaker, BT speaker remains silent2. Mai 2019 at 13:36 #45205Hi clarenze,
Not pause and play but restart, meaning „stop Squeezelite“ and „start Squeezelite“in Max2Play.
4. Mai 2019 at 8:09 #45256Is it planned to fix this? Afaik you do get a notification, when a blutooth target disconnects, so you could easily kill the associated squeezeplayer.
6. Mai 2019 at 13:22 #45279I’ll consult our head developer to see if there’s a feasible way to implement an automatic restart without causing further issues with other player configurations.
14. September 2019 at 9:52 #47081Any news on this? It is kinda strange, that there is no „wife-save“ way to stream audio from your cellphone to max2play.
16. September 2019 at 13:48 #47092Hi clarenze,
The easiest and better quality solution for direct streaming is DLNA/UPNP or AirPlay. Both can be enabled in the Squeezebox Server and both are compatible with most apps and smartphones. Apps like AllConnect or BubbleUPnP are some of the most popular solutions for direct streaming.
16. September 2019 at 18:02 #47097Hi,
These days you get your content via streaming platforms like audible or amazon music. None of these support Airplay. You could use AirAudio to divert the Android sound output to an Airplay sink, but that requires root on your Android device.
Regards
Clarenze
-
You must be logged in to reply to this topic.