[GUIDE] Volumio Bluetooth receiver

hey all,

would this work on the pine64?
cheers

Wow, works like a charm.
When you have no sound while everything is connecting nicely, list all devices using

aplay -l 

One of them shows HDMI, the other doesn’t I’m using the jackout (for now) so i selected the 0,0 device, modify that right here:

sudo nano /lib/systemd/system/bluealsa-aplay@.service

(you have to modify the device in 2 lines here!)

thanks a million!!!

I have a Rpi3 with a Hifiberry Amp2 and I can’t get this to work. I have found a couple of things that maybe can help other people in my situation to progress.
First thing is that bluetoothd doesn’t use the config files from /etc/bluetooth but from /usr/local/etc/bluetooth, so the best thing to do is to create a symlink between the two folders. You have this issue if your your bluetooth name and type are wrong, so it just uses the default one.

sudo ln -s /etc/bluetooth /usr/local/etc/bluetooth

The second one is if you see that your bluetooth name is your hostname, even though you have specified it in your main.conf or audio.conf. The service bluetoothd needs to be started with a parameter to not load a plugin called hostname. All this stuff about bluetoothd plugins is pretty alien to me and I can’t find any documentation on the matter. Any info would be greatly appreciated.

You have to do

sudo nano /lib/systemd/system/bluetooth.service

And in there change

ExecStart=/usr/lib/bluetooth/bluetoothd -P hostname

With all this I get a device with the name I want and with the type I want, I can sync it to my android phone but it’s not a “headphone” type, just a standard one. If I change the class to 0x00480414 I get the headphones icon in Android, but still it doesn’t work, I only have the option to share my contacts with this device, not to use it as an A2DP device.
I think I have some issues with my udev config file as it never seems to get triggered but I confess I don’t know how udev works, so any help is welcome.

This is what bluetoothctl tells me.

[bluetooth]# show Controller B8:27:EB:0D:31:EB (public) Name: Volumio BlueZ Alias: Volumio BlueZ Class: 0x00480414 Powered: yes Discoverable: no Pairable: yes UUID: Headset AG (00001112-0000-1000-8000-00805f9b34fb) UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb) UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb) UUID: Handsfree Audio Gateway (0000111f-0000-1000-8000-00805f9b34fb) Modalias: usb:v1D6Bp0246d0530 Discovering: no

This guide did not work for me on volumio 2.389 on a RPI3 with Hifiberry Dac+ and the integrated BT module.

After some fixes that were suggested in the comments it would eventually show up as a headset/loudspeaker device, but the audio was still coming out of the Android after paring…

Then I tried this guide/tool here: github.com/BaReinhard/Super-Sim … er-Install . It supports volumio (install bluetooth only mode) and tries to be a one-click-solution to get A2DP playback. I guess it is a similar approach as the one mentioned here.

However, it still did not work for me in the beginning. I went through lots of the github issues to find some tricks and eventually - with some more manual commands - I was able to get playback working. For some reason the input device that supposedly should get created when playback starts, just doesn’t appear which is the reason nothing works. If you manually route input stream to output device it actually works (for exactly that device).

But still, the audio quality was so bad (loud crackling over the music) that it is just not usable. A lot of people that are complaining about this have fixed it by not using Wifi at the same time but I’m using ethernet and had the wifi module disabled already.

So, for people with Android, I would recommend to go the BubbleUpnpServer way instead of A2DP. Better sound quality and already working on stock volumio. I wanted to have A2DP solely to stream Spotify from a non-rooted Android device, but it seems that money (& time) is better spent on a Chromecast audio.

The problem with that solution is that it uses pulseaudio. I’ve managed to make it work with pulseaudio on my own, it’s pretty simple actually and works quite flawlessly with A2DP but I’d rather stick to just ALSA if possible.

Hi - trying to gather info before actually starting my new project " enabling Bluetooth apt-x (HD) on my Onkyo 709 ".

