Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

[SOLVED] bluetooth connection fails with BT speakers

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

[SOLVED] bluetooth connection fails with BT speakers

  • Quote

Post by VinzC » Sat Sep 09, 2017 12:43 pm

Hi again.

TL;DR : The issue was within my Radius Speaker. [post=8115886]Some devices cannot be paired with multiple operating systems[/post] from the same bluetooth MAC address, which is the case with multi-boot between Windows and Linux... or when the operating system was replaced, which is true in my case.

All in all I only had to remove the paired device and set pairing again, then connect succeeded.

____________


FTR I'm running Gentoo on my laptop without systemd nor pulseaudio. I have a Blutooth Radius speaker, which I'd like to use to stream audio to. Since I don't have pulseaudio I have installed bluez-alsa.

When I try to connect my laptop with Bluetooth to my Radius speaker I get the following error:

Code: Select all

blueman.bluez.errors.DBusFailedError: Resource temporarily unavailable...
Before that, I was getting a protocol error, this one goes a little bit further but still fails.

If I try to connect to the speaker with bluetoothctl (under root account, just to be sure), here's what I have:

Code: Select all

finn ~ # bluetoothctl
[NEW] Controller 24:FD:52:2F:ED:C4 Finn [default]
[NEW] Device FC:58:FA:52:1E:AA Radius Speaker
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# devices
Device FC:58:FA:52:1E:AA Radius Speaker
[bluetooth]# connect FC:58:FA:52:1E:AA
Attempting to connect to FC:58:FA:52:1E:AA
Failed to connect: org.bluez.Error.Failed
[bluetooth]# connect FC:58:FA:52:1E:AA
Attempting to connect to FC:58:FA:52:1E:AA
[CHG] Device FC:58:FA:52:1E:AA Connected: yes
Failed to connect: org.bluez.Error.Failed
[CHG] Device FC:58:FA:52:1E:AA Connected: no
[CHG] Controller 24:FD:52:2F:ED:C4 Discoverable: yes
[CHG] Controller 24:FD:52:2F:ED:C4 DiscoverableTimeout: 0x00003c
[CHG] Device FC:58:FA:52:1E:AA Connected: yes
[CHG] Device FC:58:FA:52:1E:AA Connected: no
[CHG] Controller 24:FD:52:2F:ED:C4 Discoverable: no
At this stage I powered off the speaker.

I don't know what to do, I just know that when I had Arch installed all of this was working so I guess I just overlooked something. I'm not sure whether I should load some firmware, if that's a problem with a kernel module... On the other hand I've successfully paired my laptop with my Android phone and exchanged files both ways so at least the BT stack is working properly, at least for the most part, I guess. Can anyone help me nail down this issue?

For the record, here's an example of what I can see in the logs.

Code: Select all

Sep  9 14:01:53 finn bluetoothd[24347]: Unable to get connect data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
Sep  9 14:01:53 finn bluetoothd[24347]: connect error: Connection refused (111)
Sep  9 14:01:53 finn bluetoothd[24347]: GLib: Source ID 751 was not found when attempting to remove it
Sep  9 14:01:56 finn bluetoothd[24347]: connect error: Connection refused (111)
Sep  9 14:02:10 finn bluetoothd[24347]: Unable to get connect data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
Sep  9 14:02:10 finn bluetoothd[24347]: connect error: Connection refused (111)
Sep  9 14:02:10 finn bluetoothd[24347]: GLib: Source ID 813 was not found when attempting to remove it
Sep  9 14:02:12 finn bluetoothd[24347]: connect error: Too many levels of symbolic links (40)
Sep  9 14:07:24 finn bluetoothd[24347]: Endpoint unregistered: sender=:1.194 path=/MediaEndpoint/A2DP_MPEG24_Source
Sep  9 14:07:24 finn bluetoothd[24347]: Endpoint unregistered: sender=:1.194 path=/MediaEndpoint/A2DPSource
Sep  9 14:07:24 finn bluetoothd[24347]: Endpoint unregistered: sender=:1.194 path=/MediaEndpoint/A2DP_MPEG24_Sink
Sep  9 14:07:24 finn bluetoothd[24347]: Endpoint unregistered: sender=:1.194 path=/MediaEndpoint/A2DPSink
Sep  9 14:07:24 finn bluetoothd[24347]: Terminating
Sep  9 14:07:24 finn bluetoothd[24347]: GLib: Source ID 879 was not found when attempting to remove it
Sep  9 14:07:24 finn bluetoothd[24347]: Stopping SDP server
Sep  9 14:07:24 finn bluetoothd[24347]: Exit
Here's the log when I try to connect to my phone audio sink:

Code: Select all

