dgk
Posts: 11
Joined: Thu Mar 01, 2018 5:28 am

How to connect bluetooth headset?

Wed May 16, 2018 12:57 am

I have tried connect my bluetooth headset with 2018-04-18-raspbian-stretch-lite, but failed. Here is what I did:

1. sudo bluetoothctl
[bluetooth]pair 00:16:85:01:2A:8D BH02
......
[bluetooth]# paired-devices
Device 00:16:85:01:2A:8D BH02
........

2. after pair successed, when I did this:
pulseaudio --start
E: [pulseaudio] main.c: Daemon startup failed.
I got lost.

Anyone can help?

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

Re: How to connect bluetooth headset?

Wed May 16, 2018 1:08 am

PulseAudio was used by previous versions of Raspbian, but was never pre-installed. The current recommended approach uses BlueALSA, but that is not included in the Lite version, I believe. So install BlueALSA, and find a recent tutorial for using Bluetooth audio streaming on a Pi.

Note that you can use the one-way A2DP profile, if your headset supports it, but two-way (speaker and microphone) HSP/HFP is much more complicated (if possible).

dgk
Posts: 11
Joined: Thu Mar 01, 2018 5:28 am

Re: How to connect bluetooth headset?

Wed May 16, 2018 1:20 am

thanks Douglas6! I'll try

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

Re: How to connect bluetooth headset?

Wed May 16, 2018 1:35 am

There isn't much out there for using Bluetooth audio streaming from the command line. Basically, install BlueALSA, pair (once) and connect using bluetoothctl, and hopefully your headset will auto-connect subsequently.

Post here if you have questions.

dgk
Posts: 11
Joined: Thu Mar 01, 2018 5:28 am

Re: How to connect bluetooth headset?

Wed May 16, 2018 1:57 am

many thanks, Douglas6!
It worked.
I can play wav file with "aplay":

Code: Select all

sudo aplay -D bluealsa:HCI=hci0,DEV=00:16:85:01:2A:8D,PROFILE=a2dp  start.wav
but when I play a mp3 file, I could only got noise.
I have another question, how to enable bluealsa with omxplayer and Kodi?
could you help me?

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

Re: How to connect bluetooth headset?

Wed May 16, 2018 2:10 am

Aplay doesn't do mp3 files. You could try mpg321 or something else. I think you'll need to set BlueALSA as the default ALSA device.

Omxplayer requires you to use the '-o alsa' option, but you'll need to set BlueALSA as the default device. There are instructions for that on the BlueALSA web page. Kodi I have no idea about, you might visit their web page.

dgk
Posts: 11
Joined: Thu Mar 01, 2018 5:28 am

Re: How to connect bluetooth headset?

Wed May 16, 2018 2:20 am

You are so great Douglas6!!!
I am working follow your instructions.
Last edited by dgk on Wed May 16, 2018 6:42 am, edited 1 time in total.

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

Re: How to connect bluetooth headset?

Wed May 16, 2018 2:32 am

No, I just hang out on this forum. I am, however, insanely available.

dgk
Posts: 11
Joined: Thu Mar 01, 2018 5:28 am

Re: How to connect bluetooth headset?

Wed May 16, 2018 2:38 am

thanks Douglas6!!

Return to “Beginners”

Who is online

Users browsing this forum: markkuk and 47 guests