[collected] A2DP BlueTooth Support.

Would it be enough, if we dissable pulse while not playing via bluetooth (since i think poor audioquality is due to using bluetooth as source)?
That could be accomplished with some shell commands http://www.linuxplanet.com/linuxplanet/tutorials/7130/2

Yep, but we should enable it only when BT stream start, and we can’t know that without the Pulse stack…
Banging my head on this since lots of time …

Whats about enabling pulse as soon as a device connects. When there isn’t played anything for a minute we could disable it again and also drop the connection.

What about this approach? Adding a button in the UI with “Switch to A2DP” which enables the full required BT stack and disables all other sources. When this “mode” is enabled clients would conenct and strean music in through BT A2DP. When disabled, usual bit-perfect would go on.

I think in that sense I have to disappoint you. When I started looking how to set up A2DP from scratch I read a fair share of the crappy documentation on BT/A2DP/Bluez5, but what I got from it is that when transitioning from Bluez4 to Bluez5 they dropped support for ALSA and now it only works with Pulse.
Apart from that I didn’t do a lot more than to find one of the very few instructions on how to get A2DP running under jessie, since almost all others out there are for wheezy and don’t work any more. In the comments section there is also a hint on how to make it work with passcode pairing for improved protection.

Nice, the pexpect/expect part looks quite nice, I always found the passcode approach to be a little hacky.

I started to write a plugin but was a little short of time lately. The setup should contain everything necessary to get A2DP working, except for the pairing part. For those interested in taking a look or speeding up the process you can have a look at my github. Help and cooperation always welcome :slight_smile:

How can i install your plugin ? Do i need to zip the bt-a2dp folder and load it on volumio plugin menu ?

Right now, there is no plugin! Due to a number of reason (Bluetooth, Pulseaudio and its integration in the volumio ecosystem), the development of the BT plugin is currently paused.

+1 for the feature
I’ve made a try with “Bluetooth Audio ALSA Backend” at github.com/Arkq/bluez-alsa, but so far I’ve not succeeding in installing it … :frowning:
That may give ideas to experimented people :slight_smile:

Definitely an interesting project. Bookmarked it for later. Right now it still seems to suffer from package loss as the Github issues indicate.

I’ve setup this yesterday : github.com/BaReinhard/Super-Sim … er-Install

Easy setup and I have bluetooth up and running on my Volumio 2.

I don’t remember every steps as it was late work, but it’s basically a git clone and run :

bt_pa_config.sh
then
bt_pa_install.sh

Maybe I added some steps from there : instructables.com/id/Raspber … /?ALLSTEPS

I not touching anymore my setup but I’ll let you play with that.

tested airplay and playing songs from web interface. No problem and no crash so far.

Hey Flo, this is more or less the status of my stalled BTA2DP branch on Github :wink:

The problem however is a bit more involved:

As Volumio runs on a Debian Jessie distro we can’t use BlueZ4 but have to use BlueZ5. While there first supports ALSA, the support was dropped in the latter one, leaving Pulseaudio as the only supported sound server. However, as Michelangelo’s statement hints at: Pulseaudio is a b**ch. To make Bluetooth with ALSA work, the only way I currently see this happening is with the Github port that phweyland suggested:

Hey,

Is that plugin available on volumio to just click and go?

I haven’t follow for a while where volumio was at with Bluetooth support but didn’t find anything new. I have no idea what’s the story with between pulse and Alsa with BlueZ.

All I know is that now my volumio can play my library, does airplay and upnp and on top of that I can use it as a bluetooth receiver which allows me to watch a movie without having to plug sound cable or use a 3.5 jack splitter. I’ve been waiting for long time to be able to do that and I’m happy it’s finally possible. \o/

quick correction, this is what I use to get bluetooth working:

github.com/BaReinhard/Super-Sim … er-Install

Hello Flo,

