Amarok, Ubuntu Gutsy 7.10, Bluetooth and Sony MBR-100 Audio Receiver

As we all know Amarok is the best music player in the world, and it’s free. It’s only available on Linux at the moment but the devs are working hard to port it to Windows. Anyway I digress. I wanted to explain how I got Amarok playing on my laptop, accessing my music collection on my media server, through my bluetooth dongle, picked up by my Sony MBR-100 bluetooth audio receiver and finally terminating joyfully in my trusty Sennheisers.

I’ll begin at the noisy end. The Sennheisers are simply a great pair of headphones. The Sony MBR 100 was a free gift with my mobile phone which I initially dismissed as a gimmick. I mean, who honestly uses their phone as an MP3 player? However, quite separately I discovered that my new phone connects far better to Ubuntu over bluetooth than with the USB cable, so I bought a cheap dongle and indeed, after some futzing around it connects very well. It subsequently occurred to me that I may be able to press that gimmick into service around the home.

Here’s the tricky bit. I figured that connecting the MBR-100 to my laptop was going to prove a bit of a pain, and indeed the initial pairing with the device was the stumbling block. Normally pairing can be achieved by right-clicking on the bluetooth icon in the system tray, but it doesn’t seem to work with the MBR-100. I managed to overcome the difficulty by doing the following:

Install the old btsco module:

sudo apt-get install bluez-btsco

Load the module:

sudo modprobe snd-bt-sco

get the address of the MBR-100 using hcitool:

hcitool scan

At this point the MBR-100 needs to be allowing pairing. Turn off, then on again until the LED flashes green/red/green/red etc. Now we can attempt connection:

sudo btsco -v aa:bb:cc:dd:ee:ff

Where aa:bb:cc:dd:ee:ff is the address of the device as revealed by the scan. The bluetooth symbol in the system tray should now spit out a dialogue about entering a passcode – click and enter the default pairing number, on mine it is 0000.

If you’ve got this far then the rest should be a doddle. If not, it may be of use to restart bluetooth services and try again:

sudo /etc/init.d/bluetooth restart

Once paired, the MBR-100 doesn’t appear to need the snd-bt-sco module any longer, and will accept broadcast audio from my laptop without any extra intervention even after a restart. There are two things remaining to do. First we need to create a config file for alsa (advanced linux sound architecture if you were wondering!):

cd
gedit ~/.asoundrc

Copy this into the file:

pcm.bluetooth {
type bluetooth
device aa:bb:cc:dd:ee:ff
}

replacing aa:bb:cc:dd:ee:ff as before with the address of the MBR-100. We need to restart alsa now:

sudo /etc/init.d/alsa-utils restart

In Amarok we can browse to (hey a GUI at last :) ) Settings > Configure Amarok > Engine then, selecting alsa as our output plugin and by hitting “Apply”, we can type bluetooth in the stereo box, apply again and that’s it. Play a song!

More info at the bluez wiki.

Posted on October 25, 2008 at 1:23 pm by mcmlxxii · Permalink
In: Linux · Tagged with: , , , , , , ,

9 Responses

