darko2000
Posts: 4
Joined: Wed Jul 17, 2019 6:57 pm

Unable to connect to RPI3+ bluetooth on Arch

Wed Jul 17, 2019 7:00 pm

Hi guys,

I tried several ways of installing bluez packages and drivers to enable RPI for bluetooth sound receiving, but always end up in the same state (bluetoothctl : No default controller available)

Things i tried:
(1)5.2 prebuilt package from here https://github.com/RoEdAl/alarm-bluetoo … s/tag/v6-2
1. pacman -U https://github.com/RoEdAl/alarm-bluetoo … s/tag/v5-2
2. add dtoverlay=bcmbt to /boot/config.txt
3. modprobe btusb
4. systemctl enable bluetooth.service
5. systemctl start bluetooth.service

I am not sure what this line do and whether its mandatory (Remove the attachment of /dev/ttyAMA0 (/dev/ttyS0 in mini-UART version) to the console from /boot/cmdline.txt)

(2) https://hwblog.org/2018/06/08/how-to-ge … linux-arm/
1. wget https://github.com/RPi-Distro/bluez-fir … 4345C0.hcd
2. wget http://mirror.archlinuxarm.org/armv7h/a … pkg.tar.xz
3. tar -xf http://mirror.archlinuxarm.org/armv7h/a … pkg.tar.xz
4. cp BCM4345C0.hcd /lib/firmware/brcm/
5. cp brcm_patchram_plus /usr/bin/
6. create and enable service for /usr/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/BCM4345C0.hcd --baudrate 3000000 --enable_hci --use_baudrate_for_download --no2bytes --tosleep=1000000 /dev/ttyAMA0
7. pacman -U http://tardis.tiny-vps.com/aarm/package … pkg.tar.xz

In both ways i can locate raspberry bluetooth on my android phone (CSR-bc4), when i try to connect request for PIN comes and after entering whatever there - nothing happens

Raspberry pi 3+, Archphile based on ArchLinux, no UI only commandline

Any hints where i could start ?

darko2000
Posts: 4
Joined: Wed Jul 17, 2019 6:57 pm

Re: Unable to connect to RPI3+ bluetooth on Arch

Thu Jul 18, 2019 6:37 am

Well, managed to get one step forward, was able to locate and pair with bluetoothctl, but can't connect. i guess it has something to do with unable to install properly bluez-alsa lib. Idea is to stream music from Android phoney to RPI wihout pulseaudio. here are the steps that i did so far:

Code: Select all

pacman -U https://github.com/RoEdAl/alarm-bluetooth-raspberrypi/releases/download/v5-2/bluetooth-raspberrypi-5-2-any.pkg.tar.xz
add dtoverlay=bcmbt to /boot/config.txt
Remove the attachment of /dev/ttyAMA0 (/dev/ttyS0 in mini-UART version) to the console from /boot/cmdline.txt
pacman -U http://tardis.tiny-vps.com/aarm/packages/b/bluez/bluez-5.50-6-armv7h.pkg.tar.xz
modprobe btusb
systemctl enable bluetooth.service
systemctl start bluetooth.service
bluetoothctl 

everything works here for pairing, but connecting fails and from phone and from RPI. (Failed to connect: org.bluez.Error.Failed)

Code: Select all

git clone https://aur.archlinux.org/bluez-alsa-git.git
removing dependency for AAC lib
makepkg
pacman -U bluez-alsa-git-1.4.0.r29.g2296b47-1-armv7h.pkg.tar.xz
 
this one didn't produce errors neither

however here i am stuck:

Code: Select all

bluealsa AND
bluealsa --dbus=suffix &
produce bluealsa: Couldn't acquire D-Bus name: org.bluealsa
bluetoothctl:connect -> Failed to connect: org.bluez.Error.Failed
any ideas where is the problem in bluetootch connection, maybe A2DP is missing? or in the bluez-alsa?

darko2000
Posts: 4
Joined: Wed Jul 17, 2019 6:57 pm

Re: Unable to connect to RPI3+ bluetooth on Arch

Thu Jul 18, 2019 9:49 am

Log from bluetoothctl

Code: Select all

[bluetooth]# show
Controller 43:45:C0:00:1F:AC (public)
	Name: archphile
	Alias: archphile
	Class: 0x00480000
	Powered: yes
	Discoverable: no
	Pairable: yes
	UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
	UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v1D6Bp0246d0532
	Discovering: no
[bluetooth]# pair 80:4E:70:0B:E6:19
Attempting to pair with 80:4E:70:0B:E6:19
[CHG] Device 80:4E:70:0B:E6:19 Connected: yes
Request confirmation
[Gala1m[agent] Confirm passkey 945901 (yes/no): yes
[CHG] Device 80:4E:70:0B:E6:19 Modalias: bluetooth:v0075p0100d0201
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 00001112-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 00001115-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 00001116-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 0000112d-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 80:4E:70:0B:E6:19 ServicesResolved: yes
[CHG] Device 80:4E:70:0B:E6:19 Paired: yes
Pairing successful
[CHG] Device 80:4E:70:0B:E6:19 ServicesResolved: no
[CHG] Device 80:4E:70:0B:E6:19 Connected: no
[bluetooth]# connect 80:4E:70:0B:E6:19
Attempting to connect to 80:4E:70:0B:E6:19
Failed to connect: org.bluez.Error.Failed
[bluetooth]# 

darko2000
Posts: 4
Joined: Wed Jul 17, 2019 6:57 pm

Re: Unable to connect to RPI3+ bluetooth on Arch

Tue Jul 23, 2019 6:12 am

SOLVED. Steps were correct only adding profile to bluealsa call was missing:

Code: Select all

"killalll bluealsa"
"bluealsa -p a2dp-sink &"
BTW with RPI 3+ onboard bluetooth sound was very choppy, didn't find any other fix than using USB dongle bluetooth

Return to “Arch”