Glad you were able to use the bluetooth/pulseaudio portion with success. For others interested in doing the same, you can use the install.sh to manage your installation process. If you already have an /etc/asound.conf I would suggest running a custom install, then choose ‘y’ to install bluetooth and simplay answer ‘n’ to the rest of the options. The install script will run some prep work and update and upgrade via apt-get.

If you only answer ‘y’ to blueooth install only the lines 172-178 will be run,
github.com/BaReinhard/Super-Sim … ll.sh#L172

I haven’t ever used volumio so I don’t know too much about it, but it seems as though you guys have issues with bluetooth routing to pulseaudio on connection. If this is something that many of you may need I will make a new pull request to create another installataion candidate in the install script that will set a pre-existing install for those looking to install bluetooth only on volumio.

If there was any other configuration changes you needed to make please let me know and I will be sure to include them.

EDIT:

I added the Volumio choice in the install script, Simply Run

pi@raspberrypi:~/Super-Simple-Raspberry-Pi-Audio-Receiver-Install $ sudo ./install.sh

  1. Install the Raspberry Pi Audio Receiver Car Installation
  2. Install the Raspberry Pi Audio Receiver Home Installation
  3. Install the Raspberry Pi Network Without Internet Installation (For teaching!)
  4. Install the Volumio (Bluetooth Only) Installation
  5. Install a Custom Raspberry Pi Audio Receiver
    Which installation would you like to choose? (1/2/3/4/5) : Choose 4

It will ask if you want all the devices to be named the same, but since you’re only installing the bluetooth option it doesn’t really matter how you answer, so long as its y or n. The naming will be what’s displayed when the bluetooth broadcasts. I.E. for my car receiver “Pontiac G8 GT”

For those who use this, please feel free to leave feedback, whether it worked or not and we can make sure to get something that works properly. If there is an issue please try to use the issue portion of github as I get email notifications on that.

Incredible!! I’ve been looking for this for ages and seems like bernhard is already working on it at this moment. It’s the only thing that this amazing player lacks from being the ultimate audio experience for any smart amplifier = a bluetooth connection. Right now I can have analog in, digital in and the only thing that I’m missing is a simple and elegant way to quickly stream things over bluetooth on occasion.

Keep up the good work!

Is there a way to solve this as a plugin in volumio2?

Hallo,

i have a Raspberry B + Bluetoothdongle.

Volumio 2.129 + the Blue… Script from Berhard do not go. :unamused:

The new Jessie Lite image + the Blue… Script works fine.

What is the Problem, is the Image too new ?

Sorry for my bad english.

THX

Hello,

Fantastic, I can now connect my JBL 450BT to volumio. The only thing left is to output the sound to the bluetooth driver.

Right now, the only possible outputs are “Audio” and “HDMI”.

So thanks for this wonderful script :wink: And if anyone has an idea on how to output to BT …

P.S. : I’m using it with volumio 2.141 on a RaspberryPi zero-wifi.

Up anyone ??? :question:

Hi, :slight_smile:
I’ve found this discussion while I was searching a way to add bluetooth function for my volumio machine (Raspberry pi zero w and phat dac).
I know that DLNA and Airplay have a better quality but my smartphone is quite old and doesn’t support them :frowning: . I’ve followed the BaReinhard guide but during the execution I get some errors (such as command not found). I’m not very applied with these commands (I usually copy and paste the lines in the terminal).
This is my procedure:
[spoiler]

[/spoiler]
After the reboot of machine I can’t find with my phone any bluetooth device.
What can I do ? :question:
Thanks for the answer and sorry for my inexperience. :slight_smile:

+1,000,000 votes for this feature; here is what I think:

a very cool and super awesome feature would be if you could stream from a smartphone (through a Bluetooth or Wifi (maybe through the app as well) connection) to volumio and have volumio record the audio input and give you the option to save it to your local / network device containing your media files. This way you can also expand your library if anyone comes past and has a song that you don’t have in your library, you can then easily have them stream it through your volumio setup and boom you have the song now part of your library…

Make it sound easy, right (*duck), I think a lot of people will find this feature super handy.