I'm trying to connect my Sony DS4 Controller to my RPi4 over Bluetooth. It has worked before and I have my BT headphones working, but the controller now really don't want to Connect.
I have successfully Registered and Trusted the controller and it appears in all the right lists. But when I try to 'Connect' it fails.
Doing some reading Iv'e been led to believe that it might be a dbus permission problem?
Here's the output from running bluetoothctl:
[bluetooth]# list
Controller DC:A6:32:A4:3E:B0 BlueZ 5.50 [default]
[bluetooth]# paired-devices
Device AC:1D:06:07:9F:01 AirPods Pro
Device 30:0E:D5:7B:21:7C Wireless Controller Green
[bluetooth]# trust 30:0E:D5:7B:21:7C
Changing 30:0E:D5:7B:21:7C trust succeeded
[bluetooth]# connect 30:0E:D5:7B:21:7C
Attempting to connect to 30:0E:D5:7B:21:7C
Failed to connect: org.bluez.Error.Failed
[CHG] Device 30:0E:D5:7B:21:7C Connected: yes
[CHG] Device 30:0E:D5:7B:21:7C Connected: no
And if anyone is adept at dbus (I'm not) here's the monitor output for the connection step above:
EDIT: I forgot to add this error message output as well that I got when trying to Connect using a script in Retropie:
dbus.exceptions.DBusException: org.bluez.Error.NotAvailable: Operation currently not available
I'm using RaspbianOS 32bit, kernel 5.4
Iv'e been sitting a long time trying to figure this out but I feel stuck now. Does anyone have an idea of what to do?
UPDATE 2: After some re-installing and going slowly step by step I have identified the(my?) problem as happening like this:
The following BREAKS Sony game controller bluetooth connectability, but make the Bluetooth Audio Headphones connect correctly.
sudo nano /etc/systemd/system/bluetooth.target.wants/bluetooth.service
to....
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap --plugin=a2dp
and
This BREAKS Bluetooth Audio Headphones connectability, but makes the Sony game controller connect correctly.
sudo nano /etc/systemd/system/bluetooth.target.wants/bluetooth.service
to....
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap
The missing link being the a2dp plugin. Is there a way around this to make both the Sony game controller work at the same time as the bluetooth headphones?
Is there a different protocol (or whatever it is) than a2dp that can be used for the audio?
Cheers
sudo apt install bluetooth pi-bluetooth bluez blueman
Then I just remove all device inbluetoothctl
usingremove <device>
then use GUI to connect. You might want to give it a try