{"id":228,"date":"2020-11-21T14:19:47","date_gmt":"2020-11-21T07:19:47","guid":{"rendered":"https:\/\/prosindo.com\/blog\/?p=228"},"modified":"2020-11-21T21:05:48","modified_gmt":"2020-11-21T14:05:48","slug":"raspberry-pi-1-add-bluetooth-dongle","status":"publish","type":"post","link":"https:\/\/prosindo.com\/blog\/2020\/11\/21\/raspberry-pi-1-add-bluetooth-dongle\/","title":{"rendered":"Raspberry Pi 1: Add bluetooth dongle and connect BT speaker"},"content":{"rendered":"<p>dmesg<br \/>\n[ 18.549303] Bluetooth: Core ver 2.22<br \/>\n[ 18.549496] Bluetooth: HCI device and connection manager initialized<br \/>\n[ 18.549542] Bluetooth: HCI socket layer initialized<br \/>\n[ 18.549571] Bluetooth: L2CAP socket layer initialized<br \/>\n[ 18.549625] Bluetooth: SCO socket layer initialized<br \/>\n[ 29.964223] Bluetooth: BNEP (Ethernet Emulation) ver 1.3<br \/>\n[ 29.964248] Bluetooth: BNEP filters: protocol multicast<br \/>\n[ 29.964289] Bluetooth: BNEP socket layer initialized<\/p>\n<p>lsusb<br \/>\nBus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)<\/p>\n<p>hcitool dev<br \/>\nDevices:<br \/>\nhci0 00:1A:7D:XX:XX:XX<\/p>\n<p>bluetoothctl list<br \/>\nController 00:1A:7D:XX:XX:XX raspberrypi [default]<\/p>\n<p>* Error: sap-server: Operation not permitted<br \/>\nSAP stands for SIM Access Profile, so you have to disable it:<br \/>\n# Open \/etc\/systemd\/system\/bluetooth.target.wants\/bluetooth.service<br \/>\n# Change:<br \/>\nExecStart=\/usr\/lib\/bluetooth\/bluetoothd<br \/>\nTo<br \/>\nExecStart=\/usr\/lib\/bluetooth\/bluetoothd &#8211;noplugin=sap<\/p>\n<p># Reload the systemd:<br \/>\nsudo systemctl daemon-reload<\/p>\n<p># Restart the bluetooth:<br \/>\nsudo service bluetooth restart<\/p>\n<p># Get the bluetooth status:<br \/>\nsudo service bluetooth status<\/p>\n<p>service bluetooth status<br \/>\n* bluetooth.service &#8211; Bluetooth service<br \/>\nLoaded: loaded (\/lib\/systemd\/system\/bluetooth.service; enabled; vendor preset: enabled)<br \/>\nActive: active (running) since Sat 2020-11-21 14:03:58 WIB; 4min 48s ago<br \/>\nDocs: man:bluetoothd(8)<br \/>\nMain PID: 627 (bluetoothd)<br \/>\nStatus: &#8220;Running&#8221;<br \/>\nCGroup: \/system.slice\/bluetooth.service<br \/>\n\u2514\u2500627 \/usr\/lib\/bluetooth\/bluetoothd &#8211;noplugin=sap<\/p>\n<p># Create a &#8220;bluetooth&#8221; group which will be granted with on bluez&#8217;s d-bus config<br \/>\nsudo groupadd bluetooth<\/p>\n<p># Open the config in \/etc\/dbus-1\/system.d\/bluetooth.conf with your favorite text editor<br \/>\nsudo nano \/etc\/dbus-1\/system.d\/bluetooth.conf<\/p>\n<p># Add\/append the following lines below in \/etc\/dbus-1\/system.d\/bluetooth.conf<\/p>\n<p># Add your login user to &#8220;bluetooth&#8221; group<br \/>\nsudo usermod -a -G bluetooth<\/p>\n<p># Reboot the system.<br \/>\n# Then try to use &#8220;bluetoothctl&#8221; without sudo<br \/>\nbluetoothctl show<\/p>\n<p>sudo apt install pulseaudio pulseaudio-module-bluetooth<\/p>\n<p>pulseaudio &#8211;start<\/p>\n<p>bluetoothctl scan on<\/p>\n<p>bluetoothctl pair 30:21:9D:57:AA:3B<\/p>\n<p>bluetoothctl trust 30:21:9D:57:AA:3B<\/p>\n<p>bluetoothctl info 30:21:9D:57:AA:3B<\/p>\n<p>bluetoothctl connect 30:21:9D:57:AA:3B<\/p>\n<p>pulseaudio &#8211;kill<\/p>\n<p>pacmd info | grep Default<\/p>\n<p>test:<br \/>\nomxplayer -o alsa test.mp3<\/p>\n<p>https:\/\/stackoverflow.com\/questions\/48279646\/bluetoothctl-no-default-controller-available\/53738121#53738121<br \/>\nhttps:\/\/raspberrypi.stackexchange.com\/a\/46660<br \/>\nhttps:\/\/gist.github.com\/actuino\/9548329d1bba6663a63886067af5e4cb<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: &hellip; <a href=\"https:\/\/prosindo.com\/blog\/2020\/11\/21\/raspberry-pi-1-add-bluetooth-dongle\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Raspberry Pi 1: Add bluetooth dongle and connect BT speaker&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-228","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/posts\/228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/comments?post=228"}],"version-history":[{"count":5,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":234,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions\/234"}],"wp:attachment":[{"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/media?parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/categories?post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/tags?post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}