蓝牙无法在Ubuntu 16.04 LTS上运行
我想通过蓝牙将文件从手机发送到笔记本电脑,反之亦然。 但我系统上的蓝牙无法正常工作。 当我在系统设置>蓝牙中打开蓝牙开关时,没有任何反应,并且始终禁用右侧的可见性开关。
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-bluetooth: Bluetooth Soft blocked: no Hard blocked: no
输出dmesg | grep Blue
dmesg | grep Blue
如下:
[ 29.519992] Bluetooth: Core ver 2.21 [ 29.520012] Bluetooth: HCI device and connection manager initialized [ 29.520016] Bluetooth: HCI socket layer initialized [ 29.520019] Bluetooth: L2CAP socket layer initialized [ 29.520025] Bluetooth: SCO socket layer initialized [ 54.305795] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 54.305799] Bluetooth: BNEP filters: protocol multicast [ 54.305804] Bluetooth: BNEP socket layer initialized
我不知道是否安装了驱动程序,我也不知道如何检查它。
知道问题是什么吗?
更新 :
输出lspci -knn | grep Net -A2; lsusb
lspci -knn | grep Net -A2; lsusb
lspci -knn | grep Net -A2; lsusb
如下:
09:00.0 Network controller [0280]: Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe [1814:3290] DeviceName: Subsystem: Hewlett-Packard Company Ralink RT3290LE 802.11bgn 1x1 Wi-Fi and Bluetooth 4.0 Combo Adapter [103c:18ec] Bus 001 Device 003: ID 064e:c342 Suyin Corp. Bus 001 Device 002: ID 8087:8000 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
即使设备的配对开关打开,我的ubuntu 16.04也找不到蓝牙设备。
Ubuntu 16.04蓝牙音箱
简而言之,我尝试了以下过程。
-
sudo nano /etc/bluetooth/main.conf
- 将
#AutoEnable=false
更改为AutoEnable=true
(默认情况下位于文件底部) -
sudo service /etc/init.d/bluetooth restart
然后,我的Ubuntu机器能够找到蓝牙设备!
我有同样的问题。 在我的情况下,我认为这是我旧的统一控制中心安装版本的错误,或一些缺少依赖项。 解决了轻松更新统一控制中心的问题:
sudo apt-get install unity-control-center
希望它可能有所帮助。
我的蓝牙倾向于“掉线”,我不得不做一个reebot。 但这解决了它:
sudo service bluetooth restart
(比重启更容易!)
经过两天的搜索,没有任何运气,对我来说。 我在USB记忆棒上刻录了Ubuntu的图像,进入了尝试模式。 测试蓝牙,它的工作原理,可以找到设备和配对。
然后我在我的HardDisk上安装了一个新的ubuntu映像,尝试安装旧安装上安装的所有程序,直到我发现蓝牙停止工作
我想我安装了一个名为TLP的工具用于电源管理,当我通过apt remove tlp
将其apt remove tlp
并重启时,蓝牙工作并可以找到其他设备!
也许TLP需要配置才能与蓝牙配合使用
我希望这可以帮到你
更新:
我安装了最新版本的TLP,现在蓝牙工作没有任何问题。
TLP在Gihub上发布: 这里
下载最新版本解压缩
cd TLP-1.0 # use checkinstall so that you can remove it anytime sudo checkinstall
使用PPA获取最新版本
sudo add-apt-repository ppa:linrunner/tlp sudo apt update sudo apt install tlp
然后重启。
注意:这个答案仅适用于Debian!
在我的情况下,未检测到蓝牙设备。 就我而言,它是Qualcomm Atheros硬件的一部分:
$ lspci -knn | grep Net -A2 03:00.0 Network controller [0280]: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter [168c:0036] (rev 01) Subsystem: Hewlett-Packard Company QCA9565 / AR9565 Wireless Network Adapter [103c:217f] Kernel driver in use: ath9k Kernel modules: ath9k
安装专有/非免费固件并重新启动有帮助。
sudo apt-get install aptitude sudo aptitude install firmware-atheros
经过这么多次尝试解决这个问题后,以下命令为我做了。
rfkill block bluetooth
然后我做以下事情
rfkill unblock bluetooth
我总是用这个来重启一切:
:~# rfkill block bluetooth; rfkill list; /etc/init.d/bluetooth restart;\ /etc/init.d/bluetooth status;\ modprobe -r btusb; modprobe btusb;\ /etc/init.d/bluetooth restart; /etc/init.d/bluetooth status
从笔记本电脑上的手机无法上传一段时间后,我发现安装blueman-applet
( sudo apt install blueman
)并为设备添加“信任”,然后指定接受上传的文件解决了我的问题。 我真的不知道为什么现在我的任务栏中有两个蓝牙图标 – 但是blueman-applet似乎提供了比标准Gnome / Ubuntu applet更多的选项。
额外的小程序菜单:
“设备”列表的上下文菜单允许“信任”设备:
本地服务对话框允许蓝牙接受上传的文件:
编辑 :进一步挖掘显示Ubuntu推荐的“个人文件共享”对话框应该直接支持此function而无需blueman-applet
。 但它对我不起作用。
试试这个,
rfkill list 0: hp-wifi: Wireless LAN Soft blocked: no Hard blocked: no 1: hp-bluetooth: Bluetooth Soft blocked: yes Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no
所以来自列表蓝牙被rfkill阻止,难怪我无法在GUI中连接。 rfkill unblock bluetooth rfkill list 0: hp-wifi: Wireless LAN Soft blocked: no Hard blocked: no 1: hp-bluetooth: Bluetooth Soft blocked: no Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no 3: hci0: Bluetooth Soft blocked: yes Hard blocked: no
在取消阻止命令之后我得到一个软阻止的新设备hci0,但是hp-bluetooth设备被解除阻塞,它仍然无法从GUI工作。
hciconfig hci0 up Can't init device hci0: Operation not permitted (1) :$sudo hciconfig hci0 up [sudo] password for karibe: Can't init device hci0: Operation not possible due to RF-kill (132) rfkill unblock bluetooth hci0 rfkill list 0: hp-wifi: Wireless LAN Soft blocked: no Hard blocked: no 1: hp-bluetooth: Bluetooth Soft blocked: no Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no 3: hci0: Bluetooth Soft blocked: no Hard blocked: no
在此之后,一切都按预期工作。 我不知道为什么Rfkill会不时阻止蓝牙,但现在我知道当我需要使用它时如何解锁,并在我不需要使用它时阻止。