蓝牙配置混乱,无法查看或连接蓝牙设备

蓝牙配置混乱,无法查看或连接蓝牙设备

出现故障后,我尝试重新安装我的蓝牙包(就像尝试在 Windows 的设备管理器中卸载蓝牙一样)并hcitool scan出现错误:

Device is not available: No such device"

我得到之后"sudo service bluetooth restart

Job for bluetooth.service failed because the control process exited with error code. See "systemctl status bluetooth.service" and "journalctl -xe" for details.

输出:

● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/bluetooth.service.d
           └─override.conf
   Active: failed (Result: exit-code) since Mon 2016-02-01 14:59:53 MST; 5min ago
     Docs: man:bluetoothd(8)
  Process: 7249 ExecStartPost=/usr/sbin/chmod o+rw /var/run/sdp (code=exited, status=203/EXEC)
  Process: 7248 ExecStart=/usr/lib/bluetooth/bluetoothd --compat (code=exited, status=0/SUCCESS)
 Main PID: 7248 (code=exited, status=0/SUCCESS)
   Status: "Quitting"

Feb 01 14:59:53 will-Lenovo-Edge-15 systemd[1]: Starting Bluetooth service...
Feb 01 14:59:53 will-Lenovo-Edge-15 bluetoothd[7248]: Bluetooth daemon 5.35
Feb 01 14:59:53 will-Lenovo-Edge-15 systemd[7249]: bluetooth.service: Failed ...
Feb 01 14:59:53 will-Lenovo-Edge-15 systemd[1]: bluetooth.service: Control p...3
Feb 01 14:59:53 will-Lenovo-Edge-15 bluetoothd[7248]: Starting SDP server
Feb 01 14:59:53 will-Lenovo-Edge-15 bluetoothd[7248]: Terminating
Feb 01 14:59:53 will-Lenovo-Edge-15 bluetoothd[7248]: Stopping SDP server
Feb 01 14:59:53 will-Lenovo-Edge-15 systemd[1]: Failed to start Bluetooth se....
Feb 01 14:59:53 will-Lenovo-Edge-15 systemd[1]: bluetooth.service: Unit ente....
Feb 01 14:59:53 will-Lenovo-Edge-15 systemd[1]: bluetooth.service: Failed wi....
Hint: Some lines were ellipsized, use -l to show in full.

我该如何解决这个问题?(Ubuntu 15 带有 Gnome shell,在 Lenovo Edge 15 上)

答案1

/etc/systemd/system/dbus-org.bluez.service 并更改此行

ExecStart=/usr/lib/bluetooth/bluetoothd对此

ExecStart=/usr/lib/bluetooth/bluetoothd --compat

然后像这样重新启动蓝牙

sudo systemctl daemon-reload
sudo systemctl restart bluetooth

你还必须更改 /var/run/sdp 的权限

sudo chmod 777 /var/run/sdp

相关内容