We are using reference minimal image 6.2.0 on the Verdin iMX8MM. We are trying to pair a bluetooth device (Bluetooth Remote Control Smartphone) using Linux bluetoothctl utility.
When trying to connect to the BT device I get the following error: “Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable”.
Below I copy the list of commands and messages from the bluetoothctl tool.
~# bluetoothctl
Agent registered
[CHG] Controller 48:E7:DA:FE:EA:46 Pairable: yes
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent is already registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 48:E7:DA:FE:EA:46 Discovering: yes
[CHG] Device 11:22:33:3B:27:04 RSSI: -46
[bluetooth]# trust 11:22:33:3B:27:04
Changing 11:22:33:3B:27:04 trust succeeded
[bluetooth]# pair 11:22:33:3B:27:04
Attempting to pair with 11:22:33:3B:27:04
[CHG] Device 11:22:33:3B:27:04 Connected: yes
[CHG] Device 11:22:33:3B:27:04 Bonded: yes
[CHG] Device 11:22:33:3B:27:04 Paired: yes
Pairing successful
[CHG] Device 11:22:33:3B:27:04 Connected: no
[bluetooth]# connect 11:22:33:3B:27:04
Attempting to connect to 11:22:33:3B:27:04
[CHG] Device 11:22:33:3B:27:04 Connected: yes
[CHG] Device 11:22:33:3B:27:04 ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable
[CHG] Device 11:22:33:3B:27:04 ServicesResolved: no
[CHG] Device 11:22:33:3B:27:04 Connected: no
[bluetooth]#
Hi @kevin.tx,
This time it is version v1.1B. I have other modules version v1.1E but I haven’t really tested them with BT.
Do you have this bug reported by any other customer?
Best regards,
Julián
So I tried to reproduce your issue with a Verdin iMX8MM Q 2GB WB IT V1.1B (Same module as you have) with the Toradex Reference Image 6.3 on it. (one version newer than the one you use)
I successfully paired and connected a bluetooth headset and my personal smartphone to the module.
Now I would have some questions for you:
Can you send me the output of connmanctl technologies?
And the output of bluetoothctl show?
To be sure I would like to check the output of systemctl status bluetooth.service as well.
Since we’re on it the output of tdx-info would also be useful.
Then I wanted to ask you, if you have any alternative device that you could test? Like headphones or so, ideally something where you do not have to “confirm” the pairing/connection.
Before changing the BSP version I would like to know whether or not it is a problem of the BSP version. Our product currently uses BSP 6.2.0.
connmanctl technologies output:
/net/connman/technology/wifi
Name = WiFi
Type = wifi
Powered = False
Connected = False
Tethering = False
TetheringFreq = 2412
/net/connman/technology/bluetooth
Name = Bluetooth
Type = bluetooth
Powered = True
Connected = False
Tethering = False
TetheringFreq = 2412
/net/connman/technology/ethernet
Name = Wired
Type = ethernet
Powered = True
Connected = True
Tethering = False
TetheringFreq = 2412
bluetoothctl show output:
Controller EC:2E:98:87:13:34 (public)
Name: verdin-imx8mm-06902571
Alias: verdin-imx8mm-06902571
Class: 0x00200000
Powered: yes
Discoverable: no
DiscoverableTimeout: 0x000000b4
Pairable: no
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d0541
Discovering: no
Roles: central
Roles: peripheral
systemctl status bluetooth.service output:
Controller EC:2E:98:87:13:34 (public)
Name: verdin-imx8mm-06902571
Alias: verdin-imx8mm-06902571
Class: 0x00200000
Powered: yes
Discoverable: no
DiscoverableTimeout: 0x000000b4
Pairable: no
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d0541
Discovering: no
Roles: central
Roles: peripheral
systemctl status bluetooth.service output:
bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-07-18 06:13:53 UTC; 7min ago
Docs: man:bluetoothd(8)
Main PID: 649 (bluetoothd)
Status: “Running”
Tasks: 1 (limit: 1761)
Memory: 2.0M
CGroup: /system.slice/bluetooth.service
`- 649 /usr/libexec/bluetooth/bluetoothd
Jul 18 06:13:53 verdin-imx8mm-06902571 systemd[1]: Starting Bluetooth service…
Jul 18 06:13:53 verdin-imx8mm-06902571 systemd[649]: ConfigurationDirectory…5)
Jul 18 06:13:53 verdin-imx8mm-06902571 systemd[1]: Started Bluetooth service.
Hint: Some lines were ellipsized, use -l to show in full.
HW model: Toradex Verdin iMX8M Mini WB on Verdin Development Board
Toradex version: 0055 V1.1B
Serial number: 06902571
Processor arch: aarch64
I have tried with other devices and it is always the same. Could you tell me what commands you have executed. Below is the output of bluetoothctl when I try to connect to my handsfree.
The steps I performed were the ones that you did. I followed your command order.
I will try to do the same with BSP 6.2 to see if that changes anything. On your side did you give BSP 6.3 a try to see if the behaviour is still the same?
we performed some tests with BSP 6.2 on our side. And we were observing the same error as you did, but then after a couple of seconds it started working.
It is kind of reproducible but it seems to also fix itself after a while. On your end you were never able to establish connection?
Hi @kevin.tx,
Sorry for the delay but we were on holiday. After a few seconds with BSP 6.2 we could not get it to connect.
We downloaded the Reference Minimal Image BSP 6.3 and when we tried to connect to the BT device it gave us a socket connection error, as shown below.
Hi @kevin.tx,
This recipe also works for me with my mobile phone but not with other BT devices.
For example, when I try to connect to a handsfree I get the following error:
Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable
When trying to connect to a Remote Control Smartphone I get the following error:
Failed to connect: org.bluez.Error.Failed br-connection-create-socket
I got the same error as you. But in my case the device got already connected when I paired it. (This is a fresh installation of the minimal image by the way)
Did you ever try to do a disconnect after pairing to see if that changes things?
Hi @kevin.tx,
I have three different handsfree models, one of them is an AfterShokz, and with all three devices I get the same fault.
Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable
In your screenshot, the device name seems to change from WH_1000XM3 to LE_WH_1000XM3. Could you please explain me why this change?
I have run the disconnect command and it hasn’t solved the problem. Any idea what could be happening?
Best regards,
Julián
so I did some more testing on my end and I saw some instability on the connection leading to the same error message as you saw.
As my device I used another set of headphones that I haven’t used before for this test, so that I have a level playing field. I was successfully connecting the headphone and was able to play an audio-file like here:
I noticed something in your log that I saw on my end as well. It seems that your device is actually connected for a short amount of time.
Hi @kevin.tx,
I’m using two Molex 146153-1100 antennas (WIFI Stand Alone Antenna Linear 2483.5MHz/5930MHz 3dBi/4dBi Adhesive Box) and the BT device is less than 1 meter away.
The connection and disconnection is almost instantaneous, less than 5 seconds. It happens mostly with BT remote controls, similar to the remotes used to take selfies with the mobile phone. These devices emulate a keyboard and/or mouse. It seems to be something SW related to HID, but we are not sure.
My mobile phone can be connected without any problems and I have been able to practice the examples of your tutorial using bluealsa.
Thanks in advance.
Best regards,
Julián
Congratulation to the Toradex community anniversary.
I did further tests with different devices and different versions of the BSP and I noticed the following.
If I connect headphones the link is “stable” and as I mentioned I can hear something when playing an audio file on the module.
Then I connected 2 different keyboards and 1 mouse. There I saw two different patterns.
First one is a stable connection for the mouse and the keyboard ( as well as auto reconnect after reboot) so the connection seems to really be present and stable.
The other keyboard (a bit of an older model using Bluetooth 3.0) I noticed that the connection seems to drop after a short time. Like you reported.
But after pressing a key the connection is reestablished and then disconnected again. I suspect this to be the behaviour of the Bluetooth device and not the SoM. Most probably some form of power saving.
I will chat with another colleague today to prove or disprove this theory. I will come back to you.