In theory I should be good to go with a RPi2 (model B), HiFiBerry Digi B+ (HW1.0) and Orico BTA-403 USB dongle as I noticed the CSR8510 chipset has apt-x support. However as I want to be able to use the device as a " discoverable " device , thus once BT on my OnePlus phone is enabled I should be able to pair the RPI2. Main concern is if apt-x is indeed supported using the CSR8510 dongle with Volumio.

Hi I Followed your post and installed Bluetooth A2DP audio receiver on a fresh install of volumio in my PI3 B+.
When i want to pair the device to my Samsung S7 i need the Device ID in the form of XX:XX. I only found the the hardware address 70:EE:XX:XX:XX:XX which is not accepted. How do i obtain the de DeviceID??
And on my Samsung Phone i don’t see ad device named Volumio. Should the name Volumio be seen, of only the hardware address of the device?

I followed your guide and got no errors however things are not working properly yet

i get the following results from the “systemctl | grep blue” command.
sys-subsystem-bluetooth-devices-hci0.device loaded active plugged /sys/subsystem/bluetooth/devices/hci0
● bluealsa.service loaded failed failed BluezAlsa proxy
bluetooth.service loaded active running Bluetooth service
bluetooth.target loaded active active Bluetooth

what do i need to change?

Bluetooth from iphone to volumio on raspberry pi 3 working, to a USB dragonfly red DAC.
Thanks for the guide.
I had to tweak some settings, inspired from the Moode distrib.

Compile the 5.49 bluez driver :

git checkout 5.49

in the bluealsa-aplay@.service : replace one line

ExecStart=/usr/bin/bluealsa-aplay --profile-a2dp -d plughw:CARD=v10 %I  

plughw:CARD=v10 match my DAC. More probably, it could be possible to use a systematic pattern. For this DAC the hw:5,0 did not work.

to see available sound interfaces

aplay -l && aplay -L 

card 5: v10 [AudioQuest DragonFly Red v1.0], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0

plughw:CARD=v10,DEV=0 AudioQuest DragonFly Red v1.0, USB Audio Hardware device with all software conversions

From my undersanding, the following file is not needed anymore :
/etc/bluetooth/audio.conf

instead add one additonal setting inside this one :
sudo nano /etc/bluetooth/main.conf

AutoEnable=true

in the bluealsa.service : replace one line

ExecStart=/usr/bin/bluealsa -p a2dp-source -p a2dp-sink

in the /etc/udev/rules.d/99-input.rules : replace complete file

[code]ACTION==“add”, KERNEL==“input[0-9]", SUBSYSTEM==“input”, ATTR{name}==":::::", GOTO=“bt_add”
ACTION==“remove”, KERNEL=="input[0-9]
”, SUBSYSTEM==“input”, DEVPATH=="/devices/virtual/input/*" GOTO=“bt_remove”
GOTO=“bt_end”

LABEL=“bt_add”
RUN+="/usr/bin/mpc stop"
RUN+="/usr/local/bin/a2dp-autoconnect"
GOTO=“bt_end”

LABEL=“bt_remove”
RUN+="/usr/local/bin/a2dp-autoconnect"

LABEL=“bt_end”[/code]

After the REBOOT, for the first time pairing and connecting :

[code]sudo bluetoothctl

power on

agent on

default-agent

discoverable on

scan on => xx:xx of your device ##on your phone : activate its bluetooth, select volumio

pair xx:xx

##the console ask for confirmation of a PIN :

yes ##on your phone : tap pair

trust xx:xx

exit[/code]

if the pairing does not work (for me the connection after the pairing did not work for a long time)

# remove ## on your phone: tap forget volumio

check all the steps, reboot and retry

then the following command helps a lot to see if all the services are up and running :

systemctl | grep blue

After that for me it works. Some issues though :
-the resampling does not apply on the bluetooth stream though. (nor on the spotify connect)
-volume setting is really weird, it feels exponential (last +1% on the bluetooth volume on the phone makes a 2x real difference on speakers), when you switch between sources, you’d better to lower your amp volume
-I have still difficulties to understand the class of the bluetooth receiver of the Pi :

blutoothctl show #shows :
Class: 0x000c041c
despite expecting 0x20041c mentionned in the main.conf of bluez

Thank you to the OP, and to you for your updates, the original post didn’t work for me, but with your updates I got it working.

I used the 5.50 bluez driver and it worked OK

git checkout 5.50

In your /etc/udev/rules.d/99-input.rules you have in 2 places

RUN+="/usr/local/bin/a2dp-autoconnect"
but to match the original post in this thread it should be

RUN+="/home/volumio/a2dp-autoconnect"

Hi, Thanks to vrdsp0 and G00f tips I am able to pair volumio with my android phone and everything works ok. However I am trying to use volumio as a “soundbar” and pair it with my Samsung TV. In this case I have only a half-success. I am able to “pair” volumio from bluetoothctl side (I was even asked for pin confirmation), but on TV nothing is going on. What could be the reason?
P.S. Pairing TV with android phone works ok.

First of all thanks to everybody involved in this thread.

Now I have an almost working configuration, ad I writen down some notes: dropbox.com/s/ed6guedjaz16r … 1.pdf?dl=1

I hope it will be usefull, but I recommend before reading the whole discussion.

I tried a couple of times to enable bluetooth receive on my Raspberry pi 3B with volumio to send audio via bluetooth to the 3.5mm jack out. But I can’t get it work.

It looks like everything is installed, but i simply can’t connect. I can pair, i see volumio on my phone or laptop. But when i tap connect, it just doesn’t. Bleutoothctl also says it isn’t connected:

[CHG] Device 3C:28:6D:03:F7:6B ServicesResolved: yes
[CHG] Device 3C:28:6D:03:F7:6B Paired: yes
Pairing successful
[CHG] Device 3C:28:6D:03:F7:6B ServicesResolved: no
[CHG] Device 3C:28:6D:03:F7:6B Connected: no

after that, i see volumio in my phone (pixel 3) as recently connected, but when i click the connect button it just doesn’t do anything. On my laptop it’s exactly the same so the problem seems to exist in the volumio configuration. Could someone help me with this problem?

now auto pair is ok, see:
gist.github.com/mill1000/74c747 … a2dp-agent

I’ll try to update my guide.

Same problem for me, I paired my phone, trusted it and I can see volumio in the bluetooth paired devices, but when I tap on it just nothing happens

hi.

i’m trying to connect my phone using this guide. It’s not working and when i’m running journalctl -f i get this error:

Jan 07 13:36:12 volumio bluetoothd[890]: a2dp-source profile connect failed for D4:AE:05:C5:12:A8: Protocol not available

did i miss something in the guide?

Under limitations you may want to add “Doesn’t support iOS”.
RaspberryPI’s bluetooth is not registered with Apple’s MFi program / scam. So on an iOS device you’ll simply get “Not supported” and “forget” button when you try to pair, no other options, and the phone will not let you do anything until you hit forget.
You could potentially get this going by using BTLE, (I don’t think that’s part of Apple MFi scam), but the bandwidth is so small under BTLE that it’s probably not worth the hastle.

Well, after a week of struggle and until today I found the definitive guide.
Many thanks to KKMan, vrdsp0 and G00f-
Latest version of volumio, dac usb creative, pi 2
and waiting for an update with a 12s dac
everything works well.
Thank you
I’m Spanish, this is google, sorry for my english

Hi All,

I made the installation but cannot pair any of my devices, actually everything looks ok till asking pin, I saw the Pin on both device when I wrote yes on SSH and click to Pair on my android phone it says
"
[CHG] Device C0:EE:FB:DD:3A:33 Connected: yes
[CHG] Device C0:EE:FB:DD:3A:33 Connected: no
"

and there is anything to remove pin control? Because I don’t want to use SSH screen anytime I want to connect.

thanks.

Note: My setup is “Raspberry Pi Zero W + Allo Mini-Boss”

See previous post:

gist.github.com/mill1000/74c747 … a2dp-agent

Inviato dal mio SM-A530F utilizzando Tapatalk