LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   What is the problem with Bluetooth ? (https://www.linuxquestions.org/questions/debian-26/what-is-the-problem-with-bluetooth-4175679133/)

joboy 07-21-2020 08:00 PM

What is the problem with Bluetooth ?
 
I used Debian for many years, but still have problem connecting Bluetooth, no matter simple as connecting a Bluetooth speaker it won't work properly, it won't auto connect every time and will disconnect in the middle, what is missing here ?

berndbausch 07-22-2020 06:58 AM

Do the kernel messages (dmesg command or journalctl command) contain anything? There might be other log files that contain Bluetooth-relevant messages.

ondoho 07-22-2020 07:01 AM

Do you use pulseaudio?
I think with bluetooth audio, pulseaudio is almost a requirement.

joboy 07-23-2020 05:40 AM

Quote:

Originally Posted by berndbausch (Post 6147963)
Do the kernel messages (dmesg command or journalctl command) contain anything? There might be other log files that contain Bluetooth-relevant messages.


What do I looking for ?

joboy 07-23-2020 05:43 AM

Quote:

Originally Posted by ondoho (Post 6147964)
Do you use pulseaudio?
I think with bluetooth audio, pulseaudio is almost a requirement.


Pulseadio and the Pulseaudio bluetooth module already installed by default, bluetooth sound is working but it won't auto connect most of the time, for example my BT speaker always need manual connect, but it does connect upon boot in some case. I always feel that BT is unstable even on cell phone, my handsfree set randomly disconnect, or gives no sound even connected.

berndbausch 07-23-2020 07:15 AM

Quote:

Originally Posted by joboy (Post 6148376)
What do I looking for ?

To be honest, I don't know. Personally, I would look for messages that contain strings like bluetooth or bt. I would also use lspci -k to list all devices and their kernel modules, and use the name of the bluetooth module to go through messages.

If there are no kernel messages, I would look for logs of the services that manage bluetooth devices, and audio services. Admittedly I don't know what these services are, so I would have to find that out first, then use journalctl -u SERVICENAME to find messages, or check /var/log/syslog.

cordx 07-23-2020 07:33 AM

when i was troubleshooting a bluetooth connection a few weeks ago, i used journalctl -f to follow what what happening as i was pairing and making the connection. that command opens the last few lines of the system journal and then follows what is added in almost real time. this will possibly show you the error messages that berndbausch mentioned so hopefully you won't need to sift through logs to find them. in my case while the majority of the bluetooth modules loaded, but two did not. correcting that gave me a stable and continued connection.

another option is to try and connect using bluetoothctl to see if that shows any errors as it tries to establish the connection. i used a combination of both.

joboy 07-24-2020 07:57 PM

Quote:

Originally Posted by cordx (Post 6148401)
when i was troubleshooting a bluetooth connection a few weeks ago, i used journalctl -f to follow what what happening as i was pairing and making the connection. that command opens the last few lines of the system journal and then follows what is added in almost real time. this will possibly show you the error messages that berndbausch mentioned so hopefully you won't need to sift through logs to find them. in my case while the majority of the bluetooth modules loaded, but two did not. correcting that gave me a stable and continued connection.

another option is to try and connect using bluetoothctl to see if that shows any errors as it tries to establish the connection. i used a combination of both.


When I issue the command bluetoothctl I got this and connected to the bluetooth speaker :



==========================================

XXXXXX@lmde:~$ bluetoothctl
Agent registered
==========================================


And follow by :



==========================================

[CHG] Device FC:58:FA:0F:C2:05 Connected: yes
[CHG] Device FC:58:FA:0F:C2:05 ServicesResolved: yes
==========================================



If I disconnect the speaker via GUI and exit then repeat the command it connects again, that seems to work very reliably wonder if I can put this in the startup ?

joboy 07-24-2020 08:37 PM

Quote:

Originally Posted by joboy (Post 6149044)
When I issue the command bluetoothctl I got this and connected to the bluetooth speaker :



==========================================

XXXXXX@lmde:~$ bluetoothctl
Agent registered
==========================================


And follow by :



==========================================

[CHG] Device FC:58:FA:0F:C2:05 Connected: yes
[CHG] Device FC:58:FA:0F:C2:05 ServicesResolved: yes
==========================================



If I disconnect the speaker via GUI and exit then repeat the command it connects again, that seems to work very reliably wonder if I can put this in the startup ?


No that didn't work, I tried again after I posted this and failed to connect !

cordx 07-25-2020 12:09 AM

this was similar to my experience. i could pair and trust, but connect wouldn't always work or stay connected. opening a second terminal with journalctl -f (before starting bluetooth or the connection process) was how i discovered the error that lead me to being able to activate the modules which were keeping mine from maintaining its connection.

my error looked about like this:
Jul 05 18:28:13 hostname bluetoothd[5290]: a2dp-source profile connect failed for aa:bb:cc:dd:ee:ff: Protocol not available


All times are GMT -5. The time now is 09:00 PM.