Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bluetooth Nightmare - No Info, Outdated Wiki
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Sun Mar 30, 2014 3:58 am    Post subject: Bluetooth Nightmare - No Info, Outdated Wiki Reply with quote

Its been now at least 8 years since I tried to get anything bluetooth related to work on a Linux machine, and yet once again it crumbled apart and failed. I got this awesome bluetooth headset; I opened the box and turned on my android cellphone, who recognized immediately, paired and boom, started playing songs. After 2h on my laptop, I still haven't figured this out!! I am trying to use bluedevil. The device is detected sometimes; when it does, I try to pair, without any success. No error message, no feedback, it just doesn't connect. The headset speaks something when someone is trying to pair, but I couldn't hear a thing. In some few rare occasions, I managed to get the device to connect, which lasts for one second or less. It then just disconnects without an error again.

I tried to use commandline applications, but the information on Gentoo wiki (http://wiki.gentoo.org/wiki/Bluetooth) is outdated (or at least I couldn't find the packages with those utilities). Also, bluez does not have the test-programs option anymore.

Could anyone point me out to an uptodate guide and/or alternatives to bluedevil that possibly work out of the box? Thanks in advance!
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)


Last edited by Holysword on Tue Apr 08, 2014 12:13 am; edited 1 time in total
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Sun Mar 30, 2014 4:30 pm    Post subject: Re: Bluetooth Nightmare Reply with quote

Just tried to follow ArchWiki's guide (https://wiki.archlinux.org/index.php/bluetooth) and this time at least I got some commandline output:

Code:
◢ jarvis ◣ ~ $  bluetoothctl
[NEW] Controller 68:17:29:62:66:04 %h-BlueZ [default]
[NEW] Device B4:67:E9:F2:55:8B S11-FLEX HD
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# devices
Device B4:67:E9:F2:55:8B S11-FLEX HD
[bluetooth]# agent on
Agent registered
[bluetooth]# pair B4:67:E9:F2:55:8B
Attempting to pair with B4:67:E9:F2:55:8B
Failed to pair: org.bluez.Error.AlreadyExists
[CHG] Device B4:67:E9:F2:55:8B Connected: yes
[CHG] Device B4:67:E9:F2:55:8B Connected: no
[CHG] Device B4:67:E9:F2:55:8B Connected: yes
[CHG] Device B4:67:E9:F2:55:8B Connected: no
[CHG] Device B4:67:E9:F2:55:8B Connected: yes
[CHG] Device B4:67:E9:F2:55:8B Connected: no
[CHG] Device B4:67:E9:F2:55:8B Connected: yes
[CHG] Device B4:67:E9:F2:55:8B Connected: no
[bluetooth]#


It keeps changing from "connected:yes" to "no" randomly, even after I restart the bluetooth daemon and/or turn on/off the device itself. Any ideas?
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Tue Apr 08, 2014 12:13 am    Post subject: Re: Bluetooth Nightmare Reply with quote

Seriously guys... the Gentoo Wiki on Bluetooth is massively outdated. Installing Bluez doesn't give me half of the commands that are used there and I can't find where are these commands. Am I forced to use an overlay to try bluetooth on Gentoo?
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Tue Apr 08, 2014 12:25 am    Post subject: Reply with quote

According to your bluetoothctl output, you need to execute
Code:
pairable on
default-agent

before to try to pair. The device B4:67:E9:F2:55:8B is already pair
Code:
Failed to pair: org.bluez.Error.AlreadyExists

Check with
Code:
paired-devices

If you want to pair it again, do
Code:
remove B4:67:E9:F2:55:8B

and then do
Code:
pair B4:67:E9:F2:55:8B

Sometimes use the remote device to pair have better result. The bluetoothctl agent prompt you accept the pincode use by the remote device. The help command of bluetoothctl give you minimal information.
_________________
Paul


Last edited by Logicien on Tue Apr 08, 2014 12:34 am; edited 4 times in total
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Tue Apr 08, 2014 12:26 am    Post subject: Reply with quote

