$ bluetoothctl [bluetooth]# scan on No default controller available
調べた
ログに、 Sap driver initialization failed.とエラーが出てる
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
$ sudo systemctl status bluetooth ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2020-12-08 22:28:43 JST; 1min 49s ago Docs: man:bluetoothd(8) Main PID: 359 (bluetoothd) Status: "Running" Tasks: 1 (limit: 4915) CGroup: /system.slice/bluetooth.service └─359 /usr/lib/bluetooth/bluetoothd
Dec 08 22:28:43 raspberrypi systemd[1]: Starting Bluetooth service... Dec 08 22:28:43 raspberrypi bluetoothd[359]: Bluetooth daemon 5.50 Dec 08 22:28:43 raspberrypi bluetoothd[359]: Starting SDP server Dec 08 22:28:43 raspberrypi bluetoothd[359]: Bluetooth management interface 1.14 initialized Dec 08 22:28:43 raspberrypi bluetoothd[359]: Sap driver initialization failed. Dec 08 22:28:43 raspberrypi bluetoothd[359]: sap-server: Operation not permitted (1) Dec 08 22:28:43 raspberrypi systemd[1]: Started Bluetooth service.
piユーザが bluetoothグループに所属していないといけないようです
1 2 3 4 5 6 7 8 9 10 11 12 13
$ cat /etc/dbus-1/system.d/bluetooth.conf <!-- This configuration file specifies the required security policies for Bluetooth core daemon to work. -->
(中略)
<!-- allow users of bluetooth group to communicate --> <policy group="bluetooth"> <allow send_destination="org.bluez"/> </policy>