Sep  9 17:49:51 finn bluetoothd[3705]: Can't open input device: No such file or directory (2)
Sep  9 17:49:51 finn bluetoothd[3705]: AVRCP: failed to init uinput for F4:F1:E1:D9:AD:04
Sep  9 17:49:56 finn bluetoothd[3705]: Unable to get io data for Hands-Free unit: getpeername: Transport endpoint is not connected (107)
Sep  9 17:50:01 finn CROND[6668]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons)
Sep  9 17:50:02 finn bluetoothd[3705]: Unable to get io data for Hands-Free unit: getpeername: Transport endpoint is not connected (107)
Many thanks in advance.
Last edited by VinzC on Sat Sep 09, 2017 6:42 pm, edited 4 times in total.
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Sat Sep 09, 2017 3:17 pm

Hello,

maybe bluez-alsa do not allow you to manage Bluetooth audio devices like Pulseaudio do.

One thing you can try is to put a normal user to the lp group. If you read the file /etc/dbus-1/system.d/bluetooth.conf you will see that Dbus only allow the access to the Bluetooth sybsystem to users who are in the lp group.

After that, close your user sessions and open a new graphical one or maybe just from a Linux terminal out of X. Try to connect to your Radius speakers with this user using Blueman or bluetoothctl. I always manage Bluetooth as normal user.
Paul
Top
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

  • Quote

Post by VinzC » Sat Sep 09, 2017 3:42 pm

Hello Logicien.

I did indeed try to connect to my BT speaker using my normal account, which is part of groups lp and plugdev. I still have those error messages. And as far as I've read bluez-alsa is just a proxy to bluetooth audio. Here's how my bluetooth configuration file looks like from system DBUS.

Code: Select all

<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent1"/>
    <allow send_interface="org.bluez.HandsfreeAgent1"/>
    <allow send_interface="org.bluez.MediaEndpoint1"/>
    <allow send_interface="org.bluez.MediaPlayer1"/>
    <allow send_interface="org.bluez.Watcher1"/>
    <allow send_interface="org.bluez.ThermometerWatcher1"/>
    <allow send_interface="org.bluez.AlertAgent1"/>
    <allow send_interface="org.bluez.Profile1"/>
    <allow send_interface="org.bluez.HeartRateWatcher1"/>
    <allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
    <allow send_interface="org.bluez.GattCharacteristic1"/>
    <allow send_interface="org.bluez.GattDescriptor1"/>
    <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
    <allow send_interface="org.freedesktop.DBus.Properties"/>

    <!-- These lines come from https://bbs.archlinux.org/viewtopic.php?id=166678&p=2 -->
    <allow send_destination="org.bluez.Manager"/>
    <allow receive_sender="org.bluez.Manager"/>
    <allow send_destination="org.bluez.Adapter"/>
    <allow receive_sender="org.bluez.Adapter"/>
    <allow send_destination="org.bluez.Device"/>
    <allow receive_sender="org.bluez.Device"/>
    <allow send_destination="org.bluez.Service"/>
    <allow receive_sender="org.bluez.Service"/>
    <allow send_destination="org.bluez.Database"/>
    <allow receive_sender="org.bluez.Database"/>
    <allow send_destination="org.bluez.Security"/>
    <allow receive_sender="org.bluez.Security"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy group="plugdev">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>
Just note that keywords here have "1" as a suffix and I don't know if that's intended or if it's a mistake. The prefix was there before I edited the file.

EDIT: I'm making a small progress! It turns out module uinput was *not* loaded automatically — I have no idea if/how it can be though. At least when I load module uinput I only have these errors:

Code: Select all

Sep  9 18:02:05 finn bluetoothd[3705]: Unable to get io data for Hands-Free unit: getpeername: Transport endpoint is not connected (107)
Sep  9 18:02:09 finn kernel: [10861.260187] input: F4:F1:E1:D9:AD:04 as /devices/virtual/input/input20
Sep  9 18:02:18 finn bluetoothd[3705]: Unable to get io data for Hands-Free unit: getpeername: Transport endpoint is not connected (107)
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Top
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

  • Quote

Post by VinzC » Sat Sep 09, 2017 5:50 pm

At least I can play sound coming from my android phone. This means audio sink is working.

So far then only sourcing remains problematic. To be continued...
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Top
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

  • Quote

Post by VinzC » Sat Sep 09, 2017 6:27 pm

OMG 8O ! Does it work!?

I found in Arch wiki that some devices don't support being paired from multiple operating systems... which is the case with my laptop: it once was installed with Arch/Manjaro then I wiped it and installed Gentoo, now.

I'm now getting errors trying to play audio files through A2DP using my BT speaker. Closing in...

EDIT: No longer getting errors but only noise on my BT speaker...

EDIT: I'm not getting noise with *.wav files so... IT WORKS! :D

Case closed.
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Top
Post Reply

5 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic