NAS > RPi > Bluetooth speakers *HELP*


37 posts   Page 1 of 2   1, 2
by AcidOverride » Fri Feb 22, 2013 12:13 pm
Hi, Im new to this so bare with me. Bought my first RPi and installed XBMC on it right away. Been playing movies from my windows PC (will eventually be purchasing a NAS/microserver) to my living room and it works beautifully!! I want to try something new with it!!! My idea is to have bluetooth/wifi speakers. So, in my dining room I have a 19inch LED TV which I want to hook the Pi upto but I want the sound to come from bluetooth speakers such as the Logitech Bluetooth Boombox. Is this fairly straight forward whilst running XBMC? I hear the PLANEX 2 in 1 Micro Size USB Bluetooth 3.0 WiFi Combo Adapter works well?!?!

Thanks
Posts: 8
Joined: Fri Feb 22, 2013 10:07 am
Location: UK
by castalla » Fri Feb 22, 2013 1:20 pm
Before you shell out loads of cash on a fancy dongle plus speakers, get a cheap bt dongle & cheap speaker/headset to try the principle.

I had absolute hours/days/weeks of hell trying to get a logitech bt speaker setup working.

You'll need to install bluetooth and bluez-utils on the xbmc image (I've no idea how easy that may be if you are using raspbmc or openelec. It should be easy enough with xbian.

Then, the fun begins - will the dongle work? Some do - others don't. The key procedure is to get the speaker and dongle paired and trusted so that the system recognises the speakers when you switch the system on and off - you need to get autopairing working.

(This took me weeks of postings, googling, retrying setups, etc. to discover a method which actually worked).

You then will need to set up xbmc to use the bt audio source as a sound output using pulseaudio or alsa (no idea how that works in xbmc).

Search here for 'bluetooth' - you should find my postings on bluetooth. Read them through completely as there are errors in earlier postings which are later corrected.

PM me if you need specific help - I'll try to advise on what little I have gleaned in my quest.
Last edited by castalla on Fri Feb 22, 2013 1:40 pm, edited 1 time in total.
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by AcidOverride » Fri Feb 22, 2013 1:37 pm
This is awesome info castalla!! Greatly appreciated!! I will have a look through some other threads then see if I can get my head round some things and drop you a msg if I get stuck. Thanks again!!
Posts: 8
Joined: Fri Feb 22, 2013 10:07 am
Location: UK
by Cloudcentric » Fri Feb 22, 2013 1:41 pm
I have posted a Bluetooth packages for Rapbian "wheezy" response:

viewtopic.php?f=83&t=31756
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by castalla » Fri Feb 22, 2013 1:53 pm
Seriously, get a cheap dongle & a cheap speaker first. That planex is pricey & the logitechs will not be cheap! Unless you find a solid posting confirming the 2 will work together!
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by castalla » Fri Feb 22, 2013 1:55 pm
@Cloudcentric

Sorry - but I'm at a loss to see how your package can help to set up bt speakers with xbmc.
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by Cloudcentric » Fri Feb 22, 2013 2:12 pm
castalla wrote:@Cloudcentric

Sorry - but I'm at a loss to see how your package can help to set up bt speakers with xbmc.



XMBC, there are several versions available for the Pi, so pointed to installed on Raspbian !

.. but you could have, who knows ? Raspbmc / Xbian / OpenElec
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by castalla » Fri Feb 22, 2013 2:28 pm
I still fail to see your point - which is?

Your package is for Android to control bluetooth - there's no reference anywhere to setting bt up for bt speakers.
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by Spid » Fri Feb 22, 2013 2:33 pm
Bluez has many features to communicate over Bluetooth

PAN / DUN / File Sharing / Pulse Audio / DHCP Client / Headset /PPP / Net Usage / Pairing blah blah blah

http://ubuntuforums.org/showthread.php?t=1145974

viewtopic.php?t=26533&p=241248
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm
by castalla » Fri Feb 22, 2013 2:41 pm
I know that! I've spent weeks trying to get the damn thing to work -

Unless you can sort this out then simply posting about what bluez theoretically can do is not helpful:

Code: Select all
HCI sniffer - Bluetooth packet analyzer ver 2.4
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 10:B7:F6:00:46:40 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 11 bdaddr 10:B7:F6:00:46:40 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 11
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 11
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x59 0x83
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
    handle 11 page 1
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr 10:B7:F6:00:46:40 mode 1
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 11 slots 5
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 11 page 1 max 1
    Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 10:B7:F6:00:46:40 mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 10:B7:F6:00:46:40 name 'Mini Boombox'
< HCI Command: Authentication Requested (0x01|0x0011) plen 2
    handle 11
