连接到蓝牙但连接失败:未注册音频端点

连接到蓝牙但连接失败:未注册音频端点

我使用 Windows11 双启动 Kali-Linux。所以问题是我想连接我的蓝牙扬声器(JBL GO),但不幸的是我无法连接。我使用 GUI 和 CLI 来连接到我的扬声器。之前工作得很好。我可以在 Windows 中连接,但不能在 Kali 中连接。

这是使用 GUI 的消息: 图形用户界面

这是使用 CLI 的消息:

$ bluetoothctl                                                                                  
Agent registered
[bluetooth]# agent KeyboardOnly
Agent is already registered
[bluetooth]# default-agent 
Default agent request successful
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:15 Discovering: yes
[CHG] Device 30:C0:1B:95:1D:C3 RSSI: -51
[CHG] Device 30:C0:1B:95:1D:C3 TxPower: 0
[bluetooth]# remove 30:C0:1B:95:1D:C3
[DEL] Device 30:C0:1B:95:1D:C3 JBL GO
Device has been removed
[NEW] Device 30:C0:1B:95:1D:C3 JBL GO
[CHG] Device 30:C0:1B:95:1D:C3 TxPower: 0
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 0000110d-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[bluetooth]# trust 30:C0:1B:95:1D:C3
[CHG] Device 30:C0:1B:95:1D:C3 Trusted: yes
Changing 30:C0:1B:95:1D:C3 trust succeeded
[bluetooth]# pair 30:C0:1B:95:1D:C3
Attempting to pair with 30:C0:1B:95:1D:C3
[CHG] Device 30:C0:1B:95:1D:C3 Connected: yes
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 30:C0:1B:95:1D:C3 ServicesResolved: yes
[CHG] Device 30:C0:1B:95:1D:C3 Paired: yes
Pairing successful
[CHG] Device 30:C0:1B:95:1D:C3 ServicesResolved: no
[CHG] Device 30:C0:1B:95:1D:C3 Connected: no
[bluetooth]# connect 30:C0:1B:95:1D:C3
Attempting to connect to 30:C0:1B:95:1D:C3
Failed to connect: org.bluez.Error.Failed
[bluetooth]# exit

我检查蓝牙服务:

$ sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; disabled; vendor preset: disabled)
     Active: active (running) since Sat 2021-11-06 08:32:21 WIB; 47min ago
       Docs: man:bluetoothd(8)
   Main PID: 3844 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 38347)
     Memory: 2.0M
        CPU: 439ms
     CGroup: /system.slice/bluetooth.service
             └─3844 /usr/libexec/bluetooth/bluetoothd

Nov 06 09:12:21 [hostname] bluetoothd[3844]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/sbc
Nov 06 09:12:21 [hostname] bluetoothd[3844]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/sbc
Nov 06 09:12:21 [hostname] bluetoothd[3844]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/sbc_xq_453
Nov 06 09:12:21 [hostname] bluetoothd[3844]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/sbc_xq_453
Nov 06 09:12:21 [hostname] bluetoothd[3844]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/sbc_xq_512
Nov 06 09:12:21 [hostname] bluetoothd[3844]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/sbc_xq_512
Nov 06 09:12:21 [hostname] bluetoothd[3844]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSink/sbc_xq_552
Nov 06 09:12:21 [hostname] bluetoothd[3844]: Endpoint registered: sender=:1.87 path=/MediaEndpoint/A2DPSource/sbc_xq_552
Nov 06 09:12:30 [hostname] bluetoothd[3844]: /org/bluez/hci0/dev_30_C0_1B_95_1D_C3/sep1/fd0: fd(42) ready
Nov 06 09:12:30 [hostname] bluetoothd[3844]: profiles/audio/avctp.c:avctp_connect_browsing_cb() Browsing: connect to 30:C0:1B:95:1D:C3: Connection refused (111)

我已经尝试过rfkillalsa但没有结果。但是当我尝试这些命令时:

$ pulseaudio -k
$ pulseaudio -D
$ pulseaudio --start

,它起作用了。但我找不到我的设备pavucontrol。现在我卡住了:| 图形用户界面已连接

这是我的 Kali 版本:

$ uname -a
Linux [my_hostname] 5.14.0-kali2-amd64 #1 SMP Debian 5.14.9-2kali1 (2021-10-04) x86_64 GNU/Linux

蓝牙控制版本:bluetoothctl: 5.61

蓝人版本:2.2.2-1

答案1

我一直在为这个问题绞尽脑汁。自从 Kali 提供最新一轮 apt 更新以来,我已经遇到这个问题几天了。经过一番挖掘后,我发现有一些与 PipeWire 和pulseaudio 组件相关的软件包更改(特别是删除 pipeline-media-session、新安装 pipeline-pulse 以及升级 pipelinewire)

我找到了以下文章:https://wiki.debian.org/BluetoothUser/a2dp#PipeWire

“至少,您需要安装 libspa-0.2-bluetooth 软件包,删除pulsaudio-module-bluetooth 软件包(如果之前已安装),然后重新启动计算机或重新启动 PipeWire 服务,否则设备连接将失败并显示“协议不可用”。

apt install libspa-0.2-bluetooth && apt purge pulseaudio-module-bluetooth

reboot

我现在有了音频端点,并且仍然可以使用 pavucontrol 进行配置。

这是一个非常简单的解决方案,解决了一个突然出现的非常丑陋的问题。我希望这可以帮助仍然面临这个问题的人。

额外的

我发现将加载模块功能添加到 @sup2069 的其他分辨率响应中描述的 /etc/pulse/default.pa 似乎已经纠正了我遇到的一个问题,它不会记住我的音频配置文件。每次设备重新连接时,我都必须在 pavucontrol 中重新配置默认音频源。我只是想把那一点信息扔出去。感谢大家为这个社区做出的所有贡献!

答案2

我和你有同样的问题,我的搜索把我带到了这里。做了更多的挖掘,我解决了 Debian Sid 构建上的问题。

将以下内容添加到/etc/pulse/default.pa/etc/pulse/default.pa.d/bluez5.pa。我创建了我的并将其插入到bluez5.pa.

load-module module-bluez5-device
load-module module-bluez5-discover

保存并退出。

我重新启动(可能不需要),然后运行以下命令以在启动时加载脉冲音频(端点错误是因为它没有要绑定的音频而引起的;直到您使用 和 手动启动它pulseaudio -Dpulsaudio --start

接下来,运行这些命令以在用户登录时加载pulseaudio,但是不要使用特权访问运行它,否则您可能会遇到错误。

systemctl --user enable pulseaudio
systemctl --user start pulseaudio

然后我取下蓝牙耳机并重新配对。它们已连接并且也出现在混音器面板中。您还可以更进一步,关闭蓝牙设备电源,然后重新打开,再次配对。

注意:由于我的代表,我无法在评论中提问以从您那里收集更多信息。

相关内容