这里有点连线.
我有一个问题是bluetoothctl总是说"没有默认控制器可用".我发现有很多人跟我有同样的问题.但情况与他们有点不同.
我可以看到我的hciconfig -a有如下信息

并且hcitool开发似乎也没问题.

但我不知道为什么我的bluetoothctl总是说"没有默认控制器可用"

即使我拒绝并多次调高hci0.它始终存在同样的问题.
顺便说一下,我的BlueZ是5.39.我在buildroot上尝试了这个实验.内核是3.10
ale*_*xei 17
如果 rfkill 开关阻止蓝牙,也会发生这种情况(在我的情况下,出于某种无意的原因):
$ rfkill list all
0: tpacpi_bluetooth_sw: Bluetooth
Soft blocked: yes
Hard blocked: no
Run Code Online (Sandbox Code Playgroud)
要取消阻止,请将上面列表中的蓝牙设备 ID 传递给unblock子命令:
$ rfkill unblock 0
Run Code Online (Sandbox Code Playgroud)
然后控制器应该回来:
$ bluetoothctl list
Controller .... [default]
Run Code Online (Sandbox Code Playgroud)
小智 15
有同样的问题.使用:
$ sudo bluetoothctl
然后自动找到控制器.之前我也尝试过https://www.raspberrypi.org/forums/viewtopic.php?t=207025.也许这影响了解决方案.
小智 11
以下是通过修改 bluez 配置和在没有 sudo 的情况下运行对我有用的步骤:
<allow send_destination="org.bluez"/> bluez 的 d-bus 配置$ sudo 组添加蓝牙
$ sudo vi /etc/dbus-1/system.d/bluetooth.conf
在 /etc/dbus-1/system.d/bluetooth.conf 中添加/追加以下行
<policy group="bluetooth">
<allow send_destination="org.bluez"/>
</policy>
保存您的更改。
将您的登录用户添加到“蓝牙”组
$ sudo usermod -a -G bluetooth <登录用户>
重新启动系统。
然后尝试在没有 sudo 的情况下使用“bluetoothctl”
$ bluetoothctl
[蓝牙]# 显示
小智 8
这是一个旧线程,但可能会帮助寻找答案的人。
我经常遇到这个问题,我验证的内容是:
systemctl status bluetooth == 这会检查蓝牙服务守护进程是否已在运行。检查输出:
已加载:已加载(/lib/systemd/system/bluetooth.service;已启用;供应商预设:已启用) 活动:活动(正在运行) 如果没有,请使用以下命令启动它: sudo systemctl start bluetooth
使用sudo bluetoothctl
这两者之一通常是罪魁祸首。
小智 6
我在Linux Kernel 5.12上使用VanillaArch时遇到了这个问题。折腾了一天,发现问题是:
1. 一些蓝牙设备固件在开箱即用的新 Linux 库中不可用,您需要查找。对于这个问题你可以参考下面的repo。在自述文件中,详细记录了您应该做什么。基本上你会下载并复制固件
/lib/固件/brcm
适用于 Broadcom 蓝牙设备。
https://github.com/winterheart/broadcom-bt-firmware
2. 在蓝牙上激活两个冲突的服务。 参考Arch 论坛上的“SayantanRC”:
当我比较两者时,我发现这两个服务在我的 Manjaro 安装中启用,但在我的 Arch linux 安装中禁用:
blueman-mechanism.service
bluetooth-mesh.service
Run Code Online (Sandbox Code Playgroud)
禁用它们并重新启动。
sudo systemctl disable blueman-mechanism.service
sudo systemctl disable bluetooth-mesh.service
Run Code Online (Sandbox Code Playgroud)
现服务如下:
~ >>> systemctl list-unit-files | grep blue
blueman-mechanism.service disabled disabled
bluetooth-mesh.service disabled disabled
bluetooth.service enabled disabled
dbus-org.bluez.service alias -
bluetooth.target static -
~ >>>
Run Code Online (Sandbox Code Playgroud)
瞧,蓝牙已启动!
~ >>> bluetoothctl
Agent registered
[CHG] Controller 68:07:15:DE:1F:15 Pairable: yes
[bluetooth]# show
Controller 68:07:15:DE:1F:15 (public)
Name: src-manjaro
Alias: src-manjaro
Class: 0x00000000
Powered: no
Discoverable: no
DiscoverableTimeout: 0x000000b4
Pairable: yes
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Headset AG (00001112-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d0537
Discovering: no
Roles: central
Roles: peripheral
Advertising Features:
ActiveInstances: 0x00 (0)
SupportedInstances: 0x05 (5)
SupportedIncludes: tx-power
SupportedIncludes: appearance
SupportedIncludes: local-name
[bluetooth]# quit
Run Code Online (Sandbox Code Playgroud)
编辑:出于验证目的,我重新启用了服务,蓝牙适配器再次出现问题。我禁用了它们,现在好了。检查内核 5.9 和 5.4。
https://bbs.archlinux.org/viewtopic.php?id=259260&p=2
| 归档时间: |
|
| 查看次数: |
15007 次 |
| 最近记录: |