dmesg
[ 18.549303] Bluetooth: Core ver 2.22
[ 18.549496] Bluetooth: HCI device and connection manager initialized
[ 18.549542] Bluetooth: HCI socket layer initialized
[ 18.549571] Bluetooth: L2CAP socket layer initialized
[ 18.549625] Bluetooth: SCO socket layer initialized
[ 29.964223] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 29.964248] Bluetooth: BNEP filters: protocol multicast
[ 29.964289] Bluetooth: BNEP socket layer initialized
lsusb
Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
hcitool dev
Devices:
hci0 00:1A:7D:XX:XX:XX
bluetoothctl list
Controller 00:1A:7D:XX:XX:XX raspberrypi [default]
* Error: sap-server: Operation not permitted
SAP stands for SIM Access Profile, so you have to disable it:
# Open /etc/systemd/system/bluetooth.target.wants/bluetooth.service
# Change:
ExecStart=/usr/lib/bluetooth/bluetoothd
To
ExecStart=/usr/lib/bluetooth/bluetoothd –noplugin=sap
# Reload the systemd:
sudo systemctl daemon-reload
# Restart the bluetooth:
sudo service bluetooth restart
# Get the bluetooth status:
sudo service bluetooth status
service bluetooth status
* bluetooth.service – Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-11-21 14:03:58 WIB; 4min 48s ago
Docs: man:bluetoothd(8)
Main PID: 627 (bluetoothd)
Status: “Running”
CGroup: /system.slice/bluetooth.service
└─627 /usr/lib/bluetooth/bluetoothd –noplugin=sap
# Create a “bluetooth” group which will be granted with on bluez’s d-bus config
sudo groupadd bluetooth
# Open the config in /etc/dbus-1/system.d/bluetooth.conf with your favorite text editor
sudo nano /etc/dbus-1/system.d/bluetooth.conf
# Add/append the following lines below in /etc/dbus-1/system.d/bluetooth.conf
# Add your login user to “bluetooth” group
sudo usermod -a -G bluetooth
# Reboot the system.
# Then try to use “bluetoothctl” without sudo
bluetoothctl show
sudo apt install pulseaudio pulseaudio-module-bluetooth
pulseaudio –start
bluetoothctl scan on
bluetoothctl pair 30:21:9D:57:AA:3B
bluetoothctl trust 30:21:9D:57:AA:3B
bluetoothctl info 30:21:9D:57:AA:3B
bluetoothctl connect 30:21:9D:57:AA:3B
pulseaudio –kill
pacmd info | grep Default
test:
omxplayer -o alsa test.mp3
https://stackoverflow.com/questions/48279646/bluetoothctl-no-default-controller-available/53738121#53738121
https://raspberrypi.stackexchange.com/a/46660
https://gist.github.com/actuino/9548329d1bba6663a63886067af5e4cb