User avatar
Taxicletter
Posts: 218
Joined: Sat Mar 05, 2016 4:25 pm
Location: Antwerp, Belgium
Contact: Website

Bluetooth

Sat Mar 12, 2016 12:00 am

Hi,

Today I started testing the Bluetooth functionality of my Raspberry Pi 3.
I installed the obvious-looking packages for Bluetooth connectivity and management.

My phone (a FairPhone, you should look it up, very interesting project) was recognized, although pairing didn't succeed for the moment.
My Bose Soundlink, somehow stays invisible.

I kept downloading Bluetooth related packages and rebooting, but somehow I can't connect my Bluetooth speaker. Any ideas on what I could try next?

J
--::--::- 3 x Raspberry Pi 3 - Raspbian Lite 9 - RuneAudio - one broke (wifi) - not in use -::--::--

User avatar
DougieLawson
Posts: 36505
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Bluetooth

Sat Mar 12, 2016 9:06 am

I got it working with blueman and the blueman-applet on the desktop.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
Laurens-wuyts
Posts: 716
Joined: Wed Aug 21, 2013 7:35 pm
Location: Belgium
Contact: Website

Re: Bluetooth

Sat Mar 12, 2016 10:09 am

Have you tried bluetoothctl in the command line? It works for me.

Code: Select all

sudo bluetoothctl
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller XX:XX:XX:XX:XX:XX Discovering: yes
[NEW] Device aa:aa:aa:aa:aa:aa OnePlus One
[bluetooth]# pair aa:aa:aa:aa:aa:aa
Attempting to pair with aa:aa:aa:aa:aa:aa
[CHG] Device aa:aa:aa:aa:aa:aa Connected: yes
Request confirmation
[agent] Confirm passkey xxxxxx(yes/no): yes
[CHG] Device aa:aa:aa:aa:aa:aa Modalias: bluetooth:v001Dp1200d1436
[CHG] Device aa:aa:aa:aa:aa:aa UUIDs:
        00001105-0000-1000-8000-00805f9b34fb
        00001106-0000-1000-8000-00805f9b34fb
        0000110a-0000-1000-8000-00805f9b34fb
        0000110c-0000-1000-8000-00805f9b34fb
        0000110e-0000-1000-8000-00805f9b34fb
        00001112-0000-1000-8000-00805f9b34fb
        00001116-0000-1000-8000-00805f9b34fb
        0000111f-0000-1000-8000-00805f9b34fb
        0000112f-0000-1000-8000-00805f9b34fb
        00001132-0000-1000-8000-00805f9b34fb
        00001200-0000-1000-8000-00805f9b34fb
        00001800-0000-1000-8000-00805f9b34fb
        00001801-0000-1000-8000-00805f9b34fb
        8ce255c0-200a-11e0-ac64-0800200c9a66
[CHG] Device aa:aa:aa:aa:aa:aa Paired: yes
Pairing successful
[CHG] Device aa:aa:aa:aa:aa:aa Connected: no
[bluetooth]# trust aa:aa:aa:aa:aa:aa
[CHG] Device aa:aa:aa:aa:aa:aa Trusted: yes
Changing aa:aa:aa:aa:aa:aa trust succeeded
[bluetooth]# connect aa:aa:aa:aa:aa:aa
Attempting to connect to aa:aa:aa:aa:aa:aa
[CHG] Device aa:aa:aa:aa:aa:aa Connected: yes
Connection successful
[bluetooth]# scan off
[CHG] Device aa:aa:aa:aa:aa:aa RSSI is nil
[CHG] Controller XX:XX:XX:XX:XX:XX Discovering: no
Discovery stopped
[bluetooth]# exit
Agent unregistered
[DEL] Controller XX:XX:XX:XX:XX:XX raspberrypi [default]
I hope this helps. :)
P.S. I know the fairphone. It's a real good concept. :P

Laurens

User avatar
Taxicletter
Posts: 218
Joined: Sat Mar 05, 2016 4:25 pm
Location: Antwerp, Belgium
Contact: Website

Re: Bluetooth

Sat Mar 12, 2016 10:26 am

Thanks Dougy and Laurens.

I have the Blueman installed, but where should I look for it? I didn't see an applet to install.

I tried the terminal, and it works for scanning (I see my neighbours Nokia :-) ). But it didn't see my Bose Soundlink.
I'll try to clean the Bluetooth connections on the Bose, maybe the problem is there and not in the scanning.

Greetings!
--::--::- 3 x Raspberry Pi 3 - Raspbian Lite 9 - RuneAudio - one broke (wifi) - not in use -::--::--

User avatar
Laurens-wuyts
Posts: 716
Joined: Wed Aug 21, 2013 7:35 pm
Location: Belgium
Contact: Website

Re: Bluetooth

Sat Mar 12, 2016 10:31 am

Doesn't the bose sound link has a bluetooth button?
Press it long till you see/hear something. And try to scan then.
Correct me if I'm wrong, I don't have one. :?

Laurens

User avatar
Taxicletter
Posts: 218
Joined: Sat Mar 05, 2016 4:25 pm
Location: Antwerp, Belgium
Contact: Website

Re: Bluetooth

Sat Mar 12, 2016 4:44 pm

The Soundlink is visible and connectible continuously. Long-pressing resets all paired devices.
I tried to link a UE Bluetooth speaker. At that time, the terminal was scanning for devices.
Audio equipment seems to have a slightly different way of connecting then other stuff...
I'll try again later! And I post the solution if I find one.
--::--::- 3 x Raspberry Pi 3 - Raspbian Lite 9 - RuneAudio - one broke (wifi) - not in use -::--::--

fruitoftheloom
Posts: 21031
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Bluetooth

Sat Mar 12, 2016 4:52 pm

Taxicletter wrote:The Soundlink is visible and connectible continuously. Long-pressing resets all paired devices.
I tried to link a UE Bluetooth speaker. At that time, the terminal was scanning for devices.
Audio equipment seems to have a slightly different way of connecting then other stuff...
I'll try again later! And I post the solution if I find one.
https://wiki.debian.org/BluetoothUser/a2dp
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

User avatar
Taxicletter
Posts: 218
Joined: Sat Mar 05, 2016 4:25 pm
Location: Antwerp, Belgium
Contact: Website

Re: Bluetooth

Mon Mar 14, 2016 8:25 am

I reinstalled Raspbarian on my SC card and this time, the Bose Soundlink showed up without a problem.
I did install the Bleutooth manager and some ALSA and PulseAudio software, I think mostly the same as before, but probably not. I couldn't tell what I did different... (a pitty for future people with the same problem).
I'm glad to have learned the terminal searching way, anyway :-).
--::--::- 3 x Raspberry Pi 3 - Raspbian Lite 9 - RuneAudio - one broke (wifi) - not in use -::--::--

User avatar
Taxicletter
Posts: 218
Joined: Sat Mar 05, 2016 4:25 pm
Location: Antwerp, Belgium
Contact: Website

Re: Bluetooth

Tue Mar 15, 2016 4:54 pm

Alas, sound KEEPS being a problem...

After I posted the message everything worked, it went wrong again. So I followed the advice a got: first I read that PulseAudio could be the problem, so I removed that. That worked, I could here sound through 3.5 socket and HDMI. Then I installed blueman and pulseaudio again, and Bluethooth sound worked (connection was never a problem anymore).
Now I want to use my 3.5 jack and sound is gone again...

Seems like if bluethooth sound works, the rest isn't and vice versa...

WITH PulseAudio I can play through Bluetooth. But then 3.5 jack and HDMI don't work (sudu amixer ... doesn't help with that).

What I don't get is: in the Audio Device Settings, why isn't there a Bluetooth selection? Or the mini-jack and HDMI ports? Wouldn't that be the purpose of such a Audio Setting? Or can I add such Audio Manager? I searched it for ALSA and PulseAudio, but didn't found something like that...
--::--::- 3 x Raspberry Pi 3 - Raspbian Lite 9 - RuneAudio - one broke (wifi) - not in use -::--::--

User avatar
Douglas6
Posts: 4781
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Bluetooth

Tue Mar 15, 2016 6:24 pm

Have you tried pavucontrol?

User avatar
Taxicletter
Posts: 218
Joined: Sat Mar 05, 2016 4:25 pm
Location: Antwerp, Belgium
Contact: Website

Re: Bluetooth

Wed Mar 16, 2016 1:32 pm

Yes, I did

Code: Select all

sudo apt-get install pulseaudio-module-bluetooth pavucontrol bluez-firmware
. I also did

Code: Select all

amixer cset numid=3 0
and

Code: Select all

amixer cset numid=3 1
, because that worked once. I read somewhere to type this:

Code: Select all

sudo modprobe snd_bcm2835
, so I did.

I use a HDMI to DVI connector, could that somehow explain the problem? I don't think so.

In /etc/modules-load.d, there is:

Code: Select all

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

i2c-dev
Is there missing anything?

Code: Select all

aplay -L
gives:

Code: Select all

null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Playback/recording through the PulseAudio sound server
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device
dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device
hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions
--::--::- 3 x Raspberry Pi 3 - Raspbian Lite 9 - RuneAudio - one broke (wifi) - not in use -::--::--

User avatar
Douglas6
Posts: 4781
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Bluetooth

Wed Mar 16, 2016 3:27 pm

Try running pavucontrol. There should be an option to select the default audio device (haven't used it myself).

User avatar
Taxicletter
Posts: 218
Joined: Sat Mar 05, 2016 4:25 pm
Location: Antwerp, Belgium
Contact: Website

Re: Bluetooth

Wed Mar 16, 2016 8:03 pm

Great! Why isn't it in my menu?? I restarted several times since I installed it... I don't understand that menu :-) Evolution isn't there, while I installed it, and in "Programs" there STAYS a program that I deleted in the menu editor, like days ago.

Anyway... Pavucontrol only shows a "dummy-output", there are no hardware devices?!
--::--::- 3 x Raspberry Pi 3 - Raspbian Lite 9 - RuneAudio - one broke (wifi) - not in use -::--::--

Return to “Beginners”