I’m running Ubuntu Mate 18.04 (32 bit) and I’m having trouble pairing a bluetooth speaker. It has worked before, but after putting the system to sleep and using the speaker with another computer it never seems to want to pair again.
Meanwhile, other computers can pair with and use the speaker with no problems.
-
I tried pairing it manually with
bluetoothctl
but I always get aFailed to pair: org.bluez.Error.AlreadyExists
. I can’t say I know what that means. -
I can successfully
remove
the device, but the result is always the same when trying to pair it again. -
The device is not listed when doing
paired-devices
. -
As suggested in other answers I tried restarting pulse audio with
pulseaudio --kill
andpulseaudio --start
, and tried pairing again. No difference.
How do I find out what’s wrong?
asked Apr 16, 2019 at 16:06
2
What helped me was to restart the Bluetooth service.
When I did sudo service bluetooth status
I saw error info in red:
Unable pair since another pairing is in progress
and another one
B4:6C:47:53:FF:86: error updating services: Device or resource busy (16)
So I did sudo service bluetooth restart
and then I was able to pair the device.
answered Feb 2, 2021 at 18:38
2
That’s what I found
systemctl start bluetooth
bluetoothctl
power on
agent on
scan on
pair XX:XX:XX:XX:XX:XX
connect XX:XX:XX:XX:XX:XX
answered Jan 15 at 18:13
Add the device to be connected to the trusted list by using trust 00:00:00:00:00:00
and then try to connect or pair.
answered Jun 9, 2020 at 9:59
VenoVeno
1012 bronze badges
2
Содержание
- Воспроизведение звука на Intel Edison через Bluetooth с использованием Advanced Audio Distribution Profile (A2DP)
- Вам понадобятся
- Настройка
- Устранение проблем
- Дополнительная информация
- От переводчика
- Error when trying to connect to bluetooth speaker: `org.bluez.Error.Failed`
- 7 Answers 7
- Arch Linux
- #1 2013-07-14 11:02:32
- Bluetooth audio paired but not connect?
- #2 2013-07-14 17:34:51
- Re: Bluetooth audio paired but not connect?
- #3 2013-07-16 17:12:05
- Re: Bluetooth audio paired but not connect?
- #4 2013-07-20 04:09:01
- Re: Bluetooth audio paired but not connect?
- #5 2013-07-20 10:32:40
- Re: Bluetooth audio paired but not connect?
- #6 2013-10-08 11:51:45
- Re: Bluetooth audio paired but not connect?
- #7 2013-10-08 23:00:19
- Re: Bluetooth audio paired but not connect?
- #8 2013-12-02 01:03:44
- Re: Bluetooth audio paired but not connect?
- #9 2013-12-05 23:34:57
- Re: Bluetooth audio paired but not connect?
- #10 2013-12-07 20:20:48
- Re: Bluetooth audio paired but not connect?
- #11 2013-12-27 12:50:58
- Re: Bluetooth audio paired but not connect?
- #12 2014-01-18 20:18:21
- Re: Bluetooth audio paired but not connect?
- #13 2014-01-21 12:27:17
- Re: Bluetooth audio paired but not connect?
- #14 2014-01-21 16:36:39
- Re: Bluetooth audio paired but not connect?
- #15 2014-01-21 16:47:18
- Re: Bluetooth audio paired but not connect?
- #16 2014-01-21 16:56:17
- Re: Bluetooth audio paired but not connect?
- #17 2014-01-21 18:21:14
- Re: Bluetooth audio paired but not connect?
- #18 2014-01-21 19:03:00
- Re: Bluetooth audio paired but not connect?
- #19 2014-01-21 19:09:11
- Re: Bluetooth audio paired but not connect?
- #20 2014-01-21 19:16:07
- Re: Bluetooth audio paired but not connect?
- #21 2014-01-21 19:22:10
- Re: Bluetooth audio paired but not connect?
- #22 2014-01-21 23:21:53
- Re: Bluetooth audio paired but not connect?
- #23 2014-01-22 08:12:48
- Re: Bluetooth audio paired but not connect?
- #24 2014-01-28 01:33:54
- Re: Bluetooth audio paired but not connect?
Воспроизведение звука на Intel Edison через Bluetooth с использованием Advanced Audio Distribution Profile (A2DP)
В ходе реализации проектов на плате Intel Edison иногда возникает необходимость воспроизвести звук. В последних версиях образа Yocto добавлена поддержка Alsa, и можно воспользоваться USB аудиокартой. Но большую мобильность даст использование встроенного Bluetooth модуля. Например, устройство на базе Intel Edison, которое получает аудиофайлы по сети, может находиться стационарно в одном месте в комнате. Слушать же музыку можно в любой точке помещения, используя обычные беспроводные наушники. Итак, начнём.
Вам понадобятся
Настройка
Включите ваше Bluetooth устройство и сделайте его видимым. Введите следующие команды в терминале:
Просканируйте доступные Bluetooth устройства:
Найдите ваше устройство и присоединитесь к нему (подставив его MAC адрес):
Установите соединение, если необходимо:
Закройте программу bluetoothctl:
Проверьте, что ваше A2DP устройство (в нашем случае наушники LG) распознались в pulseaudio как sink-устройство и его имя начинается с bluez_sink
Сконфигурируйте дефолтный sink для использования в pulseaudio следующими командами, подставив параметры вашего устройства:
Скопируйте аудио файл в формате wav на плату Intel Edison, используя scp (Linux) или pscp.exe (Windows) и проиграйте его через mplayer:
Используйте wav файлы, так как могут быть некоторые сложности при проигрывании mp3 файлов.
Устранение проблем
Если вы получили:
Проверьте, какое устройство у вас подключено:
Удалите устройство, к которому вы подключены (подставьте MAC-адрес вашего устройства):
Другие полезные команды bluetoothctl можно получить так:
Дополнительная информация
От переводчика
При проверке этой статьи у меня возникли некоторые проблемы. Устройство не получалось подсоединить командой connect, не было команды pactl. Плата Edison была прямо из коробки, поэтому всё это решилось перепрошивкой новой версией образа Yocto.
Чтобы перепрошить плату, можно воспользоваться следующей рекомендацией. Я сделал немного по-другому в Windows.
В папке с распакованным архивом Yocto на Windows компьютере запускаем flashall.bat. Возможно, еще понадобится программа dfu-util.exe, которую надо поместить в эту же распакованную папку. Сама программа доступна по ссылке.
Обсуждение dfu-util под Windows и перепрошивку Edison можно найти тут и тут.
Источник
Error when trying to connect to bluetooth speaker: `org.bluez.Error.Failed`
I’m running Debian Jessie 8.2. I have a bluetooth USB dongle connected to my machine.
I run sudo bluetoothctl -a then do the following:
But I can connect to my iPhone this way. Why can’t I connect to my Bose Mini II SoundLink speaker?
7 Answers 7
This may be due to the pulseaudio-module-bluetooth package not being installed. Install it if it missing, then restart pulseaudio.
If the issue is not due to the missing package, the problem in this case is that PulseAudio is not catching up. A common solution to this problem is to restart PulseAudio. Note that it is perfectly fine to run bluetoothctl as root while PulseAudio runs as user. After restarting PulseAudio, retry to connect. It is not necessary to repeat the pairing.
Continue trying second part only if above does not work for you:
If restarting PulseAudio does not work, you need to load module-bluetooth-discover.
The same load-module command can be added to /etc/pulse/default.pa . If that still does not work, or you are using PulseAudio’s system-wide mode, also load the following PulseAudio modules (again these can be loaded via your default.pa or system.pa):
Try trusting the device first before paring the device.
I got the same error while attempt to pair my AirPods to Ubuntu 16.04.
In bluetoothctl with sudo I got
Now this is what I’ve tried (full progress)
Now the AirPods works beautifully between my iPhone and Ubuntu.
this procedure works for me, thx.
I was trying to add a bluetooth speaker, this was the error message that I had,
I removed the device and then repeat all the steeps that David Jung share.
this is how it looks now:
In my case, a related error message ( Failed to pair: org.bluez.Error.AuthenticationFailed ) was happening just because the device was already paired to another source.
Lesson learned : When debugging bluetooth pairing issues, step zero should be checking the device is fully available to new connections, disconnected from any other source, and rebooting the source and the bluetooth device.
To long for a comment and hence writing an answer to benefit others from the observation :
In my case, Ubuntu 17.04, just installing the bluez ( sudo apt-get install bluez ) worked. I did not need any of the pulseaudio packages. I just followed David Jungs answer to do the first ever connection with the JBL bluetooth headset. Make sure that the headset has just been powered on — basically it is set in the discoverable mode.
Also, for reconnecting ( for example after a restart ), simply calling bluetoothctl -a and then connect works. If you have a applet in your window manager, then of course one can connect from there, otherwise the command line interface is bluetoothctl -a . Don’t forget to issue devices command in the sudo bluetoothctl -a menu to be sure that your device is available. If the device list is empty, follow first the answer from @David Jung.
Be sure to have the services running. Check for sudo systemctl status bluetooth.service and sudo systemctl status bluetooth.target . Both should be active and loaded! Sometimes, restarting both the services, before bluetoothctl -a works. I did all the commands under sudo rights, just to avoid any loopholes.
An useful utility is btmon to monitor, what exactly is going on, when you connect, or pair, or anything related to the bluetooth commands.
Источник
Arch Linux
You are not logged in.
#1 2013-07-14 11:02:32
Bluetooth audio paired but not connect?
Hi, guys. I’ve got a SONY BTN-40 handsfree set. It works very well under Windows XP and Windows 7. Now I’ve tried several times to make it working under Archlinux. Here is my step:
Now I get into bluetooth control interface:
Now I set the controller:
I scan my handfree set and paring:
See last info: «Connected no»? I am wondering why my device has connected but a short time after, it disconnected automatically.
If I manually connect my device:
Again failed here.
I think use only this «bluetoothctl» can solve this problem. Any guys know how to solve this ?
Last edited by jameschyn (2013-07-15 00:25:19)
#2 2013-07-14 17:34:51
Re: Bluetooth audio paired but not connect?
Moderator: Please use BBCode Tags code tags when posting program output.
Thanks
Nothing is too wonderful to be true, if it be consistent with the laws of nature — Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. — Alan Turing
—
How to Ask Questions the Smart Way
#3 2013-07-16 17:12:05
Re: Bluetooth audio paired but not connect?
I ran into the exact same issue today with a HomeSpot NFC-enabled Bluetooth Audio Receiver. I’m able to pair and connect, but then it disconnects immediately. Here’s my bluetoothctl session:
And here’s the relevant hcidump:
#4 2013-07-20 04:09:01
Re: Bluetooth audio paired but not connect?
No one use bluetooth handfree set under linux ?
Or every one use wired or 2.4G?
#5 2013-07-20 10:32:40
Re: Bluetooth audio paired but not connect?
The stable pulseaudio (v4.0) does not support the new bluez 5 API. The git version should support it since june.
PS: heftig has a precompiled pulseaudio-git in his private repository, it is listed here: https://wiki.archlinux.org/index.php/Un … positories
Last edited by progandy (2013-07-20 10:42:07)
#6 2013-10-08 11:51:45
Re: Bluetooth audio paired but not connect?
Using pulseaudio-git also fixed my Bluetooth Headphone issue with Gnome3.10 requiring bluez5.
#7 2013-10-08 23:00:19
Re: Bluetooth audio paired but not connect?
Why would having pulseaudio installed or not interfere with the ability to connect or to pair with one’s device?
When using bluez4 I used to connect through ALSA and didn’t even have pulseaudio installed. Did bluez5 introduce pulseaudio as a dependency or an optional dependency, but forgot to list it as such? Also, I want to note that I just tried installing pulseaudio-git from AUR and I still cannot connect to my headset using bluez5.
[Edit] It seems indeed that pulseaudio-git is needed to get headsets working with bluez5. As for getting my headset paired and connected everything seems to work fine as of today through bluetoothctl as long as I don’t forget to turn the power to the controller on and enable the agent before pairing.
Last edited by vlsd (2013-11-18 20:31:47)
#8 2013-12-02 01:03:44
Re: Bluetooth audio paired but not connect?
I have pulseaudio-git and bluez5 installed, and I have similar problem. I can pair my headset but I can not connect.
#9 2013-12-05 23:34:57
Re: Bluetooth audio paired but not connect?
I have the exact same problem — it connects shortly, never having asked for a password, and then disconnects after two seconds. Also updated to pulseaudio-git.. any further hints or troubleshooting questions anyone? Thanks..
#10 2013-12-07 20:20:48
Re: Bluetooth audio paired but not connect?
I had these same problems. It would pair, but not connect. I updated the archwiki page on my setup. here
#11 2013-12-27 12:50:58
Re: Bluetooth audio paired but not connect?
pulseaudio from [extra] pulls from a git snapshot to support bluez5 — see this and this commit. Can somebody test if it works with the package from [extra]? Otherwise it might be worth filing a bug report.
#12 2014-01-18 20:18:21
Re: Bluetooth audio paired but not connect?
Chiming in with the paired but can’t connect problem. I’ve uninstalled everything alsa and pulseaudio 4 or 5 times during the past month or so trying to get this thing to work but it never does. The wiki, which I have «followed to a t», suggests using pulseaudio-git from AUR but that package has been broken for over a month, failing with:
Is there anyone out there who has a bluetooth headset set up working on a 64 bit machine in the current sad state of affairs in the bluetooth4 not quite bluetooth5 world?
I’m on a Dell Latitude D630.
Edit: For some reason libtool wasn’t installed on my system and was causing install of pulseaudio-git to fail. Past that hurdle now but still can’t connect my bluetooth headset. Sigh.
Last edited by whatshisname (2014-01-19 17:43:25)
#13 2014-01-21 12:27:17
Re: Bluetooth audio paired but not connect?
pulseaudio-git makes no difference to me.
Please let me know if anyone finds the answer — most frustrating!
#14 2014-01-21 16:36:39
Re: Bluetooth audio paired but not connect?
OK, this seems to be a bluez5 problem. Downgrading to bluez-fedora, bluez-tools and bluez-utils (bluez4), all still in AUR, and then connecting the headset with ‘bt-audio -c’ works.
‘course, this will probably break other things, especially bluedevil which only works with bluez5
#15 2014-01-21 16:47:18
Re: Bluetooth audio paired but not connect?
Glad you got it working. After my post, I too tried downgrading — again — but it still didn’t work.
Did you use pulseaudio-git with your bluez4 installation or do you fall back to pulseaudio from the main repositories? I think I stayed with pulseaudio-git.
#16 2014-01-21 16:56:17
Re: Bluetooth audio paired but not connect?
No I did not use pulseaudio-git
I used bluez-fedora, which includes bluez-utils, and bluez-tools (change the dependency in PKGBUILD to bluez-fedora) all from AUR
bluez-tools includes bt-audio, among others, which connects the headset.
#17 2014-01-21 18:21:14
Re: Bluetooth audio paired but not connect?
There’s currently no bluez5 media api compatible alsa implementation. So either use pulseaudio and bluez5 or some outdated bluez4 AUR stuff.
#18 2014-01-21 19:03:00
Re: Bluetooth audio paired but not connect?
Are you saying that if you use pulseaudio and bluez5, then you should remove all things alsa from your system?
#19 2014-01-21 19:09:11
Re: Bluetooth audio paired but not connect?
no. I once could confirm my BT headphones working in Gnome with PA and kept alsa stuff installed but removed all BT v4 packages.
#20 2014-01-21 19:16:07
Re: Bluetooth audio paired but not connect?
pulseaudio-git makes no difference to me.
It didn’t use to work for me either, I think something changed in a semi-recent version to support my hardware ( I have a D-Link DBT-120 adapter and a Sony DR-BT50 headset).
Are you saying that if you use pulseaudio and bluez5, then you should remove all things alsa from your system?
You don’t need to remove alsa, just reroute its output through pulseaudio in asound.conf. This is what my /etc/asound.conf looks like, for reference:
#21 2014-01-21 19:22:10
Re: Bluetooth audio paired but not connect?
Also just did a bluez upgrade today (from the official repos) and while my headset still works, it took about five tries to connect to it, with messages like this:
So something is here is certainly fucky.
#22 2014-01-21 23:21:53
Re: Bluetooth audio paired but not connect?
Often with simple ‘failed’ messages like that there can be clues as to what really went wrong in the system journal.
To see the last 20 lines of the journal:
I have audio through pulseaudio to bluetooth headset working on my x86_64 desktop Arch box, but not yet
on my headless Arch ARM box. The problem is not ARM, but that there are quite a few things that just
«come along» with the desktop environment (I use xfce4) that have to be done manually on a headless system.
Starting the per-session dbus daemon and the pulseaudio server (which runs as the user,
not as root) are a couple; there may be more.
As was noted above, ALSA wlll not work with the latest bluez. The story I heard is that nobody stepped forward
to update ALSA, so this might change in the future. But for now, pulseaudio is it. The wiki has several
obsolete bluez4 references so beware of any Google searches on these problems that date from more than
a year ago.
bluez 5.13-1
pulseaudio 4.0-6
#23 2014-01-22 08:12:48
Re: Bluetooth audio paired but not connect?
For me, there is nothing reported in the journal, and my headset does not work with bluez5. I also have x86_64 arch, bluez 5-14-1 and pulseaudio 4.0.6
I confirm that it works with bluez4, so I guess it must depend on the type of hardware.
Requesting information .
BD Address: 00:0C:55:1C:CD:DA
OUI Company: Microlink Communications Inc. (00-0C-55)
Device Name: Motorola H500
LMP Version: 1.2 (0x2) LMP Subversion: 0x886
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xfc 0xfe 0x0f 0x00 0x08 0x08 0x00 0x00
#24 2014-01-28 01:33:54
Re: Bluetooth audio paired but not connect?
I’m chiming in in agreement with fdservices. It’s all in the hardware!
I have spent *days* trying to get the 2 or 3 headsets around my house (the latest being a Plantronics 330) working with my laptop, trying both Bluez4 and Bluez5 to no avail.
The wiki for Bluetooth Headsets, https://wiki.archlinux.org/index.php/Bl … dio_method, mentioned success with the SoundBot SB220. So I broke down and bought a pair. They arrived today. (Nice headsets, BTW!)
My last attempt at this madness had me trying bluez4 so I started there this evening.
I began with the wiki: https://wiki.archlinux.org/index.php/Bluez4 paying particular attention to https://wiki.archlinux.org/index.php/Bl … SA_devices and editing the /etc/asound.conf file per the wiki.
The command sequence was:
systemctl start bluetooth
hcitool scan # To get the Mac address of my new headset
bluez-simple-agent # Ctrl-C to exit after the agent is registered. Ignore the error messages.
bluez-simple-agent hci0 FC:58:FA:C6:49:B3 # pairing the SoundBot
(Enter 0000 passkey)
bt-audio -c FC:58:FA:C6:49:B3 # as normal user to connect
Then a quick trip to alsamixer to make sure there weren’t any muted outputs. (This is a big gotcha. For some reason, probably due to all the tinkering around, some of the outputs continually get muted even though I have unmuted them numerous times before. Also, beware of outputs that have their volume set to max or 80%, etc. but are nonetheless muted as evidenced by the «MM» in the box below the volume scale. Click «m» to unmute them.)
This proved to be sufficient to get the new headset working with Google Talk, the primary reason for my messing with bluetooth in the first place. Happily, the SB220 was one of the options in both the «Microphone» and «Speakers» drop down boxes in «Chat» settings. Selected the SB220 in both boxes, successfully tested the mike and and headset and I’m finally back to making long distance phone calls with my laptop. Yay!
Back to my laptop only to discover that music played with mplayer wasn’t streaming to the headset
I installed bluez-tools which changed the /etc/asound.conf file but happily got my headset listed in pavucontrol. In the «Output devices» tab I had to click the green check mark to activate the headset whereupon «mplayer some.mp3» streamed music to my headset!!
I *might* get around to testing this with bluez5 but having gotten this far, I’m not inclined to fix something that isn’t broken.
The moral of this story is the choice of bluetooth headset/hardware makes all the difference. At least it did for me.
Perhaps we should start a list of compatible bluetooth headsets in the wiki? There is clearly a big interest in this topic considering the well over 4,400 views of this thread alone.
Источник
В ходе реализации проектов на плате Intel Edison иногда возникает необходимость воспроизвести звук. В последних версиях образа Yocto добавлена поддержка Alsa, и можно воспользоваться USB аудиокартой. Но большую мобильность даст использование встроенного Bluetooth модуля. Например, устройство на базе Intel Edison, которое получает аудиофайлы по сети, может находиться стационарно в одном месте в комнате. Слушать же музыку можно в любой точке помещения, используя обычные беспроводные наушники. Итак, начнём.
Вам понадобятся
- Звуковое Bluetooth устройство, например, наушники или колонки.
- Подключенная к WiFi сети плата Intel Edison. (Смотрите Step 3: Get your Board Online).
- Компьютер с музыкальными wav файлами, расположенный в нашей сетке.
- Установленное терминальное соединение с платой через последовательный порт (Смотрите Set Up WiFi – Intel Edison) или SSH.
Настройка
Включите ваше Bluetooth устройство и сделайте его видимым. Введите следующие команды в терминале:
rfkill unblock bluetooth
bluetoothctl
Просканируйте доступные Bluetooth устройства:
scan on
Найдите ваше устройство и присоединитесь к нему (подставив его MAC адрес):
pair 00:25:DB:05:72:F2
Установите соединение, если необходимо:
connect 00:25:DB:05:72:F2
Закройте программу bluetoothctl:
quit
Проверьте, что ваше A2DP устройство (в нашем случае наушники LG) распознались в pulseaudio как sink-устройство и его имя начинается с bluez_sink
pactl list sinks
Сконфигурируйте дефолтный sink для использования в pulseaudio следующими командами, подставив параметры вашего устройства:
pactl set-default-sink bluez_sink.00_25_DB_05_72_F2
Скопируйте аудио файл в формате wav на плату Intel Edison, используя scp (Linux) или pscp.exe (Windows) и проиграйте его через mplayer:
mplayer Intel_bong.wav2
Используйте wav файлы, так как могут быть некоторые сложности при проигрывании mp3 файлов.
Устранение проблем
Если вы получили:
Failed to pair: org.bluez.Error.AlreadyExists
Проверьте, какое устройство у вас подключено:
paired-devices
Удалите устройство, к которому вы подключены (подставьте MAC-адрес вашего устройства):
remove 78:24:AF:13:58:B9
Другие полезные команды bluetoothctl можно получить так:
help
Дополнительная информация
- Потоковое вещание по сети или через конвейер
От переводчика
При проверке этой статьи у меня возникли некоторые проблемы. Устройство не получалось подсоединить командой connect, не было команды pactl. Плата Edison была прямо из коробки, поэтому всё это решилось перепрошивкой новой версией образа Yocto.
Чтобы перепрошить плату, можно воспользоваться следующей рекомендацией. Я сделал немного по-другому в Windows.
В папке с распакованным архивом Yocto на Windows компьютере запускаем flashall.bat. Возможно, еще понадобится программа dfu-util.exe, которую надо поместить в эту же распакованную папку. Сама программа доступна по ссылке.
Обсуждение dfu-util под Windows и перепрошивку Edison можно найти тут и тут.
Читайте также:
» Практикум «Intel IoT». Edison — могучая «кроха»
-
johann_strauss
- Posts: 8
- Joined: Sun Mar 14, 2021 1:10 pm
Failed to connect: org.bluez.Error.Failed
I have a vanilla Raspberry OS installation.
My HDMI monitor has no audio.
I tried to connect JBL Flip 4 — error (please see below)
I tried to connect Google Home Mini — same error
I have tried all possible options also suggested here, but to no avail:
viewtopic.php?f=28&t=275273
What is wrong?
When I right-click on the Volume Control, I can only select HDMI or Device Profiles, and there is no Bluetooth-connected JBL Flip 4 nor Google Home Mini.
Many thanks for your support!
Code: Select all
i@pi400:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@pi400:~ $ uname -a
Linux pi400 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux
pi@pi400:~ $ sudo apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
pi@pi400:~ $ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@pi400:~ $
Code: Select all
pi@pi400:~ $ bluetoothctl
Agent registered
[bluetooth]# devices
Device 30:C0:1B:2E:2F:AB JBL Flip 4
Device 00:F6:20:8A:2F:12 Kitchen speaker
[bluetooth]# connect 30:C0:1B:2E:2F:AB
Attempting to connect to 30:C0:1B:2E:2F:AB
Failed to connect: org.bluez.Error.Failed
[bluetooth]# connect 00:F6:20:8A:2F:12
Attempting to connect to 00:F6:20:8A:2F:12
Failed to connect: org.bluez.Error.Failed
[bluetooth]# info 00:F6:20:8A:2F:12
Device 00:F6:20:8A:2F:12 (public)
Name: Kitchen speaker
Alias: Kitchen speaker
Class: 0x00240400
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
bluetooth]# info 30:C0:1B:2E:2F:AB
Device 30:C0:1B:2E:2F:AB (public)
Name: JBL Flip 4
Alias: JBL Flip 4
Class: 0x00240414
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
Modalias: bluetooth:v000ApFFFFdFFFF
-
amoun
- Posts: 17
- Joined: Tue Oct 27, 2020 7:25 pm
- Location: Cornwall, UK
Re: Failed to connect: org.bluez.Error.Failed
Sun Mar 14, 2021 7:36 pm
Hi I have the same problem since I removed some pulse audio packages as pulse audio stopped Firefox from playing audio. Reinstalling pulse audio did not bring back the option to send audio over the bluetooth connection. So although my speaker is ‘connected’ it doesn’t work. The terminal outputs are the same as yours.s
Still looking into it.
All the best
-
amoun
- Posts: 17
- Joined: Tue Oct 27, 2020 7:25 pm
- Location: Cornwall, UK
Re: Failed to connect: org.bluez.Error.Failed
Sun Mar 14, 2021 8:11 pm
Looking into the fact that LegacyPairing is not enabled
pi@raspberrypi:~ $ bluetoothctl
Agent registered
[bluetooth]# connect 40:EF:4C:CC:AD:55
Attempting to connect to 40:EF:4C:CC:AD:55
Failed to connect: org.bluez.Error.Failed
[bluetooth]# info 40:EF:4C:CC:AD:55
Device 40:EF:4C:CC:AD:55 (public)
Name: Bag of Riddim II
Alias: Bag of Riddim II
Class: 0x00240414
Icon: audio-card
Paired: 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)
-
johann_strauss
- Posts: 8
- Joined: Sun Mar 14, 2021 1:10 pm
Re: Failed to connect: org.bluez.Error.Failed
Sun Mar 14, 2021 8:32 pm
I will give it a try.
On Ubuntu, the same device is paired without LegacyPairing and connects immediately:
Code: Select all
johann@arthur:~$ uname -a
Linux arthur 5.4.0-66-generic #74~18.04.2-Ubuntu SMP Fri Feb 5 11:17:31 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
johann@arthur:~$ bluetoothctl
[NEW] Controller FC:44:82:3B:B0:6D arthur [default]
[NEW] Device 30:C0:1B:2E:2F:AB JBL Flip 4
Agent registered
[bluetooth]# info 30:C0:1B:2E:2F:AB
Device 30:C0:1B:2E:2F:AB (public)
Name: JBL Flip 4
Alias: JBL Flip 4
Class: 0x00240414
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-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)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
Modalias: bluetooth:v000ApFFFFdFFFF
[CHG] Device 30:C0:1B:2E:2F:AB Connected: yes
[JBL Flip 4]#
-
amoun
- Posts: 17
- Joined: Tue Oct 27, 2020 7:25 pm
- Location: Cornwall, UK
Re: Failed to connect: org.bluez.Error.Failed
Sun Mar 14, 2021 8:49 pm
I didn’t even understand it enough to get to enabling it. Is you bluetooth on the rasp-pi and ubuntu using the same hardware/firmware etc
-
amoun
- Posts: 17
- Joined: Tue Oct 27, 2020 7:25 pm
- Location: Cornwall, UK
Re: Failed to connect: org.bluez.Error.Failed
Sun Mar 14, 2021 10:52 pm
I had this idea that there may be interference from the wifi as I use 2.4GHz which is close to the Bluetooth
I switched off wifi and it connects ~ I can use 5GHz for wifi but it doesn’t have such a good range ~ I may try fiddling with the 2.4GHz channels.
However I was messing with the audio setup and lost the option to send the audio to the speaker ~ I used to have a different menu that gave HDMI or Speaker ???
-
amoun
- Posts: 17
- Joined: Tue Oct 27, 2020 7:25 pm
- Location: Cornwall, UK
-
johann_strauss
- Posts: 8
- Joined: Sun Mar 14, 2021 1:10 pm
Re: Failed to connect: org.bluez.Error.Failed
Mon Mar 15, 2021 8:06 pm
Legacy Pairing:
This is the only method available in Bluetooth v2.0 and before. Each device must enter a PIN code; pairing is only successful if both devices enter the same PIN code
I am not sure about this one, I will not be able to type in any PIN code on my JBL Flip 4 speaker.
-
johann_strauss
- Posts: 8
- Joined: Sun Mar 14, 2021 1:10 pm
Re: Failed to connect: org.bluez.Error.Failed
Mon Mar 15, 2021 8:28 pm
Removed all devices and followed the instructions, rebooted:
Code: Select all
pi@pi400:~ $ groups
pi adm lp dialout cdrom sudo audio video plugdev games users input netdev lpadmin gpio i2c spi
Code: Select all
pi@pi400:~ $ ps aux | grep pulse
pi 682 0.0 0.2 358540 8616 ? S<sl 21:17 0:00 /usr/bin/pulseaudio --daemonize=no
pi 1520 0.0 0.0 7348 580 pts/0 S+ 21:24 0:00 grep --color=auto pulse
Code: Select all
pi@pi400:~ $ sudo bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# devices
[bluetooth]# scan on
Discovery started
[CHG] Controller E4:5F:01:05:93:E5 Discovering: yes
[NEW] Device 4D:3D:8B:67:43:00 4D-3D-8B-67-43-00
[NEW] Device 02:37:E2:AD:4E:EB 02-37-E2-AD-4E-EB
[NEW] Device F0:99:19:3B:D4:BB F0-99-19-3B-D4-BB
[NEW] Device 08:66:98:BA:B5:D1 08-66-98-BA-B5-D1
[NEW] Device 69:97:46:D3:C4:12 69-97-46-D3-C4-12
[NEW] Device 4B:BE:43:E4:12:28 4B-BE-43-E4-12-28
[NEW] Device 30:C0:1B:2E:2F:AB JBL Flip 4
[bluetooth]# trust 30:C0:1B:2E:2F:AB
[CHG] Device 30:C0:1B:2E:2F:AB Trusted: yes
Changing 30:C0:1B:2E:2F:AB trust succeeded
[bluetooth]# pair 30:C0:1B:2E:2F:AB
Attempting to pair with 30:C0:1B:2E:2F:AB
[CHG] Device 30:C0:1B:2E:2F:AB Connected: yes
[CHG] Device 30:C0:1B:2E:2F:AB Connected: no
[bluetooth]# connect 30:C0:1B:2E:2F:AB
Attempting to connect to 30:C0:1B:2E:2F:AB
Failed to connect: org.bluez.Error.Failed
[NEW] Device 57:99:82:BA:81:84 57-99-82-BA-81-84
[CHG] Device 57:99:82:BA:81:84 ManufacturerData Key: 0x004c
[CHG] Device 57:99:82:BA:81:84 ManufacturerData Value:
10 06 10 1a 32 62 4c a8 ....2bL.
[CHG] Device F0:99:19:3B:D4:BB RSSI: -89
[CHG] Device F0:99:19:3B:D4:BB RSSI: -77
[NEW] Device 4D:5E:75:01:A8:2E 4D-5E-75-01-A8-2E
[bluetooth]# connect 30:C0:1B:2E:2F:AB
Attempting to connect to 30:C0:1B:2E:2F:AB
Failed to connect: org.bluez.Error.Failed
It’s only shortly connected after pairing, then immediately disconnects.
-
johann_strauss
- Posts: 8
- Joined: Sun Mar 14, 2021 1:10 pm
Re: Failed to connect: org.bluez.Error.Failed
Mon Mar 15, 2021 8:39 pm
Tried again and again. It briefly connects after pairing. Then the white led stops blinking and stays on.
Code: Select all
pi@pi400:~ $ pulseaudio --verbose --start
N: [pulseaudio] main.c: User-configured server at {b9e11b12b49248988c54de6784db6e5c}unix:/run/user/1000/pulse/native, which appears to be local. Probing deeper.
I: [pulseaudio] main.c: Daemon startup successful.
pi@pi400:~ $ sudo bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller E4:5F:01:05:93:E5 Discovering: yes
[NEW] Device 60:F6:06:74:4F:82 60-F6-06-74-4F-82
[NEW] Device 57:99:82:BA:81:84 57-99-82-BA-81-84
[NEW] Device F0:99:19:3B:D4:BB F0-99-19-3B-D4-BB
[NEW] Device 02:37:E2:AD:4E:EB 02-37-E2-AD-4E-EB
[NEW] Device 08:66:98:BA:B5:D1 08-66-98-BA-B5-D1
[NEW] Device 66:BD:00:1D:24:15 66-BD-00-1D-24-15
[NEW] Device 30:C0:1B:2E:2F:AB JBL Flip 4
[bluetooth]# trust 30:C0:1B:2E:2F:AB
[CHG] Device 30:C0:1B:2E:2F:AB Trusted: yes
Changing 30:C0:1B:2E:2F:AB trust succeeded
[NEW] Device 69:D1:B1:D4:20:8E 69-D1-B1-D4-20-8E
[bluetooth]# pair 30:C0:1B:2E:2F:AB
Attempting to pair with 30:C0:1B:2E:2F:AB
[CHG] Device 30:C0:1B:2E:2F:AB Connected: yes
[CHG] Device 30:C0:1B:2E:2F:AB Connected: no
Last edited by johann_strauss on Mon Mar 15, 2021 8:45 pm, edited 1 time in total.
-
johann_strauss
- Posts: 8
- Joined: Sun Mar 14, 2021 1:10 pm
Re: Failed to connect: org.bluez.Error.Failed
Mon Mar 15, 2021 8:44 pm
But doesn’t appear to be paired:
Code: Select all
[bluetooth]# paired-devices
[bluetooth]# info 30:C0:1B:2E:2F:AB
Device 30:C0:1B:2E:2F:AB (public)
Name: JBL Flip 4
Alias: JBL Flip 4
Class: 0x00240414
Icon: audio-card
Paired: no
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Cont.. (0000110f-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
UUID: Headset HS (00001131-0000-1000-8000-00805f9b34fb)
Modalias: bluetooth:v000ApFFFFdFFFF
RSSI: -26
TxPower: 8
Code: Select all
[bluetooth]# pair 30:C0:1B:2E:2F:AB
Attempting to pair with 30:C0:1B:2E:2F:AB
Failed to pair: org.bluez.Error.AlreadyExists
[bluetooth]#
-
johann_strauss
- Posts: 8
- Joined: Sun Mar 14, 2021 1:10 pm
Re: Failed to connect: org.bluez.Error.Failed
Mon Mar 15, 2021 8:57 pm
After reboot, when I try to connect through GUI:
Connect Device:
Connection failed — no usable services on this device.
Code: Select all
pi@pi400:~ $ bluetoothctl
Agent registered
[bluetooth]# paired-devices
Device 30:C0:1B:2E:2F:AB JBL Flip 4
[bluetooth]#
-
headsettrouble
- Posts: 6
- Joined: Fri Mar 19, 2021 7:55 pm
Re: Failed to connect: org.bluez.Error.Failed
Sat Mar 20, 2021 7:57 am
johann_strauss wrote: ↑
Mon Mar 15, 2021 8:57 pm
After reboot: Connection failed — no usable services on this device.
Restart bluetoothd (e.g. by running «sudo /etc/init.d/bluetooth restart»).
It will work then. At latest when you have powered off and on your bluetooth device afterwards.
I have the exact same problem and would love to know a fix why it does not work directly after the initial boot.
-
tomaszeW
- Posts: 1
- Joined: Wed Mar 31, 2021 8:37 pm
Re: Failed to connect: org.bluez.Error.Failed
Wed Mar 31, 2021 8:57 pm
I have a similar problem with pi4, exactly when connecting ps3 controller to retropie
What I noticed is: (it may be helpful)
before bluetoothd restart commands:
Gives Mac address like:
E4:5F:01:XX:XX:XX
after restart
the same commands give:
B8:27:EB:9D:XX:XX
What is interesting the command:
always returns correct address:
hci0: B8:27:EB:9D:XX:XX
After restart everything works like a charm….
I think the initial MAC Address is somehow incorrect
Code: Select all
pi@retropie:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Last edited by tomaszeW on Wed Mar 31, 2021 9:08 pm, edited 1 time in total.
-
evancg
- Posts: 2
- Joined: Mon Apr 05, 2021 4:55 am
Re: Failed to connect: org.bluez.Error.Failed
Mon Apr 05, 2021 5:00 am
I have this same issue with a Pi 4 with a Dualshock or basically ANY bluetooth device. The changing MAC address happens to me too. On boot it’s:
Controller E4:5F:01:09:8F:54 and Bluetooth just fails. Nothing can connect at all. It’s a mess.
After a quick sudo systemctl restart bluetooth.service and bluetoothctl list, it shows
Controller B8:27:EB:91:7E:CF and Bluetooth works.
Any suggestions on what might be going on?
-
evancg
- Posts: 2
- Joined: Mon Apr 05, 2021 4:55 am
Re: Failed to connect: org.bluez.Error.Failed
Mon Apr 05, 2021 1:41 pm
Quick addition to my prior post — Restarting bluetooth.service doesn’t always fix it — it seems more likely that just restarting bluetooth gives it a chance to get the right MAC address (which is why sometimes it always works on a reboot).
-
Bi-Doux
- Posts: 3
- Joined: Mon Jan 18, 2021 11:16 pm
Re: Failed to connect: org.bluez.Error.Failed
Thu Apr 15, 2021 4:52 pm
evancg wrote: ↑
Mon Apr 05, 2021 1:41 pm
Quick addition to my prior post — Restarting bluetooth.service doesn’t always fix it — it seems more likely that just restarting bluetooth gives it a chance to get the right MAC address (which is why sometimes it always works on a reboot).
Same recurring error but as far as I am concerned, restarting bluetooth.service NEVER fix it. Since one of last year update of firmware, I am unable to use bluetooth with my RPI 4B.
-
Longrower
- Posts: 2
- Joined: Tue Apr 20, 2021 11:58 am
Re: Failed to connect: org.bluez.Error.Failed
Tue Apr 20, 2021 4:02 pm
The sudo Bluetooth restart is the only thing that’s worked for me thus far.
GUI Bluetooth On/Off doesn’t work, system restart doesn’t work. Bluetooth is Fubar after I shut down and power back on. Mine’s a new RPi 4b with stock OS install via NOOB.
-
piersw
- Posts: 9
- Joined: Wed Dec 30, 2020 10:02 pm
- Location: Cambridge, UK.
Re: Failed to connect: org.bluez.Error.Failed
Tue Apr 20, 2021 5:56 pm
I’m getting this on a friend’s Raspberry Pi 400 — it works fine on my Pi 400. I managed once to pair it by following all the steps in the other thread (powering it on, default-agent, scan, trust, pair, connect…), but that’s not at all practical for a kid’s computer.
The curious thing is it seems to be a hardware problem. If I use either their or my SD card in my Pi 400 I can pair. If I use their or my SD card in their Pi 400, I get the various error messages.
Both SD cards are (now) up-to-date with apt-get, and both were Pi 400 installs of Raspberry Pi OS (as opposed to an upgrade from an earlier OS).
-
piersw
- Posts: 9
- Joined: Wed Dec 30, 2020 10:02 pm
- Location: Cambridge, UK.
Re: Failed to connect: org.bluez.Error.Failed
Tue Apr 20, 2021 6:09 pm
I’ve also had occasional success with restarting the bluetooth.service. The address changes from E4:5F:01:13:BE:6D to B8:27:EB:F9:19:77 and then pairing, connecting and audio works flawlessly (as it always has on my Pi 400).
-
piersw
- Posts: 9
- Joined: Wed Dec 30, 2020 10:02 pm
- Location: Cambridge, UK.
Re: Failed to connect: org.bluez.Error.Failed
Wed Apr 21, 2021 9:34 am
Given the computer is for a friend’s 6 year old I guess the best option is to return it for a swap?
She obviously can’t be expected to type in any commands to get bluetooth working, and I’m nervous that if I modify the startup scripts it will go wrong on the next OS update.
-
piersw
- Posts: 9
- Joined: Wed Dec 30, 2020 10:02 pm
- Location: Cambridge, UK.
Re: Failed to connect: org.bluez.Error.Failed
Fri May 07, 2021 2:05 pm
The Pi 400 has been replaced, and it still has exactly the same behaviour.
I’m stumped — it seems some other people have the same problem. But, more importantly, it does seem to be a hardware problem because Bluetooth works on my Pi 400 using the SD cards (plural) that fail to work on the other Pi 400s.
Given the replacement came from the same shop, could it really be a dodgy batch?
-
jamesh
- Raspberry Pi Engineer & Forum Moderator
- Posts: 32176
- Joined: Sat Jul 30, 2011 7:41 pm
Re: Failed to connect: org.bluez.Error.Failed
Fri May 07, 2021 3:16 pm
piersw wrote: ↑
Fri May 07, 2021 2:05 pm
The Pi 400 has been replaced, and it still has exactly the same behaviour.I’m stumped — it seems some other people have the same problem. But, more importantly, it does seem to be a hardware problem because Bluetooth works on my Pi 400 using the SD cards (plural) that fail to work on the other Pi 400s.
Given the replacement came from the same shop, could it really be a dodgy batch?
Hi Piers,
We have had a few reports on this, but have not been able to replicate in house. Since you are in Cambridge, would it be possible to get hold of this failing one so we can investigate?
James
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
-
piersw
- Posts: 9
- Joined: Wed Dec 30, 2020 10:02 pm
- Location: Cambridge, UK.
Re: Failed to connect: org.bluez.Error.Failed
Fri May 07, 2021 3:33 pm
Yeah, that’s easy — I can easily drop it off somewhere central (Hills Rd?). Want to email me and we can arrange? (can you get my email from the forum?)
Thanks.
Return to “Raspberry Pi 400”
I’m chiming in in agreement with fdservices. It’s all in the hardware!
I have spent *days* trying to get the 2 or 3 headsets around my house (the latest being a Plantronics 330) working with my laptop, trying both Bluez4 and Bluez5 to no avail.
The wiki for Bluetooth Headsets, https://wiki.archlinux.org/index.php/Bl … dio_method, mentioned success with the SoundBot SB220. So I broke down and bought a pair. They arrived today. (Nice headsets, BTW!)
My last attempt at this madness had me trying bluez4 so I started there this evening.
I began with the wiki: https://wiki.archlinux.org/index.php/Bluez4 paying particular attention to https://wiki.archlinux.org/index.php/Bl … SA_devices and editing the /etc/asound.conf file per the wiki.
The command sequence was:
systemctl start bluetooth
hcitool scan # To get the Mac address of my new headset
bluez-simple-agent # Ctrl-C to exit after the agent is registered. Ignore the error messages.
bluez-simple-agent hci0 FC:58:FA:C6:49:B3 # pairing the SoundBot
(Enter 0000 passkey)
bt-audio -c FC:58:FA:C6:49:B3 # as normal user to connect
It connected!!!
Then a quick trip to alsamixer to make sure there weren’t any muted outputs. (This is a big gotcha. For some reason, probably due to all the tinkering around, some of the outputs continually get muted even though I have unmuted them numerous times before. Also, beware of outputs that have their volume set to max or 80%, etc. but are nonetheless muted as evidenced by the «MM» in the box below the volume scale. Click «m» to unmute them.)
This proved to be sufficient to get the new headset working with Google Talk, the primary reason for my messing with bluetooth in the first place. Happily, the SB220 was one of the options in both the «Microphone» and «Speakers» drop down boxes in «Chat» settings. Selected the SB220 in both boxes, successfully tested the mike and and headset and I’m finally back to making long distance phone calls with my laptop. Yay!
Back to my laptop only to discover that music played with mplayer wasn’t streaming to the headset
So another trip to the wiki and this section: https://wiki.archlinux.org/index.php/Bl … om_the_AUR
I installed bluez-tools which changed the /etc/asound.conf file but happily got my headset listed in pavucontrol. In the «Output devices» tab I had to click the green check mark to activate the headset whereupon «mplayer some.mp3» streamed music to my headset!!
I *might* get around to testing this with bluez5 but having gotten this far, I’m not inclined to fix something that isn’t broken.
The moral of this story is the choice of bluetooth headset/hardware makes all the difference. At least it did for me.
Perhaps we should start a list of compatible bluetooth headsets in the wiki? There is clearly a big interest in this topic considering the well over 4,400 views of this thread alone.
Hope this helps someone.