蓝牙被软阻止并且 rfkill unblock 不起作用

蓝牙被软阻止并且 rfkill unblock 不起作用

借口是我一直在寻找新的发行版并实时启动多个安装介质(Mint、Ubuntu、Debian),但在这个过程中我的蓝牙收音机停止了工作。我的猜测是,发行版中处理蓝牙的方式存在一些细微的差异,并且它进入了未指定的状态。

任何发行版中的 GUI 控件都无法再次打开它。每当我点击它时,它立即移回到关闭位置......没有错误消息;它只是不起作用。

我以前也遇到过这种情况! 我在两台不同的计算机上都发生过这种情况。第一次是几年前;很久以前,我不记得当时是如何修复它的!据我记得我只是玩玩rfkill,然后突然就起作用了。

但是,令我烦恼的是,有一段时间我一直无法解决这个问题 - 谷歌没有帮助我。我一直尝试使用 rfkill 解除阻止(或阻止然后解除阻止)蓝牙,但没有任何反应。状态始终为“软阻止:是”。打开和关闭硬件飞行模式按钮也没有帮助。以下是我尝试的命令行:

root@lsb-hp6570b-deb:/home/jcxz100# rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hp-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
3: hp-gps: GPS
    Soft blocked: no
    Hard blocked: no
4: hp-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
root@lsb-hp6570b-deb:/home/jcxz100# rfkill unblock 4
root@lsb-hp6570b-deb:/home/jcxz100# rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hp-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
3: hp-gps: GPS
    Soft blocked: no
    Hard blocked: no
4: hp-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
root@lsb-hp6570b-deb:/home/jcxz100# rfkill block 4
root@lsb-hp6570b-deb:/home/jcxz100# rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hp-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
3: hp-gps: GPS
    Soft blocked: no
    Hard blocked: no
4: hp-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
root@lsb-hp6570b-deb:/home/jcxz100# rfkill unblock 4
root@lsb-hp6570b-deb:/home/jcxz100# rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hp-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
3: hp-gps: GPS
    Soft blocked: no
    Hard blocked: no
4: hp-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
root@lsb-hp6570b-deb:/home/jcxz100# rfkill block bluetooth
root@lsb-hp6570b-deb:/home/jcxz100# rfkill unblock bluetooth
root@lsb-hp6570b-deb:/home/jcxz100# rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hp-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
3: hp-gps: GPS
    Soft blocked: no
    Hard blocked: no
4: hp-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no

我使用的是 Debian 9.9,我的 rfkill 版本是“0.5-1+b1 (Debian)”,但是由于我之前在旧计算机上的 Mint 16(或者可能是 17)上也发生过这种情况,所以我不会详细介绍与我的规格。

请参阅下面我自己的解决方案。

答案1

就在今天晚上,我偶然发现了“解决方案”(我将其描述为 rfkill 命令中的一个特性(bug?)的解决方法)。

你必须使用这个命令:

rfkill unblock all

单独解锁蓝牙即可不起作用如上所示。

root@lsb-hp6570b-deb:/home/jcxz100# rfkill block all
root@lsb-hp6570b-deb:/home/jcxz100# rfkill list
0: phy0: Wireless LAN
    Soft blocked: yes
    Hard blocked: yes
1: hp-wifi: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
2: hp-wwan: Wireless WAN
    Soft blocked: yes
    Hard blocked: no
3: hp-gps: GPS
    Soft blocked: yes
    Hard blocked: no
4: hp-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
root@lsb-hp6570b-deb:/home/jcxz100# rfkill unblock all
root@lsb-hp6570b-deb:/home/jcxz100# rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hp-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
3: hp-gps: GPS
    Soft blocked: no
    Hard blocked: no
4: hp-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
5: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

似乎 rfkill 在列出时将蓝牙无线电视为软阻止,但在要求解除阻止时却没有......因此什么也不做。但是,当使用“全部”目标时,它只是继续并更改每个无线电的状态,而不判断它们是否已经解锁。

相关内容