Bluetooth Speaker Plugin

Thank you for your work!

Does it support only devices with “generic” codes(e.g. 0000,1234, etc.) or is it possible to connect to speaker with a specific code?

1 Like

Thanks for trying the plugin.
I have confirmed with volumio 3.324 (under Raspberry Pi 3 ModelB+).
As for the issues you reported, it is assumed to reload the browser when UI is switched.
Regards

Hi
sorry, I’ve not encountered the device which requires PIN since it is obsolete after SSP support in Bluetooth 2.1.
I recommend to use bluetoothctl command directly to see what is happening if you encounter trouble with bluetooth paring. According to linux - Bluetoothctl set passkey - Stack Overflow, to run agent NoInputNoOutput could let the device change into “Just Works” mode which doesn’t requires PIN. Once you manage to establish the pairing under bluetoothctl, then the device should be automatically connected from next time in volumio as well.
I hope this helps.
Thanks.

1 Like

Hi, thank you! I ended up trying bluetoothctl yesterday and it asked for PIN so I was able to pair it (I see the device even in the plugin). Now, despite being connected, I’m not getting any sound from the speaker :sweat_smile: so now I’m in the process of solving this.

Interesting info about PIN obsolescence, I didn’t know that. But still every now and then I get a request for “0000”, “1234” and these are definitely newer devices than 2.1 so probably there are devices which don’t respect or support SSP.

I encountered the same actually as @Laci_Lacko but because I was trying also alternatives to Volumio, when I tried your guide for the second time I noticed that despite cd ... being there it won’t “jump back up” one folder so then www4 is in www3 and www3 is in www (at least that’s on the missing UI option for “Contemporary”).

Unfortunately I see some hiccups on the control via Chrome as well but it works in Volumio app.

1 Like

@Sudo Great that you’ve already managed to connect with bluetoothctl. For just in case, about no sound from speakers, note that volume of the device still separately exists besides the volume of volumio.

As for cd …, it seems exactly what happened in that case. Thanks for your remark. I’ve written originally as .., however it has changed to somehow on the post.
so please use below: (I hope it doesn’t change again)

$ cd /volumio/http
$ sudo mv www www_bak
$ sudo mv www3 www3_bak
$ sudo mv www4 www4_bak
$ mkdir www && cd www
$ miniunzip ~/www.zip && cd ..
$ mkdir www3 && cd www3
$ miniunzip ~/www3.zip && cd ..
$ mkdir www4 && cd www4
$ miniunzip ~/www4.zip && cd ..
2 Likes

Unfortunately that device doesn’t have any buttons for volume control (buttons at all, to be more specific :smiley: ) and it uses BT3.0 (if I remember correctly that version doesn’t support “unified volume control”) so it’s probably at max all the time and only volume of the source is controlled.

At least if I understand you correctly.

EDIT: Ok, because it was quite hard to diagnose I tried Beoplay P6 which has lights and buttons :smiley: , I was able to succesfully connect but again no sound even when I try device volume control via buttons.

Okay. It seems not because of volume function.
Are you trying to play with some other plugins such as Spotify? If so, please try with the tracks located in the local library at frist.
With Spotify plugin, please revise the file as below and then reboot:

$ cd /data/plugins/music_service/spop
$ cp volspotify.tmpl volspotify.tmpl.bak
$ nano volspotify.tmpl
...
[Output]
#device = '${outdev}'
device = 'bluealsa'
...

I have confirmed with the latest combination of volumio 3.324 and Spotify plugin 3.0.6.

additonal edit:
before we go further, please try the fundamental command to check if playing through bluealsa works:

aplay -D bluealsa:SRV=org.bluealsa,DEV=XX:XX:XX:XX:XX:XX,PROFILE=a2dp test.wav

where XX:XX:XX:XX:XX:XX is the MAC address of the receiver device.

Hi @elehobica
Everything is working fine now. …
Really appreciate it :slightly_smiling_face:

Thanks a lot!

HI Guys,

It’s working with 3.378 as well!!

Br

1 Like

Hi,
I was redirected to here. But my case might be different - I am trying to use Creative BT-W3 USB Bluetooth dongle. However, the system is not able to recognize it.

The system has recognized it as a sound card, Volumio listed that. I think to Volumio it is a USB device, bluetooth is transparent in this case.

The problem I have is that the OS does not list the USB dongle as a bluetooth device. Here is the output from ‘hcitool dev’:
Devices:

  •    hci0    E4:5F:01:CB:E0:01*
    

this is the built-in BT not the dongle. But the dongle is listed with ‘lsusb’:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 041e:3270 Creative Technology, Ltd
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

It seems that the ‘HCI USB Bluetooth’ is not enabled in the kernel, I may have to compile a new one ?

the kernel is “5.10.92-v7l+ #1514 SMP Mon Jan 17 17:38:03 GMT 2022 armv7l GNU/Linux”

Where is the source I can download ?

thanks !

Hi @elehobica ,
I do not see the ‘upload plugin’ option though. I am using the latest 3.378-2.

thanks
lixin

Hi @lixin, as far as I confirmed with 3.378, indeed, sometimes it looks UI is not switched to Classic. In the case you’ll need to reload browser to reflect UI change.
(or see Bluetooth Speaker Plugin - #179 by elehobica to check if www directory is correctly located)

@elehobica
Indeed the UI is not changed to ‘Classic’ for some reasons. Folders are created correctly though. Need to troubleshoot more …

thanks !

2 Likes

I’ve ran into an issue where when I use tidal connect, audio doesn’t come out via bluetooth. Once you try using tidal connect, the only way to then get audio is to reboot. If i use the volumio app, bluetooth works. Only when doing tidal connect do things not work. Are you aware of this issue? If so, what is the fix/work around.

Thanks.

@elehobica
First of all, congrats on the plugin. I think it would be great, if volumio would support it officially as it offers many new applications to rpi-volumio projects.

I am currently trying to set up a “spotify-tablet” for my son (6 years old) using a rpi3 with touch display. I want to give him the possibility to discover music in spotify without giving him a smartphone or a real tablet.
First, I was using volumio3, which worked just fine with an JBL Flip 6 (after I switched to 5GHz Wlan to reduce interferences with BT). But unfortunately, there is currently no solution for a virtual keyboard on volumio3. As a virtual keyboard is essential to my project, I am trying with volumio 2.917 and the old files from here: bluetooth-speaker-plugin #149

Pairing works, but the sound is super choppy. I am testing with a local .wav and .mp3 from the SD card.
What is interesting: With the aplay command, I can play those files from the bluetooth speaker in perfect quality. But as soon as I use volumio for the same files, the playback is super choppy.

I tried installing it multiple times with a fresh installation. I also connected a separate speaker to the headphones jack on rpi and while playback on bt speaker is choppy, the playback on the wired speaker is fine.

Do you have any ideal, why the plugin works for me with volumio3 but not with volumio2. I would really appreciate any help.

Thanks a lot!

Edit: I just tried with an old “Bose Color SoundLink” Speaker. This one works fine, so maybe it is some issue with a new bluetooth version/profile. Any ideas?

Update:

  • I realized that playback with volumio3 and latest version of this plugin is actually a lot better on my JBL Flip 6 compared to volumio2 (version from #149). But still, depending on the source (podcast, local, spotify), playback on JBL Flip 6 was a bit choppy, while the old Bose Color SoundLink worked flawless.
  • I was able to solve this issue for volumio3 by updating to the latest bluez-alsa. To do so, one has to change only two lines in the file “install.sh” inside “bluetooth-controller.zip”
old: git clone -b v3.1.0 https://github.com/Arkq/bluez-alsa.git
new: git clone -b v4.0.0 https://github.com/Arkq/bluez-alsa.git
old: ExecStart=/usr/bin/bluealsa --a2dp-force-audio-cd
new: ExecStart=/usr/bin/bluealsa --profile=a2dp-source

Now playback on the new device JBL Flip 6 is perfectly clear.

2 Likes

Installed the Bluetooth Speaker Plugin and things seem to work OK on the latest Volumio version on both Pi Zero and Pi3 B+. However I have noticed that after installation the Shutdown function does not work anymore… After cicking the tab I am expecting to have a choice of shutdown or reboot, however nothing happens and music keeps on playing. Any suggestion anyone???

Edit: Just found out that the described issue is only true in the Classic menu. Swiching to Contemporary makes the shutdown button active again. (why???)

Hello. Please describe in more detail the entire installation process for the latest version of Volumio. For example, I did not find the folders indicated at the beginning to transfer the files unzipped from the UI, and I did not understand where to unzip the second file… I understand that you don’t want to paint this, but I have no doubt that a large number of amateurs like me will be immensely grateful to you for this work.

I found it in 162 messages. It is necessary to somehow display such messages in the header.