After installing a bluetooth-dongle for bluetooth transmitting to my speakers it works with installing and testing of this lines;
~# sudo apt-get install cmus
~# dsp.alsa.device bluetooth
~# output plugin alsa
~# sudo apt-get install mpg321
~# mpg321 -a bluetooth -g 95 http://icecast.omroep.nl/radio2-bb-mp3
Installing the last command line into => rc.local … starts my bluetooth speakers with the stream radio2 ( mpg321 -a bluetooth -g 95 http://icecast.omroep.nl/radio2-bb-mp3 & ).
But where and how can I’ll bring or change the lines//command such ( ~# dsp.alsa.device bluetooth
and ~# output plugin alsa ), so that the MusicBox-audio output starts with or into Bluetooth transmit ?
In the meantime, the bluetooth experiment will be finished 100%.
So, we can handle Musixbox normally and complete with all futures and the output will be transmit (stereo) with a good quality to the (my) bluetooth sounbar.
In the weekend I’ll publish a howto in this topic.
$ sudo apt-get install bluetooth bluez bluez-utils bluez-alsa
$ hcitool scan ## switch you bluetooth to scan ##
$ bluetooth-agent --adapter hci0 0000 48:5A:B6:A8:1C:A2 ## <–device you find with the scan and will connect ##
$ bluez-test-device trusted 48:5A:B6:A8:1C:A2 yes
$ bluez-test-device trusted 48:5A:B6:A8:1C:A2 ## If Okay, this will confirmed with a 1 ##
$ sudo /etc/init.d/bluetooth restart
Change output = alsasink into output = alsasink device=bluetooth (settings.ini)
Put the lines (only) into the file asound.conf (/etc);
pcm.bluetooth {
type bluetooth
device 48:5A:B6:A8:1C:A2 ##your device##
profile “auto”
}
Remove the file setsound.sh (/opt/musicbox)
Put some lines into the file audio.conf (/etc/bluetooth);
I know it’s not totally relevant, but does anyone know if it’d be possible to stick in a bluetooth dongle that mopidy could use to accept audio from other devices like phones which it would then route through mopidy as if it’s a proper music source?
As you request by line 2, Yes this will be possible, but you must rewrite/program the setsound.sh (/opt/musicbox) instead of removing. It will be also the solution for your request of line 3.
But for your info, I don’t have the skils like a programmer, Sorry !!!
Maybe you could better buy the option DAC (for a better audio output then the headphone-jack) and bring this signal into the seperated bluetooth transmitter of newest Marmitek BoomBoom (with USB)
@fusen I can’t think of a way to do this involving Bluetooth but I also don’t see what the the benefits would be of doing so. To let you skip/pause/play through the same interface?
I think dlna/upnp might be a better way to go with that. Have you looked at using that?
We launch shairport with arguments to use the default device. You’d need to either change your asound device definition and make bluetooth the default, or change the line in /etc/init.d/shairport-sync to explicitly use your bluetooth device. The former, along with some extra logic in setsound.sh, would be better in my opinion as then you can do something sensible in the case of your trusted BT device being unavailable.
Is it posible to leave the bt dongle on when the bt speaker is turned of?
When I now turn my speaker off, after a while the dongle is off and when I want to reconnect I must reboot the Raspberry.
I have mopidy running on a Raspberry Pi3 with built-in bluetooth. I have the BT working with my BT speakers. How to I get mopidy to use the BT as output? I tried using the instructions given by Dvsat. But I’m not running Musicbox 0.6.
@fusen Hi! I was playing a bit to set up Bluetooth as a source to mopidy. My main purpose was to have the audio and also see whats playing (artist/title/lenght) and control the playback (play/pause, etc) like the car players usually do (I found it’s called AVRCP in the bluetooth world).
Now, the code is just a proof of concept and it’s not suitable for everyone. Some things do work and others don’t. The connection to the Bluetooth source has to be done previously and the mananging of the audio is all done via pulseaudio (not mopidy or gstreamer). What you get is only to see the Artist/Title and control play/pause from mopidy itself.
I’m adding it just to answer your comment because I could find very little information about it when I started to look for it. It seems a very unpopular use case in the internet world, but my feeling is that is very common outside there.
Hey @ismailof: Good job with the Bluetooth tool. I’d like to suggest to focus on the auto connecting feature for use with a Bluetooth remote (which many of us already have) like the remote included with the Amazon Firestick: or Wiimote because it looks like you already support remote playback control.
I know that these remotes usually ‘time out’ to save battery life and then autoconnect once they find the source – that’s why the autoconnect feature would immediately make your tool useful for everyday use.
someone tried to connect music box with a car ? I would like to connect to my renault rlink2 system not only for listen music but also to control like I do with the phone (just play/pause and next/prev), not only for the better audio quality but also for the library control. Is it possible?
thanks
Folks, has anybody managed to install Bluetooth on a Pi W zero with the MusicBox image? I get
E: Unable to locate package bluetooth
E: Unable to locate package bluez
E: Unable to locate package bluez-utils
E: Package ‘bluez-alsa’ has no installation candidate
Any ideas…
Thank you