我试着通过蓝牙连接到我的笔记本电脑,当我连接到它时,笔记本电脑发出了这样的信息:“行动II的设置失败了。”我做了一些搜索,安装了非免费的存储库,但它仍然无法工作。最后,我找到了这的帖子,并决定看看我的电脑会用什么回应。我执行了systemctl status bluetooth.service
,结果是:
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-06-07 20:19:30 CEST; 20min ago
Docs: man:bluetoothd(8)
Main PID: 686 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 18984)
Memory: 6.7M
CPU: 105ms
CGroup: /system.slice/bluetooth.service
└─686 /usr/libexec/bluetooth/bluetoothd
Jun 07 20:19:30 debian bluetoothd[686]: profiles/sap/server.c:sap_server_register() Sap driver initialization failed.
Jun 07 20:19:30 debian bluetoothd[686]: sap-server: Operation not permitted (1)
Jun 07 20:20:40 debian bluetoothd[686]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 54:B7:E5:6D:D3:68: Protocol not available
Jun 07 20:20:40 debian bluetoothd[686]: src/service.c:btd_service_connect() a2dp-source profile connect failed for 54:B7:E5:6D:D3:68: Protocol not available
Jun 07 20:21:22 debian bluetoothd[686]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 54:B7:E5:6D:D3:68: Protocol not available
Jun 07 20:21:22 debian bluetoothd[686]: src/service.c:btd_service_connect() a2dp-source profile connect failed for 54:B7:E5:6D:D3:68: Protocol not available
Jun 07 20:21:24 debian bluetoothd[686]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 54:B7:E5:6D:D3:68: Protocol not available
Jun 07 20:21:24 debian bluetoothd[686]: src/service.c:btd_service_connect() a2dp-source profile connect failed for 54:B7:E5:6D:D3:68: Protocol not available
Jun 07 20:21:28 debian bluetoothd[686]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 54:B7:E5:6D:D3:68: Protocol not available
Jun 07 20:21:28 debian bluetoothd[686]: src/service.c:btd_service_connect() a2dp-source profile connect failed for 54:B7:E5:6D:D3:68: Protocol not available
我还没有真正找到sap驱动程序是什么或者如何安装它,我对linux非常陌生,所以如果我下载了错误的东西lol,我害怕把房子烧掉。感谢你的帮助!
发布于 2022-06-07 21:20:15
你看到的信息表明了两个不同的问题。
这样的信息
src/service.c:btd_service_connect() a2dp-sink profile connect failed for <Bluetooth device address>: Protocol not available
src/service.c:btd_service_connect() a2dp-source profile connect failed for <Bluetooth device address>: Protocol not available
建议包pulseaudio-module-bluetooth
可能丢失。Debian 11默认使用PulseAudio处理蓝牙音频设备。
关于SAP
的消息
在蓝牙方面,SAP指的是SIM访问配置文件:一种蓝牙配置文件,它允许口袋中的智能手机将其SIM/USIM卡借给内置在汽车中的移动电话硬件(或售后汽车套件),以利用汽车优化的无手功能、更好的天线以及汽车电气系统为无线电组件提供的更多电力。
显然,这种SIM卡共享应该只允许在受信任的配对设备之间进行。
在没有SIM卡插槽和没有移动电话网络通信功能的台式机或膝上型计算机中,蓝牙SIM访问配置文件是非常无用的。它存在于BlueZ软件套件中,因为很明显,这部分软件套件被用于一些旧智能手机。SIM访问协议的API仍然存在,但是要想使用它,您必须在BlueZ和SIM读卡器之间编写一个合适的接口(= SAP驱动程序)。
BlueZ源代码包仍然包含一个sap-dummy.c
文件,作为如何编写SAP驱动程序的示例。如果我正确理解代码,而不是与真正的SIM卡通信,sap-dummy.c
将提供一个D总线接口,这将允许对另一个蓝牙设备的SAP功能进行故障排除.在开发智能手机等方面可能很有用。
在我看来,sap-server: Operation not permitted (1)
错误消息是由于D总线在默认情况下没有配置必要的权限来允许设置SAP虚拟接口造成的。
过去唯一存在于BlueZ源代码树中的SAP驱动程序是针对智能手机和平板电脑的圣爱立信U8500平台,该平台早在2011年就宣布了。2017年该代码已于年从存储库中删除。评论说U8500平台“早就死了”。
所以,除非你正在用手机网络连接自己的设备,否则你可以安全地忽略它。
如果您想清理这些消息,您可能需要编写一个具有以下内容的/etc/systemd/system/bluetooth.service.d/override.conf
文件:
[Service]
ExecStart=
ExecStart=/usr/libexec/bluetooth/bluetoothd --noplugin=sap
这将导致通过添加bluetoothd
选项启动--noplugin=sap
进程,该选项将禁用SAP功能的剩余部分,并使与蓝牙SAP相关的消息保持沉默。
根据Debian软件包变更,Debian的BlueZ软件包的维护者,在2011年做出了启用support支持的选择,并且从那以后就没有修改过这个特定的决定。错误报告已经存在。提到了这个问题。
https://unix.stackexchange.com/questions/705326
复制相似问题