2

I have purchased a Raspi v2 and have installed openelec 5.0.5 on it, since I want to use it as a media center. I have a wifi dongle, which works fine even while using airplay.

I have recently purchase a bluetooth dongle for it, but I am not able to configure it. I want to know how do I install the drivers for it. Also, once the bluetooth starts working, then I would like to use it to play my songs from my mobile phone to the openelec console, just like how we play it in airplay. So is there any such plug-in to do so ? Or is there any settings/ feature of Kodi I am not aware of?

  • What's the bluetooth dongle you are using? – Darth Vader May 26 '15 at 9:08
  • Its a Enter Mini USB Bluetooth 2.0. If the bluetooth is the issue then I have no problem in replacing it with a new one. My bluetooth is a really old one, may be some 3-4 yrs. Also please let me know what model should I go for. – dannydsouza0908 May 27 '15 at 4:32
  • I suggest going with ThePihut's V2.0 Nano USB to Bluetooth dongle and this website gives details of installing it: modmypi.com/blog/… Although you can get models that do wifi as well as bluetooth – Darth Vader May 27 '15 at 8:36
  • Instead of purchasing a Raspi-Pi 2, WiFi dongle and Bluetooth dongle you should have just got a v3. – Andy Anderson Jan 17 '18 at 22:12
1

What you need to do is set up your Pi for 'A2DB sink mode'. I found the follwing instructions on this page:

Start by install / updating all the packages

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install pulseaudio-module-bluetooth bluez-tools

Add users to groups. This is very important. If using any other distro, replace ‘xbian’ with your username.

sudo gpasswd -a xbian pulse
sudo gpasswd -a xbian lp
sudo gpasswd -a pulse lp
sudo gpasswd -a xbian audio
sudo gpasswd -a pulse audio

Set up PulseAudio, Bluetooth Device Class

sudo sh -c "echo 'extra-arguments = --exit-idle-time=-1 --log-target=syslog' >> /etc/pulse/client.conf"
sudo hciconfig hci0 up
sudo hciconfig hci0 class 0x200420
sudo reboot

Note: The Bluetooth service/device class 0x200420 mean the device is set up for Car Audio. See this link to explore more Bluetooth Class options.

To pair with a device, we will need to use the “bluetoothctl” tool.

sudo bluetoothctl

Set the agent to KeyboardOnly and make it default. This needs to be done once only. Inside bluetoothctl, run the following commands: agent KeyboardOnly

default-agent

Turn on bluetooth on your phone/tablet and make sure it is discoverable. Run the following commands inside bluetoothctl:

scan on
pair xx:xx:xx:...
trust xx:xx:xx:...
exit

Note: xx:xx:xx:.. is the MAC address of your handset/device. After running ‘scan on’, wait a minute for your device to show up along with it’s MAC address. After running ‘pair xx:xx:xx:..’ check your device and accept the incoming connection. Do the same on terminal by typing yes.

Now connect to the Raspberry Pi from your handset and it should connect as an audio device. All audio played through the device should now be output using Raspberry Pi’s HDMI or Analog out depending on your Pi’s configuration.

If the connection fails, try again, sometimes it takes 2 attempts.

  • Nice but the OP is using OpenElec, which is really specific, compared to raspbian – JB. Dec 9 '18 at 19:54
  • @JB I've used OpenElec, it uses apt / is based on Debian... the configuration should be the same as long as a blue tooth module is installed. FTA: "Other compatible bluetooth modules should work as well." – virtualxtc Dec 11 '18 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.