> HCI Event: Command Status (0x0f) plen 4
    Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
    bdaddr 10:B7:F6:00:46:40
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
    bdaddr 10:B7:F6:00:46:40
> HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Negative Reply (0x01|0x000c) ncmd 1
    status 0x00 bdaddr 10:B7:F6:00:46:40
> HCI Event: IO Capability Request (0x31) plen 6
    bdaddr 10:B7:F6:00:46:40
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9
    bdaddr 10:B7:F6:00:46:40 capability 0x04 oob 0x00 auth 0x03
    Capability: Reserved (OOB data not present)
    Authentication: Dedicated Bonding (MITM Protection)
> HCI Event: Command Complete (0x0e) plen 10
    IO Capability Request Reply (0x01|0x002b) ncmd 1
    status 0x00 bdaddr 10:B7:F6:00:46:40
> HCI Event: Simple Pairing Complete (0x36) plen 7
    status 0x1e bdaddr 10:B7:F6:00:46:40
    Error: Invalid LMP Parameters
> HCI Event: Auth Complete (0x06) plen 3
    status 0x05 handle 11
    Error: Authentication Failure
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 11 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 11 reason 0x16
    Reason: Connection Terminated by Local Host


Your Ubuntu link is pointless, too - read the Topic Title:

Stream audio FROM iPod touch/iPhone over bluetooth TO computer
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by Spid » Fri Feb 22, 2013 2:59 pm
Actually Castalla I just realised you have HIJACKED someones else thread, nice for AcidOveride
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm
by castalla » Fri Feb 22, 2013 3:04 pm
@Spid

What are you talking about?

Acidoveride asked how simple it was to set up xbmc with logitech speakers.

I replied with details of how much effort I spent getting it working and offered specific advice.

Then, out of the blue, posts appear which have little or nothing to do with the specifics of the topic. I'm just pointing out unless you have something specific to contribute then you are just muddying the waters with links to pages about Ubuntu bluetooth and iPods.

It's not me hijacking the thread.
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by jamesh » Fri Feb 22, 2013 3:55 pm
CALM DOWN ALL.

Please keep to the topic in hand.
Soon to be employed engineer - Hurrah! Volunteer at the Raspberry Pi Foundation, helper at PiAcademy September 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11911
Joined: Sat Jul 30, 2011 7:41 pm
by Cloudcentric » Fri Feb 22, 2013 4:12 pm
AcidOverride wrote:Hi, Im new to this so bare with me. Bought my first RPi and installed XBMC on it right away. Been playing movies from my windows PC (will eventually be purchasing a NAS/microserver) to my living room and it works beautifully!! I want to try something new with it!!! My idea is to have bluetooth/wifi speakers. So, in my dining room I have a 19inch LED TV which I want to hook the Pi upto but I want the sound to come from bluetooth speakers such as the Logitech Bluetooth Boombox. Is this fairly straight forward whilst running XBMC? I hear the PLANEX 2 in 1 Micro Size USB Bluetooth 3.0 WiFi Combo Adapter works well?!?!

Thanks


What version of XMBC have you installed ? Xbian / OpenElec / Raspbian / ??
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by AcidOverride » Sun Feb 24, 2013 6:57 pm
Cloudcentric wrote:
What version of XMBC have you installed ? Xbian / OpenElec / Raspbian / ??


Only just managed to check back on here. I downloaded the image off raspbmc.com!
Posts: 8
Joined: Fri Feb 22, 2013 10:07 am
Location: UK
by castalla » Sun Feb 24, 2013 8:38 pm
I just found this: http://openelec.tv/forum/68-audio/27827 ... dio-stream

It's for openelec but you may be able to adapt for raspbmc - the key part for xbmc is the asound.conf file (which you need to edit to match your speaker's mac address) & the sequence you need to follow in xbmc to set the bt device as the sound output.

I'm not sure about the bt-adapter, etc. commands as I didn't try that route. I suspect they are deprecated in the latest version of bluetooth & bluez-utils - but I don't know.

(I'm getting a 2nd Mini Boombox tomorrow and can give it a try later this week - I don't want to mess with the settings for the Boombox I've got working!).

EditL

Okay. If you want to set things up before you get a dongle and speaker, you can try to install the required packages. You need to ssh to your xbmc box, login as root. Then do:

apt-get update
apt-get install bluetooth
apt-get install bluez-utils
apt-get install bluez-tools


This should set you up for when you get a dongle and speaker.
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by castalla » Sun Feb 24, 2013 11:34 pm
Be sure to read through all the openelec threads - seems there are quite a few gotchas ...

Also check this when you actually try to set things up:

http://openelec.tv/forum/68-audio/56487 ... sedq#56603

Having read through all this - I'd ask myself whether it's really worth all this bother :lol: :lol: :lol:
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by AcidOverride » Mon Feb 25, 2013 9:13 am
Wow, most of that went straight over my head haha. Good info and is prob something I'll look into but I think your right, is it worth it?! Might just get a DLNA speaker and use a separate app to control it. Still gonna look further into this BT thing though, just out of interest ha!
Posts: 8
Joined: Fri Feb 22, 2013 10:07 am
Location: UK
by castalla » Mon Feb 25, 2013 9:32 am
AcidOverride wrote:Wow, most of that went straight over my head haha. Good info and is prob something I'll look into but I think your right, is it worth it?! Might just get a DLNA speaker and use a separate app to control it. Still gonna look further into this BT thing though, just out of interest ha!


What would really put me off is the warning that the bt speaker must be on before you start xbmc - sort of defeats the purpose of a portable battery driven device, because it's a dead cert that sometimes you'd forget to switch the thing on, and xbmc will throw a major fit!
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by AcidOverride » Mon Feb 25, 2013 1:49 pm
castalla wrote:
AcidOverride wrote:Wow, most of that went straight over my head haha. Good info and is prob something I'll look into but I think your right, is it worth it?! Might just get a DLNA speaker and use a separate app to control it. Still gonna look further into this BT thing though, just out of interest ha!


What would really put me off is the warning that the bt speaker must be on before you start xbmc - sort of defeats the purpose of a portable battery driven device, because it's a dead cert that sometimes you'd forget to switch the thing on, and xbmc will throw a major fit!


I know what you mean mate, might be fun playin about with something like this up until the point it doesnt go as you want it to and end up throwing something at the wall haha. Just watched a lil demo on a Sony DLNA speaker and that seems to work lovely just by using a DLNA app! Might be the easier option, not exactly cheap though ha.
Posts: 8
Joined: Fri Feb 22, 2013 10:07 am
Location: UK
by castalla » Mon Feb 25, 2013 2:38 pm
I just got the Soundwave Sw100 from Amazon this morning.

Reasonable sound - not as good as the Logitech - and another swine to actually set up on Linux. I'm still not sure it'll autopair ... listening to R4 at the moment and don't want to mess about.

I'll have a look at dlna speakers ...
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by AcidOverride » Mon Feb 25, 2013 2:54 pm
castalla wrote:I just got the Soundwave Sw100 from Amazon this morning.

Reasonable sound - not as good as the Logitech - and another swine to actually set up on Linux. I'm still not sure it'll autopair ... listening to R4 at the moment and don't want to mess about.

I'll have a look at dlna speakers ...


And what have you paired the SW100 with? Mobile device?

Them DLNA Speakers are quite expensive but seem to work really really well! Check out the Sony SANS410
Posts: 8
Joined: Fri Feb 22, 2013 10:07 am
Location: UK
by castalla » Mon Feb 25, 2013 3:12 pm
I paired it with a Cubieboard PC running debian (similar to the Raspi). Using it to play via the Squeezelite player.

It showed the same pairing problems as the Logitech did with my bt dongle (the usual commands just report Authorization Failure - you have to mess around with a combination of bluez commands to get it working - it's all a bit hit'n'miss!).

The dlna speaker looks good - but pricey, as you say.
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm
by satty » Wed Feb 27, 2013 9:40 am
Hi Castalla,

I have been following your posts regarding connecting bt dongle to Logitech miniboombox since I am trying to do the same in Raspbmc. However I have not been able to hear any sound. I did try your method and the openelec tutorial to connect. I can scan, pair and connect but do not know how to route the audio to bluetooth dongle instead of analog output.

The pactl list sinks/sources short commands do not return the bluez.source/sink. I have changed the asound.conf and audio.conf. However I think asound.conf is for configuring ALSA driver? Raspbmc log shows COMXPlayer when I play any music. Raspbmc does not support aplay so I cannot test using your method and the openelec uses XBMC settings to set audio output. In Raspbmc I cannot find any such setting.

Bluetooth adapter: Bus 001 Device 005: ID 1131:1001 Integrated System Solution Corp. KY-BT100 Bluetooth Adapter
Bluetooth speaker: Logitech mini Boombox

Did ask question in Raspbmc and several other forums but have not received any answers so far.
http://forum.stmlabs.com/showthread.php?tid=6779

Any help or guidance is highly appreciated.
Posts: 7
Joined: Wed Feb 27, 2013 9:21 am
by castalla » Wed Feb 27, 2013 11:59 am
Sorry - I've no idea how to use the audio settings in xbmc (or pulseaudio, if that's what it uses!).

I think your best bet is to pester on the Raspbmc forum ...

Have you tried:

aplay -L and aplay -l in the raspbmc terminal?
Posts: 519
Joined: Thu Jul 19, 2012 3:46 pm