蓝牙不适用于Raspbian Stretch和Raspberry Pi 3


10

在新安装的Raspbian Stretch中,登录并使用的第一个命令systemctl status bluetooth,我得到:

$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2017-08-18 01:37:37 UTC; 1s ago
     Docs: man:bluetoothd(8)
 Main PID: 667 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─667 /usr/lib/bluetooth/bluetoothd

Aug 18 01:37:37 raspberrypi systemd[1]: Starting Bluetooth service...
Aug 18 01:37:37 raspberrypi bluetoothd[667]: Bluetooth daemon 5.43
Aug 18 01:37:37 raspberrypi systemd[1]: Started Bluetooth service.
Aug 18 01:37:37 raspberrypi bluetoothd[667]: Starting SDP server
Aug 18 01:37:38 raspberrypi bluetoothd[667]: Bluetooth management interface 1.14 initialized
Aug 18 01:37:38 raspberrypi bluetoothd[667]: Failed to obtain handles for "Service Changed" characteristic
Aug 18 01:37:38 raspberrypi bluetoothd[667]: Sap driver initialization failed.
Aug 18 01:37:38 raspberrypi bluetoothd[667]: sap-server: Operation not permitted (1)

因此,bluetoothctl不会检测到任何设备。

Raspbian Jessie并没有发生这种情况。关于如何解决这个问题的任何指示?


注意:在bluez仓库中似乎有一个待解决的错误条目,原因是未能获取“服务已更改”特征的句柄
Besi,

Answers:


7

我只是遇到了同样的问题。蓝牙服务中的错误是红色鲱鱼。问题(无论如何对我来说)是通过DBus访问服务所需的权限已更改。

作为普通用户:

pi@raspberrypi:~ $ busctl tree org.bluez
Failed to introspect object / of service org.bluez: Access denied
No objects discovered.

作为根:

pi@raspberrypi:~ $ sudo busctl tree org.bluez
└─/org
  └─/org/bluez
    └─/org/bluez/hci0

检查了/etc/dbus-1/system.d/bluetooth.conf,它说用户必须在蓝牙组中。

将用户添加到组:

pi@raspberrypi:~ $ sudo adduser pi bluetooth
Adding user `pi' to group `bluetooth' ...
Adding user pi to group bluetooth
Done.
pi@raspberrypi:~ $ newgrp bluetooth

现在可以正常工作:

pi@raspberrypi:~ $ busctl tree org.bluez
└─/org
  └─/org/bluez
    └─/org/bluez/hci0
pi@raspberrypi:~ $ bluetoothctl 
[NEW] Controller 43:43:A1:12:1F:AC raspberrypi [default]

您了解它是否可以在Kodi上使用?它似乎仅适用于铬浏览器
answerSeeker
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.