Max2Play Home › Forums › Max2Play Add-ons › [UPDATE BUG FIX] Bluetooth Addon BETA
- This topic has 466 replies, 2 voices, and was last updated 4 months, 1 week ago by bits premium.
-
Posted in: Max2Play Add-ons
-
10. März 2016 at 11:54 #19186
Hi,
good news: a Bluetooth Addon is available for testing for the Raspberry PI (all versions). It lets you easily connect bluetooth speakers and assign those as audio output for squeezelite / kodi.
NEW: now it is also possible to stream audio from your smartphone to the player OR to the Squeezebox Server. With this you have a multiroom Bluetooth player (currently only for Raspberry Pi and Max2Play Images based on Debian Jessie)!
The install URL is
http://shop.max2play.com/media/downloadable/beta/bluetooth.tar
(just paste the URL in the Addon installer on the settings page)If you have a bluetooth dongle or the Raspberry Pi 3 with build in Bluetooth, you should give it a try!
If your speakers do not connect correctly or the audioplayer doesn’t play please write in this topic and add following infos:
- What Raspberry Pi do you use and what Max2Play SD-Card-Image did you install?
- What Max2Play-Version do you use?
- Do you use a Bluetooth dongle? If yes, which one?
- What is the output of the „DEBUG“ window at the bottom of the bluetooth addon?
- What exaclty is not working? Pairing, Connecting, Playing Audio, Reconnecting on Reboot,…
- Check your Power Supply! Most problems result from unsufficient power – remove all usb-devices, drives and displays to see if this solves the problem.
- … to be continued…
All the Best
Stefan- This topic was modified 8 years, 9 months ago by flysurfer.
- This topic was modified 8 years ago by flysurfer.
- This topic was modified 8 years ago by flysurfer.
- This topic was modified 7 years, 11 months ago by flysurfer.
- This topic was modified 6 years, 12 months ago by Heiner.
- This topic was modified 6 years, 10 months ago by Heiner.
- This topic was modified 5 years, 8 months ago by Heiner.
10. März 2016 at 17:50 #19197I was able to add another BT speaker using the SSH commands. This was a messy process taking several attempts to get the device paired and connected. It was also necessary to reboot several times.
The menu routine fails on every attempt.
All the above on the beta for rpi 2
11. März 2016 at 17:35 #19206Hello,
I try on my RPIv1 with USB BT dongle.
My speaker is pair succefully but when I try to start Squeezlite I have this error:
[16:33:59.079053] test_open:320 playback open error: Input/output error
[16:33:59.080113] output_init_common:382 unable to open output deviceMy debug information
#### SQUEEZELITE VERSION ####
Squeezelite v1.8.3-716, Copyright 2012-2015 Adrian Smith, 2015-2016 Ralph Irving.#### AUDIOPLAYER CONFIG ####
### Configuration of Audioplayers
SQUEEZELITE_PARAMETER=-o bluetoothspeaker -a 80:4::
SQUEEZESLAVE_PARAMETER=-n plugequal
SHAIRPORT_PARAMETER=-d default:CARD=ALSA
USE_USB_DAC=0
USE_EQUALIZER=0
SYSTEM_USER=pi#### SQUEEZELITE -l ####
Output devices:
null – Discard all samples (playback) or generate zero samples (capture)
plugequal – Equalizer for plughw:0,0
bluetoothspeaker – Max2Play bluetooth speaker
default:CARD=ALSA – bcm2835 ALSA, bcm2835 ALSA – Default Audio Device
sysdefault:CARD=ALSA – bcm2835 ALSA, bcm2835 ALSA – Default Audio Device#### SHAIRPORT VERSION ####
2.2.3-openssl-Avahi-ALSA-soxr#### OUTPUT SOUND DETAILS CARD 0 ####
closed#### OUTPUT SOUND DETAILS CARD 1 ####
11. März 2016 at 18:48 #19212Debug infor from buetooth:
#### Bluetooth Installation ######## Bluetooth Dongle ####
hci0: Type: BR/EDR Bus: USB
BD Address: 00:15:83:4F:B3:05 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:4028 acl:87 sco:0 events:134 errors:0
TX bytes:2465 acl:57 sco:0 commands:68 errors:0#### DEVICE Blue Power Sound ####
[FC:58:FA:6D:88:8A]
Name: Blue Power Sound
Alias: Blue Power Sound [rw]
Address: FC:58:FA:6D:88:8A
Icon: audio-card
Class: 0x260404
Paired: 1
Trusted: 1 [rw]
Blocked: 0 [rw]
Connected: 1
UUIDs: [Headset, AudioSink, AVRemoteControl, Handsfree]12. März 2016 at 2:20 #19222I’ve finally got 3 different BT speakers connected and working (I suspect some of my set-up issues mat be due to the usb dongle I’m using).
After a few hours of testing – which have gone well – I feel there is a fundamental design flaw in the max2play model.
In essence, using BT speakers turns the speaker into a virtual player. As it stands, max2play appears as one player which is not aware of which speaker is actually switched on. As I experience it, it’s not possible to switch between speakers without rebooting max2play.
A better model would be to start/stop squeezelite when a BT speaker is actually switched on/off. At the moment max2play appears as a player even if no speaker is actually switched on.
For static systems this is not an issue – but as most BT speakers are battery powered and are not ‚always on‘ then it becomes an issue.
14. März 2016 at 12:58 #19252Hi!
At first: Thanks a lot for testing and your impressions!
Important note for BETA versions:
There is the SD-Card-Image Beta (Jessie Image) AND the Max2Play Update Beta (> 2.28 for testing). The Max2Play Beta Update can only be run with a activated licence and can be found on the settings page in the web interface. For the Bluetooth Addon there are some changes in the main Max2Play version that are not coming with installation of the bluetooth addon.2 different versions of the Bluetooth Addon:
The Jessie Image and the Old Wheezy based Image of Max2Play do have a complete different Bluetooth Support. Using the latest Max2Play Update both should automatically connect once the BT-device that is choosen on the Bluetooth addon page is powered on. Only the last choosen BT-device will be automatically connected. Right now it is not possible to connect to more than one BT-device at a time. When you want to switch to an other BT-speaker you have to choose it in the BT-Addon (click reconnect).
@castalla:
You need the Beta-Updates of Max2Play to get the autoconnect functionality for squeezelite without the need of restarting
@ninux:
I never tested with the RPi V1 but it should work. Your Squeezelite player seems to have trouble to connect to the Alsa bluetooth-device. Your settings are fine and the BT-device is connected (very good). Maybe some other audio player is blocking the audio-device. Try to stop Shairport and Kodi (if running) and restart Squeezelite. If this doesn’t help, you may give the Jessie Image (Beta) from our Download-page a try as this uses another way to play the audio.Cheers,
Stefan14. März 2016 at 19:27 #19266Sorry – the latest BETA doesn’t work for me. The speaker shows as connected. But there’s no sound and the stream cannot be paused/stopped. If I reboot, then the stream is still connected (?) and plays from last point but again without sound. All very confusing!
I sill think the BT implementation needs a rethink – each speaker should start a squeezelite instance when it is connected AND close the instance when it disconnects.
The normal procedure for sb players is that they appear in the gui listing when they are ON and they disappear when they are OFF.
At the moment ‚max2play‘ appears permanently in the listing – sort of ‚virtually on‘
15. März 2016 at 15:02 #19277Hi castalla,
the addon is just made for one BT-device to be connected at a time. It is not meant to run different squeezelite instances for different BT-devices. Although it is possible to easiliy switch the output to another BT-speaker by:
– „disconnect“ from currently connected BT-Speakers
– „reconnect“ the speakers you want to useOn the Jessie-based Image, once BT-speakers are connected pulseaudio (soundserver) will change to play on the BT-speakers. If no BT-speakers are connected squeezelite will default play on the main soundcard. By this you don’t have to change anything in your settings -> just power on BT-Speakers and they will start to play!
The Beta should work for you – maybe you changed some settings while playing with different BT-devices? There is a cronjob in the background running every minute, that detects if BT-speakers are connected.
I just had the problem, that after reconnecting I had to stop and start squeezelite manually, although the output device was correctly set and the squeezelite was running (sounds quite similar to your problem)… maybe I need to add a restart to squeezelite after a successful connection. I think this was mainly because squeezelite was still playing (didn’t pause the stream).If you power off your BT-speakers and power on later again (what you do in normal usage), they should be connected automatically and the stream for squeezelite should be pointed to the BT-speakers (after maximium 1 minute).
16. März 2016 at 19:23 #19322Hallo, habe genau die gleiche Fehlermeldung. Problem tritt auf sobald man sich n den erweiterten Einstellungen des Audioplayer die Tonausgabe über BT Lautsprecher einstellt. Dann will der Audioplayer mit obiger Fehlermeldung nicht mehr starten. Schaltet man wieder zurück auf Standard Audio funktioniert alles wieder wie gewohnt.
Gruß Benni
17. März 2016 at 12:00 #19331Hi,
thanks for developing BT support.
I currently have:
– pairing working
– pulse output configured and squeezelite running
– no audio send to speakerRunning:
Version Beta-160301 (installed from jessie image)
Raspberry PI 2BDebug info:
#### Bluetooth Installation ######## Bluetooth Dongle ####
hci0: Type: BR/EDR Bus: USB
BD Address: 00:15:83:E5:C5:34 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:5349 acl:33 sco:0 events:583 errors:0
TX bytes:215649 acl:774 sco:0 commands:50 errors:0#### DEVICE XW-BTSP1 ####
[C8:84:47:28:57:65]
Name: XW-BTSP1
Alias: XW-BTSP1 [rw]
Address: C8:84:47:28:57:65
Icon: audio-card
Class: 0x240414
Paired: 1
Trusted: 1 [rw]
Blocked: 0 [rw]
Connected: 1
UUIDs: [AudioSink, AVRemoteControlTarget, AdvancedAudioDistribution, AVRemoteControl]#### PCACMD LIST | grep active ####
active port: <analog-output>
active port: <speaker-output>
active profile: <output:analog-stereo>
active profile: <a2dp>#### PCACMD LIST | grep sink ####
Default sink name: bluez_sink.C8_84_47_28_57_65
Default source name: bluez_sink.C8_84_47_28_57_65.monitor
module.description = „When a bluetooth sink or source is added, load module-loopback“
module.description = „Automatically restore the default sink and source“
module.description = „When a sink/source is removed, try to move its streams to the default sink/source“
name: <module-always-sink>
module.description = „Always keeps at least one sink loaded even if it’s a null one“
module.description = „When a sink/source is idle for too long, suspend it“
module.description = „Load filter sinks automatically when needed“
module.description = „BlueZ 5 Bluetooth audio sink and source“
2 sink(s) available.
name: <bluez_sink.C8_84_47_28_57_65>
bluetooth.protocol = „a2dp_sink“
name: <bluez_sink.C8_84_47_28_57_65.monitor>
sinks:
sinks:
bluez_sink.C8_84_47_28_57_65/#1: XW-BTSP1
bluez_sink.C8_84_47_28_57_65.monitor/#1: Monitor of XW-BTSP1
1 sink input(s) available.
sink: 0 <alsa_output.0.analog-stereo>
module-stream-restore.id = „sink-input-by-application-name:ALSA plug-in [squeezelite]“#### X-SERVER RUNNING ####
1#### SQUEEZELITE VERSION ####
Squeezelite v1.8, Copyright 2012-2015 Adrian Smith.#### AUDIOPLAYER CONFIG ####
### Configuration of Audioplayers
SQUEEZELITE_PARAMETER=-o pulse -a 80:4::
SQUEEZESLAVE_PARAMETER=-n plugequal
SHAIRPORT_PARAMETER=-d default:CARD=ALSA
USE_USB_DAC=0
USE_EQUALIZER=0
SYSTEM_USER=pi#### SQUEEZELITE -l ####
Output devices:
null – Discard all samples (playback) or generate zero samples (capture)
pulse – PulseAudio Sound Server
equal
plugequal – Equalizer for plughw:0,0
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#### SHAIRPORT VERSION ####
2.8.0-openssl-Avahi-ALSA-soxr#### OUTPUT SOUND DETAILS CARD 0 ####
access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 16384
buffer_size: 16384#### OUTPUT SOUND DETAILS CARD 1 ####
17. März 2016 at 12:25 #19332Hallo, habe gestern Abend noch etwas getestet. RPI B mit Jessy Beta aufgesetzt und BT Plugin installiert. Pairing des Lautsprechers war kein Problem. Tonausgabe im Audioplayer nicht möglich (Egal ob Pulse oder Default Sound). Danach mplayer installiert und zum Test ein Digilive – Stream per Konsole gestartet:
mplayer -ao alsa:device=bluetooth http://1live-diggi.akacast.akamaistream.net/7/965/119435/v1/gnl.akacast.akamaistream.net/1live-diggiDanach wurde sofort Ton am BT Lautsprecher ausgegeben.
Die ~/.asoundrc Datei muss allerdings noch bearbeitet werden:
pcm.bluetooth {
type bluetooth
device „15:05:21:27:17:2E“
profile „auto“
}Nun wäre es natürlich Ideal mit dem Audioplayer / Squeezebox das auch zum Laufen zu bringen….
17. März 2016 at 13:42 #19335@verstrepeng & sirsmu : everything looks good in your Debug output. Can you try to manually Stop Squeezelite -> Start Squeezelite and see what happens?
17. März 2016 at 19:47 #19341Hab das Problem eben gefunden.
in der Datei /etc/asound.conf hatte sich nicht die richtige MAC Adresse des BT Speakers eingetragen. Habe die richtige eingetragen und sofort lies sich Squeezelite starten und der BT Lautsprecher verrichtet seinen Dienst!
Scheinbar klappt die übergabe der MAC beim pairing nicht so ganz.
17. März 2016 at 21:21 #19342Hier nochmal die vorher eingetragene MAC Adresse: 40:EF:4C:FF:03:22
Weiß nicht woher die kommt….vielleicht ist sie ja die Entwickler-Testbox?!?
18. März 2016 at 11:45 #19348Hallo sirsmu,
danke für den Tip! Da war noch ein Fehler in der Ersetzung der MAC-Adresse drin. Ich habe den jetzt behoben – damit sollte es nach einem Update nun auch damit funktionieren. Ich hatte die letzte Zeit fast nur noch mit der Debian Jessie Beta Version für den Raspberry Pi gearbeitet (wegen RPi 3), da ist mir der Fehler leider nicht aufgefallen.
Viele Grüße
Stefan18. März 2016 at 12:26 #19351Gerne… super Arbeit von Euch! An meinem RPI 2 Wheezi funktioniert auch reconnect seither problemlos. Nach 15-25 sek. Meldet der Lautsprecher Verbindung und spielt weiter Musik.
Gruss Benni
18. März 2016 at 15:28 #19359I still cannot get BT speakers to auto switch.
I think this is a big minus for the BT function even if it can be done via the max2play gui. Essentially this means in order to switch speakers the user has to have access to the gui – this is clumsy as the normal access to a sb player is via a controller NOT another interface. Once max2play is running it should be left in the background and only accessed for maintainance issues.
I still think a model based on a unique squeezelite instance associated with a specific speaker would be a more user-friendly solution.
19. März 2016 at 20:23 #19368Ich habe das jessie lite image auf meinem Raspberry 3 in Version 2.28
Ich habe das Bluetooth Plugin installiert… pairing hat funktioniert… mit einer Anker Bluetooth Box…
Danach unter Audioplayer – Squeezelite – auf Pulse gestellt..Dann mit dem Webinterface von meinem Haupt Max2Play LMS Musik gestartet und es läuft…
Wirklich klasse für eure tolle Arbeit…
Ist es möglich Multisqueeze zu verwenden? So könnte man den Kopfhörer Ausgang fest benutzen (Stereoanlage) und wäre mit der Bluetooth Box etwas flexibel 🙂
21. März 2016 at 15:23 #19395Ja habe Multisqueeze auch in Verbindung mit dem Bluthooth Addon
Einen Lautsprecher mit BT den anderen per Klinke am PI 3Jetzt habe ich aber folgendes Problem.
Ich muss den Connect immer manuel anstoßen.
Hab schon alles versucht. Er bekommt einfach keine Verbindung.In meiner BT Liste ist nur der eine BT Lautsprecher drin.
Der ist Rot hinterlegt, erst wenn ich auf reconnect klicke ist er Grün und bekommt Verbindung.Will meine Box gern Ausschalten wenn ich sie nicht mehr brauche, nur beim Einschalten bekomme ich, wie gesagt keine Automatische Verbindung
Autostart ist Aktiviert.
Auch habe ich eine kleine Verzögerung Zwischen BT und Klinke. Gibt es ne Möglichkeit für die anderen Player eine Verzögerung einzurichten, so das sie wieder Synchron laufen?
Gruß Mario
21. März 2016 at 16:44 #19396Hallo Mario,
zum Reconnect: dieser sollte automatisch (ohne den nötigen Klick im Interface) erfolgen, wenn die BT-Lautsprecher ausgeschaltet sind und der RPi läuft und dann die BT-Lautsprecher angeschalten werden (Reihenfolge beachten, d.h. immer zuerst den Pi anschalten). Zumindest funktioniert das bei den Boxen, die ich getestet habe – kannst du das mal probieren?
Eine Verzögerung für eine Squeezelite-Instanz zu erreichen ist mit dem aktuellen Max2Play nicht möglich. Es scheint in Squeezelite eine Einstellung zu geben, die, wenn man Portaudio nutzt ein Delay hinzufügt (siehe Doku Squeezelite). Ob das aber ausreicht – oder überhaupt funktioniert kann ich nicht sagen. Aktuell laufen alle Audiodienste mit Alsa oder Pulseaudio.
Viele Grüße
Stefan22. März 2016 at 11:54 #19402Hallo
Habe mein Raspberry eigentlich immer an. Hab die Beta Version für den PI 3 drauf, dort habe ich das BT Addon und Multisqueeze laufen.
Schalte dich die Box dann zu bekommt er keine Verbindung.
Habe auch schon ne Minute oder so gewartet, aber hat sich auch nichts getan.Also Reinfolge wäre doch dann Okay, da der PI immer mitläuft. Oder habe ich da ein Denkfehler drin?
-
You must be logged in to reply to this topic.