#1032256 blueman: auto-connect incomplete, needs additional "bluetoothctl connect <Id>" to work

Package:
blueman
Source:
blueman
Description:
Graphical bluetooth manager
Submitter:
Alf
Date:
2023-03-05 19:57:03 UTC
Severity:
normal
#1032256#5
Date:
2023-03-02 12:16:08 UTC
From:
To:
After a fresh boot of the PC, sound is routed through hardware audio chip as
Profile: "Analog Stereo Duplex" selected in pavucontol (graphical Tool)
and works fine via pipewire and pipewire-pulse.

When I want to use my Headset (ear-buds with micro build in), i.e. to make a phone call
using linphone I have to connect them via bluetooh to my adapter build in Intel AX200 WiFi card.

Headset/ear-buds are "Hama Freedom Light" with bluetooth 5.1 supporting these profiles:
A2DP v1.3
AVRCP v1.5
HFP v1.5
SPP v1.0

Connection fails when performing the usual way using blueman after pairing and trusting.
Blueman reports (auto-)"connected", but the device is not available for selection,
neither in linphone, nor in pavucontrol.

I tried various settings in /etc/bluetooth/main.conf without any success.
But I found a dirty workaround by watching bluetooth messages and "try and error".

Executing the interactive "bluetoothctl" command shows following.

ingo@xpc:~$  bluetoothctl
Agent registered
[bluetooth]# info 3C:F8:A8:B9:CE:A1
Device 3C:F8:A8:B9:CE:A1 (public)
	Name: Hama Freedom Light
	Alias: Hama Freedom Light
	Class: 0x00240404
	Icon: audio-headset
	Paired: yes
	Bonded: yes
	Trusted: yes
	Blocked: no
	Connected: no
	LegacyPairing: no
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	Modalias: bluetooth:v05D6p000Ad0240
[CHG] Device 3C:F8:A8:B9:CE:A1 Connected: yes
[Hama Freedom Light]#

[CHG] Devicde 3C:F8:A8:B9:CE:A1 Connected: yes
[Hama Freedom Light]# info 3C:F8:A8:B9:CE:A1
Device 3C:F8:A8:B9:CE:A1 (public)
	Name: Hama Freedom Light
	Alias: Hama Freedom Light
	Class: 0x00240404
	Icon: audio-headset
	Paired: yes
	Bonded: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: no
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	Modalias: bluetooth:v05D6p000Ad0240
[Hama Freedom Light]#

[Hama Freedom Light]# connect 3C:F8:A8:B9:CE:A1
Attempting to connect to 3C:F8:A8:B9:CE:A1
[NEW] Endpoint /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep2
[NEW] Endpoint /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep1
[NEW] Transport /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep1/fd0
Connection successful
[CHG] Device 3C:F8:A8:B9:CE:A1 ServicesResolved: yes
[CHG] Transport /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep1/fd0 Volume: 0x0060 (96)
[Hama Freedom Light]#
[DEL] Endpoint /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep2
[DEL] Endpoint /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep1
[CHG] Device 3C:F8:A8:B9:CE:A1 ServicesResolved: no
[CHG] Device 3C:F8:A8:B9:CE:A1 Connected: no
[bluetooth]#

[bluetooth]# exit
ingo@xpc:~$


Additional info:
When blueman reports "connected" at the first discovery of my ear-buds nothing is logged in system journal.
When I then issue the "bluetoohtctl connect 3C:F8:A8:B9:CE:A1" comand another time to comlpete setup,
journal logs:

Mär 01 16:39:09 xpc wireplumber[1327]: RFCOMM receive command but modem not available: AT+CHLD=?
Mär 01 16:39:09 xpc wireplumber[1327]: RFCOMM receive command but modem not available: AT+CCWA=1
Mär 01 16:39:09 xpc wireplumber[1327]: RFCOMM receive command but modem not available: AT+NREC=0
Mär 01 16:39:09 xpc wireplumber[1327]: RFCOMM receive command but modem not available: AT+CGMI?
Mär 01 16:39:09 xpc kernel: input: Hama Freedom Light (AVRCP) as /devices/virtual/input/input27
Mär 01 16:39:09 xpc Thunar[4070]: thunar-volman: Nicht unterstützter Eingabegerätetyp »(null)«.
Mär 01 16:39:09 xpc systemd-logind[871]: Watching system buttons on /dev/input/event20 (Hama Freedom Light (AVRCP))
Mär 01 16:39:10 xpc Thunar[4075]: thunar-volman: Nicht unterstützter Eingabegerätetyp »/dev/input/event20«.

I do not have the knowledge for further debugging this complicated bluetooth attitude.
My guess currently is, the first auto-connect is with AVRCP profile only and the ear-buds are
waiting for further information and/or callback. The second (manual) connect then registers the
selected profile and completes connection.

Regards, Alf

#1032256#10
Date:
2023-03-02 17:50:12 UTC
From:
To:
I found further information on my device (ear-buds) in
/var/lib/bluetooth/80:38:FB:D6:A7:62/3C:F8:A8:B9:CE:A1/info:

Name=Hama Freedom Light
Class=0x240404
SupportedTechnologies=BR/EDR;
Trusted=true
Blocked=false
Services=0000110b-0000-1000-8000-00805f9b34fb;0000110c-0000-1000-8000-00805f9b34fb;0000110d-0000-1000-8000-00805f9b34fb;0000110e-0000-1000-8000-00805f9b34fb;0000111e-0000-1000-8000-00805f9b34fb;00001200-0000-1000-8000-00805f9b34fb;

[DeviceID]
Source=1
Vendor=1494
Product=10
Version=576

[LinkKey]
Key=< 32 hex characters long, maybe secret? >
Type=4
PINLength=0

#1032256#15
Date:
2023-03-04 22:08:31 UTC
From:
To:
Hi Alf,

those protocols are completely run by the audio server, which in your
case seems to be PipeWire. blueman does not have any stake in it.

Regards

#1032256#20
Date:
2023-03-05 16:48:28 UTC
From:
To:
Am 04.03.23 um 23:08 schrieb Christopher Schramm:

Hi Christopher,

does that also apply to the creation of these missing nodes as reported back to bluetoothctl after the second connect command?

[Hama Freedom Light]# connect 3C:F8:A8:B9:CE:A1
Attempting to connect to 3C:F8:A8:B9:CE:A1
[NEW] Endpoint /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep2
[NEW] Endpoint /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep1
[NEW] Transport /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep1/fd0
Connection successful
[CHG] Device 3C:F8:A8:B9:CE:A1 ServicesResolved: yes
[CHG] Transport /org/bluez/hci0/dev_3C_F8_A8_B9_CE_A1/sep1/fd0 Volume: 0x0060 (96)

If yes, could you please assign/move this bug to pipewire

Regards, Alf

#1032256#25
Date:
2023-03-05 19:23:40 UTC
From:
To:
Yes, those BlueZ endpoints are ultimately provided by the audio server.