Tuesday, August 5, 2025

0

Bluetooth LE Audio on Raspberry Pi with BlueZ

 Summary

In this post I share my experience testing LE Audio (next generation Bluetooth audio broadcasting) on Raspberry Pi 5 with an external Bluetooth module and utilizing recent developments in BlueZ (Linux Bluetooth stack) and PipeWire (Linux multimedia framework) which brings the support for LE Audio

Raspberry Pi  - LE Audio Experimental Setup 

  •  Hardware

For this experiment I aimed for the Raspberry Pi due to its low cost. In addition I can run Linux with BlueZ on it for free and do not have to buy any software. I had already a Raspberry Pi 5 lying around which has an on-board RF module supporting both Bluetooth Low Energy and Bluetooth Classic. However, it only supports Bluetooth 5.0 and hence LE Audio was not available.

Then the search process started for a RF module which supports LE Audio and could run on the Pi. I came accross an interesting post on PipeWire wiki page providing info on LE Audio support. There the Intel AX210 was mentioned as an example Bluetooth adapter supporting LE Audio.

By doing more research on the Intel AX210, I found out that someone on YouTube already tested the Wifi functionality of the same module on the Raspberry Pi and it worked with the latest Linux kernel.

This motivated me to purchase the Intel AX210 module (costed me around 35 Euros) integrate it into my Raspberry Pi 5 and try to get the Bluetooth functionality to work. 

In order to connect the new RF module, I had to get a special PCIe M.2 adapter which supplies the RF module with power from the Pi along with PCIe and USB connections so Wifi and Bluetooth would work.

  • Software 

After assembling the required hardware components it was time to start the Pi and install required drivers and software to test the Bluetooth functionality with the new RF module. First I flashed the latest Raspbian OS version on the SD card of the Pi and enabled SSH for remote access.

After logging in to the Pi via SSH. I made sure that I am on the latest stable kernel by upgrading to the latest software. so simply running in bash terminal:

  • sudo apt update
  • sudo apt upgrade

Following the update process, I checked whether the new Bluetooth module is recognized on the USB interface by running: lsusb command and I found it listed which indicate that my hardware setup is correctly connected.

 The next step then was to make sure the Bluetooth driver (firmware) is available for the module to run. This was a bit tricky as the Intel firmware files were not available on the Raspbian OS distribution and had to download them manually from the Linux kernel repository and copy them to the required location on the Pi. In short I had to perform the following steps:

  • Download the Intel firmware files named: ibt-0041-0041.sfi , ibt-0041-0041.ddc

  • Create a directory named "intel" inside the /lib/firmware folder on the Pi

  • Copy the above downloaded files to the respective directory: 

    • sudo cp ibt-0041-0041.sfi /lib/firmware/intel

    • sudo cp ibt-0041-0041.ddc /lib/firmware/intel

  • Restart the Pi: sudo reboot now

After reboot, the Intel AX210 Bluetooth adapter is up and running!.

We can confirm that using the following command and reading the adapter status: hciconfig -a

Now that the Intel AX210 Bluetooth adapter is running with the Pi, we still need to install the latest version of BlueZ , PipeWire , WirePlumber  and configure them to test the LE Audio functionality. 

To do that, I simply built and installed those libraries from source (latest stable releases). You can find the build instructions on the respective libraries github repositories. At the time of making this post. I used the following versions: BlueZ 5.83, Pipewire 1.4.6 and WirePlumber 0.5.10.

  • Configuration & Testing

Following the assembly of hardware and installation of required software components, I needed to do some configurations for BlueZ and Wireplumber so LE Audio streaming would work.

For BlueZ, the following options need to be set in the "/etc/bluetooth/main.conf" file:

  • ControllerMode = le # use low energy mode

  • Experimental = true # enable experimental features

  • KernelExperimental = 6fbaf188-05e0-496a-9885-d6ddfdb4e03e # enable ISO sockets

For WirePlumber, I created a configuration file: "~/.config/wireplumber/wireplumber.conf.d/80-bluez-properties.conf" according to the wiki documentation to set the Bluetooth audio profiles. For LE Audio streaming: bap_sink needs to be available.

After performing the above configurations, I restarted the Pi and began testing !. 

For testing my goal was to stream audio from the Pi to a headset device supporting LE Audio. 

To do so I had to pair and connect my headset to the Pi via bluetoothctl (BlueZ interactive command lines tool)

From the above logs, you could see that the device is successfully paired and connected. In addtion, the controller (i.e: Intel AX210 Bluetooth adapter) discovers the UUID service: Published Audio Capabilities (00001850-0000-1000-8000-00805f9b34fb) which means LE Audio is supported and recognized by BlueZ!

After connection is successful with the headset, I see the following endpoints are registered which indicate that BlueZ recognizes the headset as an audio source and sink simulatenously. I can also see the same thing when checking available audio devices in the system.

To test audio streaming to the headset, I simply played a wav file to the target node of the headset and observed the status info in BlueZ:

pw-play -v --target "bluez_output.DE_AD_BE_EE_EE_EF.1" path/to/wav/file.wav

 Great now my Raspberry Pi is successfully streaming LE Audio. Goal accomplished !

References

https://www.bluetooth.com/learn-about-bluetooth/feature-enhancements/le-audio/

https://www.analog.com/en/resources/design-notes/the-basics-of-bluetooth-le-audio.html 

https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/LE-Audio-+-LC3-support

https://www.intel.com/content/www/us/en/products/docs/wireless/wi-fi-6e-ax210-module-brief.html 

0 comments:

Post a Comment