moral of the story, mask bluez 5 & emerge blueman. never trust a wiki ive not worked on.
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Tue Apr 08, 2014 12:36 am    Post subject: Reply with quote

Logicien wrote:
According to your bluetoothctl output, you need to execute
Code:
pairable on
default-agent

before to try to pair. The device B4:67:E9:F2:55:8B is already pair
Code:
Failed to pair: org.bluez.Error.AlreadyExists

Check with
Code:
paired-devices

If you want to pair it again, do
Code:
remove B4:67:E9:F2:55:8B

and then do
Code:
pair B4:67:E9:F2:55:8B

Sometimes use the remote device to pair have better result. The bluetoothctl agent prompt you accept the pincode use by the remote device. The help command of bluetoothctl give you minimal information.

Well, that's after using hciconfig hci0 up, right?
But then
Code:

[bluetooth]# pairable on
No default controller available
[bluetooth]# default-agent
No agent is registered
[bluetooth]#




666threesixes666 wrote:
moral of the story, mask bluez 5 & emerge blueman. never trust a wiki ive not worked on.

And can you kindly point me out to a working wiki using blueman?
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Tue Apr 08, 2014 12:43 am    Post subject: Reply with quote

Holysword wrote:
Well, that's after using hciconfig hci0 up, right?
But then
Code:

[bluetooth]# pairable on
No default controller available
[bluetooth]# default-agent
No agent is registered
[bluetooth]#


Sorry, now I managed to get it to the previous state. This is what I get:
Code:
[bluetooth]# pair B4:67:E9:F2:55:8B
Device B4:67:E9:F2:55:8B not available
[NEW] Device B4:67:E9:F2:55:8B S11-FLEX HD
[CHG] Device B4:67:E9:F2:55:8B Connected: no
[DEL] Device B4:67:E9:F2:55:8B S11-FLEX HD
[NEW] Device B4:67:E9:F2:55:8B S11-FLEX HD
[CHG] Device B4:67:E9:F2:55:8B Connected: no
[DEL] Device B4:67:E9:F2:55:8B S11-FLEX HD
[NEW] Device B4:67:E9:F2:55:8B S11-FLEX HD
[CHG] Device B4:67:E9:F2:55:8B Connected: no
[DEL] Device B4:67:E9:F2:55:8B S11-FLEX HD
[bluetooth]# discoverable yes
Changing discoverable on succeeded
[NEW] Device B4:67:E9:F2:55:8B S11-FLEX HD
[bluetooth]# connect B4:67:E9:F2:55:8B
Attempting to connect to B4:67:E9:F2:55:8B
[CHG] Device B4:67:E9:F2:55:8B UUIDs has unsupported type
Failed to connect: org.bluez.Error.Failed
[CHG] Device B4:67:E9:F2:55:8B Connected: no
[bluetooth]# pair B4:67:E9:F2:55:8B
Attempting to pair with B4:67:E9:F2:55:8B
[CHG] Device B4:67:E9:F2:55:8B Connected: yes
Pairing successful
[CHG] Device B4:67:E9:F2:55:8B Connected: no
[bluetooth]# connect B4:67:E9:F2:55:8B
Attempting to connect to B4:67:E9:F2:55:8B
Failed to connect: org.bluez.Error.Failed
[bluetooth]# pair B4:67:E9:F2:55:8B
Attempting to pair with B4:67:E9:F2:55:8B
Failed to pair: org.bluez.Error.AlreadyExists
[bluetooth]# pair B4:67:E9:F2:55:8B
[bluetooth]# pair
Missing device address argument
[bluetooth]# paired-devices
[bluetooth]# pair B4:67:E9:F2:55:8B
Attempting to pair with B4:67:E9:F2:55:8B
Failed to pair: org.bluez.Error.AlreadyExists
[bluetooth]#

_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Fri Apr 18, 2014 11:04 pm    Post subject: Reply with quote

I have heard from someone in bluez IRC channel that headsets are only supposed to work with pulseaudio, and that bluez-5 does not support ALSA.

Now, excuse me the direct approach here: why would you support ONLY something which is BROKEN for years? I have tried (sincerely) to get pulseaudio to work on several machines, without the slightest success. Either my mic doesn't work, or the audio skips, or some specific applications (something running under wine, for instance) does not work, or the CPU consumption is just absurd, or pulseaudio decides that its a good idea to downsample everything to the worst samplerate possible and I can't seem to find a way to tell it to stop being so intrusive. I wouldn't be so strongly against pulseaudio if it had any noticeable feature, but the main selling point of pulseaudio is "it works out of the box", which it DOESN'T - therefore, it is as of now a failure of a project! ALSA works out of the box, completely, and I have ever had to mess with alsa.conf if I have multiple boards or something like that.

But okay, just to be fair, I decided to try again pulseaudio, perhaps I was being unfair. I wasn't. Skype fails to use pulseaudio both for input or output, it redirects my playback as input (monitor, I guess?) in several applications, audacious is smarter and works alright, but after a few minutes the speakers start making a noise which does not seem to be associated with audacious whatsoever and only killing pulseaudio solves the problem. But... perhaps the headset works now?

Absolutely not. It pairs but does not connect (returns a generic error without any information) and pavucontrol does not show anything there. There is no sign of an option to redirect audio to the headset, and neither bluetoothctl nor pulseaudio tell anything about it.

So no, I will exorcise this thing from my machine again, hopefully for the last time. Any chance to get this thing working without pulseaudio? I considered downgrading it to bluez-4, but then it gives me several conflicts.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sat Apr 19, 2014 1:11 am    Post subject: Reply with quote

Bluez 5 may not support Alsa, but Pulseaudio support Alsa and Bluetooth. So here, Pulseaudio is some kind of middleware between Bluez 5 and Alsa, thank's to the fact that Alsa can support Pulseaudio.

My headsets have been working with Bluez 4, the only drawback was that the data transfert between the Linux source Debian/Gentoo and the headsets slow sometimes. Now I use a non bluetooth wireless headsets. It's more stable. Both have to sink with the computer source.

What I did, was to change the /etc/pulse/default.pa file to make Pulseaudio detect a wireless link between my bluetooth device and the headsets. Than I was able to use the bluetooth headsets using Pulseaudio. My source here is a search on the Internet.

For that to work, obviously, the bluetooth device of Gentoo and the headsets must be paired, first and before or after. You may have to try both pairing times to make it work.

With Bluez 4, I was able to use audio bluetooth without Pulsaudio, with only Alsa. With Bluez 5, it seem's to not be possible. Pulseaudio is the main and maybe the only interface with the Bluez 5 audio stack at least, for the moment.
_________________
Paul
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Mon Apr 28, 2014 1:12 am    Post subject: Reply with quote

I succeed to pair and use my Bluetooth headsets with Bluez 5 and bluetoothctl. Pulseaudio do not need any specific configuration to detect the headsets and make it available as an output device. If Alsa and multimedia programs are set to use Pulseaudio, it work, but I have to set the headsets as the output device with pavucontrol.

I have some feelings that the speed of the music is moving up and down slowly randomly. Is it the quality of the material and/or the bluetooth stack, this is a question I have to make clear.
_________________
Paul
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Tue Apr 29, 2014 3:56 am    Post subject: Reply with quote

Logicien wrote:
I succeed to pair and use my Bluetooth headsets with Bluez 5 and bluetoothctl. Pulseaudio do not need any specific configuration to detect the headsets and make it available as an output device. If Alsa and multimedia programs are set to use Pulseaudio, it work, but I have to set the headsets as the output device with pavucontrol.

I have some feelings that the speed of the music is moving up and down slowly randomly. Is it the quality of the material and/or the bluetooth stack, this is a question I have to make clear.

I have never managed to have success with Pulseaudio in any aspect. I installed recently and it simply didn't work. I am not even working with a fancy configuration at this point, this is just a regular installation with an onboard audio card, only one onboard card!!!. I'd rather buy a bluetooth transmitter to plug to the output of my laptop than trying Pulseaudio again - I have learned the lesson already. But thanks for your suggestion.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum