Bluetooth speaker with rpi3

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Bluetooth speaker with rpi3

Postby GloW » Tue Nov 22, 2016 10:48 pm

As an introduction you must know that it's the first time i try to configure a bluetooth *anything* with ArchLinux.
Never owned a bluetooth device before, except for my android phone.

So anyway, what i did so far was :
- make and install hciattach-rpi3 and pi-bluetooth
- follow this guide for bluetooth speaker https://wiki.archlinux.org/index.php/Bluetooth_headset#Headset_via_Bluez5.2FPulseAudio

All is working great until i try to use bluetoothctl.

$this->bbcode_second_pass_code('', '
[pi@alarmpi ~]$ sudo systemctl status brcm43438.service
* brcm43438.service - Broadcom BCM43438 bluetooth HCI
Loaded: loaded (/usr/lib/systemd/system/brcm43438.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2016-11-22 22:26:28 UTC; 1min 54s ago
Main PID: 267 (hciattach-rpi3)
CGroup: /system.slice/brcm43438.service
`-267 /usr/bin/hciattach-rpi3 -n /dev/ttyAMA0 bcm43xx 921600 noflow -

Nov 22 22:26:28 alarmpi systemd[1]: Started Broadcom BCM43438 bluetooth HCI.

[pi@alarmpi ~]$ systemctl status bluetooth
* bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2016-11-22 22:26:30 UTC; 4min 20s ago
Docs: man:bluetoothd(8)
Main PID: 336 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
`-336 /usr/lib/bluetooth/bluetoothd

Nov 22 22:26:30 alarmpi systemd[1]: Starting Bluetooth service...
Nov 22 22:26:30 alarmpi bluetoothd[336]: Bluetooth daemon 5.43
Nov 22 22:26:30 alarmpi systemd[1]: Started Bluetooth service.
Nov 22 22:26:30 alarmpi bluetoothd[336]: Starting SDP server
Nov 22 22:26:30 alarmpi bluetoothd[336]: Bluetooth management interface 1.10 initialized
Nov 22 22:26:30 alarmpi bluetoothd[336]: Failed to obtain handles for "Service Changed" characteristic
Nov 22 22:26:30 alarmpi bluetoothd[336]: Sap driver initialization failed.
Nov 22 22:26:30 alarmpi bluetoothd[336]: sap-server: Operation not permitted (1)
Nov 22 22:26:30 alarmpi bluetoothd[336]: Failed to set privacy: Rejected (0x0b)


[pi@alarmpi ~]$ hcitool dev
Devices:
hci0 B8:27:EB:FB:06:AB
[pi@alarmpi ~]$ hcitool scan
Scanning ...
08:DF:1F:8E:DF:32 Bose Mini II SoundLink

[pi@alarmpi ~]$ sudo bluetoothctl
[NEW] Controller B8:27:EB:FB:06:AB alarmpi [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:FB:06:AB Discovering: yes
[NEW] Device 08:DF:1F:8E:DF:32 Bose Mini II SoundLink
[bluetooth]# pair 08:DF:1F:8E:DF:32
Attempting to pair with 08:DF:1F:8E:DF:32
[CHG] Device 08:DF:1F:8E:DF:32 Connected: yes
[CHG] Device 08:DF:1F:8E:DF:32 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:8E:DF:32 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:8E:DF:32 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:8E:DF:32 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:8E:DF:32 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:8E:DF:32 ServicesResolved: yes
[CHG] Device 08:DF:1F:8E:DF:32 Paired: yes
Pairing successful
[CHG] Device 08:DF:1F:8E:DF:32 ServicesResolved: no
[CHG] Device 08:DF:1F:8E:DF:32 Connected: no
[bluetooth]# trust 08:DF:1F:8E:DF:32
[CHG] Device 08:DF:1F:8E:DF:32 Trusted: yes
Changing 08:DF:1F:8E:DF:32 trust succeeded
[bluetooth]# connect 08:DF:1F:8E:DF:32
Attempting to connect to 08:DF:1F:8E:DF:32
Failed to connect: org.bluez.Error.Failed
[bluetooth]# quit
Agent unregistered
[DEL] Controller B8:27:EB:FB:06:AB alarmpi [default]
[pi@alarmpi ~]$ systemctl status bluetooth
* bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2016-11-22 22:26:30 UTC; 6min ago
Docs: man:bluetoothd(8)
Main PID: 336 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
`-336 /usr/lib/bluetooth/bluetoothd

Nov 22 22:26:30 alarmpi systemd[1]: Starting Bluetooth service...
Nov 22 22:26:30 alarmpi bluetoothd[336]: Bluetooth daemon 5.43
Nov 22 22:26:30 alarmpi systemd[1]: Started Bluetooth service.
Nov 22 22:26:30 alarmpi bluetoothd[336]: Starting SDP server
Nov 22 22:26:30 alarmpi bluetoothd[336]: Bluetooth management interface 1.10 initialized
Nov 22 22:26:30 alarmpi bluetoothd[336]: Failed to obtain handles for "Service Changed" characteristic
Nov 22 22:26:30 alarmpi bluetoothd[336]: Sap driver initialization failed.
Nov 22 22:26:30 alarmpi bluetoothd[336]: sap-server: Operation not permitted (1)
Nov 22 22:26:30 alarmpi bluetoothd[336]: Failed to set privacy: Rejected (0x0b)
Nov 22 22:32:03 alarmpi bluetoothd[336]: a2dp-sink profile connect failed for 08:DF:1F:8E:DF:32: Protocol not available

')

The last line in the systemctl appears only after the connect. However i do not know if :
- The first error is see after boot in the systemctl status bluetooth matter ?
- Pairing seems to work, bu is followed by ServiceResolved: no Connected: no, does it matter ? Also after pairing my speaker seems to be in an unasable state, i have to press the bluetooth button to be able to pair it again with another device.
- If both of these are ok, then i guess to problem is with the connection, but i followed this https://wiki.archlinux.org/index.php/Bluetooth_headset#Pairing_works.2C_but_connecting_does_not without success.

Of course my phone can connect to the speaker perfectly.
GloW
 
Posts: 8
Joined: Sun Sep 04, 2016 8:56 pm

Return to ARMv8

Who is online

Users browsing this forum: No registered users and 14 guests