Subscribe to comments via RSS

  1. Written by Ingo Schmitt
    on 07/11/2008 at 6:17 pm
    Permalink

    I’m getting the following error-msg when i try to pair with intrepid

    catfish@threeofnine:~$ sudo btsco -v 00:16:20:FF:C0:EE
    btsco v0.42
    Device is 1:0
    Voice setting: 0×0060
    Can’t connect RFCOMM channel: Connection refused

  2. Written by mcmlxxii
    on 07/11/2008 at 6:28 pm
    Permalink

    Ingo, I actually get the same error when pairing with Intrepid. There’s been quite a change in bluetooth in Intrepid – it’s supposed to be easier! If you right click on the bluetooth applet in the panel, and select “Preferences” from the dropdown list, and your bluetooth audio device is in there, then add this to the bottom of your .asoundrc (instead of the section above swap out the AA:BB:CC etc for your mac):

    pcm.bluetooth {
    type bluetooth
    device AA:BB:CC:DD:EE:FF
    profile “auto”
    }

    Then restart alsa (and possibly bluetooth) and you should be able to select bluetooth in amarok and just play.

    If you use Rhythmbox you need to change the playback setting in gconf to tell it to use bluetooth:

    gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink “alsasink device=bluetooth”

    to change back:

    gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink “autoaudiosink”

    It’s a drag I know. I’ll update the post soon to add these Intrepid glitches.

  3. Written by Ingo Schmitt
    on 08/11/2008 at 6:51 pm
    Permalink

    Hi mcmlxxii,

    thanks for your quick responds.

    My problem is, that I can’t pair with the stick.

    I just tried it with blueman (which pulls in newer bt-libs) but that also dosen’t help.

    will keep trying…

  4. Written by mcmlxxii
    on 09/11/2008 at 11:22 am
    Permalink

    Hi Ingo,

    can you pair with anything? Until Intrepid I used an MSI bluetooth dongle, but with the changes in Intrepid it stopped working (it still works in Hardy). In the end I bought a new dongle. I get the same output you did when I tried to pair with the stick the first time, but it still let me enter the passcode.

  5. Written by Ingo Schmitt
    on 09/11/2008 at 6:52 pm
    Permalink

    Hi,

    I can pair it with my motorazr.

    When I try to pair manually, I also can enter the pin, but the connection dies after few seconds. when I try to pair it with the gnome-applet, it doesn’t ask for the pin, it just says that it cannot connect.

    It seems that my internal BT doesn’t support the MBR-100, will see if an external dongle will work….

    thx.
    ingo

    I have a dell D420 and im using the build in BT. But will try ano

  6. Written by mcmlxxii
    on 09/11/2008 at 7:10 pm
    Permalink

    Hi Ingo,

    not sure if this is any help, but it shows the packages I have installed on my machine relating to bluetooth in intrepid:

    :~$ dpkg --get-selections | grep blue
    bluetooth install
    bluez install
    bluez-alsa install
    bluez-btsco install
    bluez-cups install
    bluez-gnome install
    bluez-gstreamer install
    bluez-utils install
    gnome-bluetooth install
    libbluetooth3 install
    libmultisync-plugin-irmc-bluetooth install

  7. Written by Ingo Schmitt
    on 10/11/2008 at 5:45 pm
    Permalink

    blueman deinstall
    bluez install
    bluez-alsa install
    bluez-audio deinstall
    bluez-cups install
    bluez-gnome install
    bluez-gstreamer install
    bluez-hcidump install
    bluez-input install
    bluez-network install
    bluez-serial install
    bluez-utils deinstall
    bluez3-audio deinstall
    bluez3-utils deinstall
    gnome-bluetooth install
    libbluetooth2 deinstall
    libbluetooth3 install
    mplayer-skin-blue install
    python-bluez install

    these are my pakages, but i don’t understand why the deinstalled ones are also listed…

  8. Written by Ingo Schmitt
    on 10/11/2008 at 6:54 pm
    Permalink

    I have now the same packages as you, but that makes no difference actually – I cannot pair without an usefull error msg using the gnome-applet.

    catfish@threeofnine:~$ dpkg –get-selections | grep blue
    blueman deinstall
    bluetooth install
    bluez install
    bluez-alsa install
    bluez-audio deinstall
    bluez-btsco install
    bluez-cups install
    bluez-gnome install
    bluez-gstreamer install
    bluez-hcidump install
    bluez-input install
    bluez-network deinstall
    bluez-utils install
    bluez3-audio deinstall
    bluez3-utils deinstall
    gnome-bluetooth install
    libbluetooth2 deinstall
    libbluetooth3 install
    mplayer-skin-blue install

  9. Written by mcmlxxii
    on 14/11/2008 at 7:58 pm
    Permalink

    Ingo, if you right-click on the bluetooth icon in the systray and hit Preferences, is the MBR-100 listed? If so, delete it.

    If I delete the MBR-100, set it to pair (red-green light alternating) and then enter the commands I get this:

    sudo modprobe snd-bt-sco
    sudo btsco -v 00:16:20:FF:7B:E6
    btsco v0.42
    Device is 1:0
    Voice setting: 0×0060

    [At this point the dialogue box appears and lets me enter the passcode (0000), then:]

    Can’t connect RFCOMM channel: Connection refused

    BUT – it has paired ok, even though it says “Connection refused”. So now I can set amarok to bluetooth, and when I play it does actually work.

    If you don’t ever see the dialogue box, and can’t ever pair, then I suspect something has broken with bluetooth since Hardy for your particular dongle. What is the output of lsusb when your dongle is plugged in?

    Cheers, Jonathan

Subscribe to comments via RSS

Leave a Reply