Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can’t connect a bluetooth headset #6985

Open
johackim opened this issue Mar 24, 2024 · 3 comments
Open

Can’t connect a bluetooth headset #6985

johackim opened this issue Mar 24, 2024 · 3 comments

Comments

@johackim
Copy link

johackim commented Mar 24, 2024

Creating a bug report/issue

[x] I have searched the existing open and closed issues

Required Information

  • DietPi version:
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=2
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
  • Distro version: bookworm 0
  • Kernel version: Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Architecture: arm64
  • SBC model: RPi 3 Model B (aarch64)
  • SD card used: SanDisk ultra

Steps to reproduce

  1. dietpi-config
  2. Advanced Options
  3. Bluetooth: [On]
  4. bluetoothctl scan on
  5. bluetoothctl pair DEVICE_ID
  6. bluetoothctl trust DEVICE_ID
  7. bluetoothctl connect DEVICE_ID

Expected behaviour

  • Successfully connecting my bluetooth headset (Bose QC45)

Actual behaviour

  • I can't connect my bluetooth headset (Bose QC45), I receive this bluetoothctl error: Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable

Extra details

  • The end goal is to use a bluetooth headset with kodi.
  • pulseaudio doesn't work with kodi but I can use pipewire instead.
  • In any cases, I can't use kodi with a bluetooth headset
@MichaIng
Copy link
Owner

MichaIng commented Apr 4, 2024

See here: #3456

Try this:

apt install bluez-alsa-utils
aplay -l
speaker-test -D bluealsa

I am not sure whether the bluealsa service does/tries binding to BT audio devices automatically or just allows manual binding, or is not related to this at all. Also probably a reboot is required, or unmuting the volume:

alsamixer -D bluealsa

When this BT audio PCM generally works, you can make it the default:

echo -e 'pcm.!default bluealsa\nctl.!default bluealsa' > /etc/asound.conf

@johackim
Copy link
Author

Thank you very much @MichaIng!

It works 😀!

However, I have to connect my Bluetooth headset before running Kodi, or exit Kodi to reconnect my Bluetooth headset if the connection is lost.

I can't autostart Kodi.

@MichaIng
Copy link
Owner

MichaIng commented May 1, 2024

Okay, so pairing still needs to be done manually. Somehow makes sense. I have not much experience with bluez, but wonder whether there is a native way to have it connecting to a particular device automatically (given that the device accepts it). Else, you could create a script for that and place it into /var/lib/dietpi/postboot.d to be executed automatically on boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants