I’m super new to NixOS, and this is something that I had issues setting up on other distros too, what I want to do is to enable Bluetooth LE audio connections and LC3 (or LC3+) codec support on Pipewire and Bluez:
Is it something that can be enabled through the NixOS config? Has someone managed to do so either through it or through workarounds? I’m running NixOS 24.05 with latest kernel (6.11) and unstable channel
1 Like
*NixOS, not nix. (I’m not being pedantic for its own sake, if you search “nix manual” you will literally get unhelpful results if you’re trying to configure the distro.)
Anyway, to answer your question: can you? yes, if you can do it on any other distro, it’s doable here. How easy is it? Well… if you look at the plethora of prerequisites, first off, do you have an adapter and device that even support it? And if so, then you’ll need to set the BT config as mentioned.
Luckily for you, LC3 support is enabled by default in the nixpkgs build of PW, so you don’t have to suffer through waiting for thousands of packages to rebuild:
Anyway please share what you tried first, or where you are stuck, and you will get better answers.
2 Likes
Thanks for the correction and the suggestions, I’ve edited the post to reflect the correct operating system.
do you have an adapter and device that even support it?
I have two pci cards supporting BLE, one from Intel (AX210) and the other from Mediatek (MT922), both are able to see the LE devices (a keyboard and a a pair of Creative earbuds) but can’t connect to the BLE interfaces, which works fine on an Android Phone. In both adapters, the output from btmgmt info
shows the correct flags.
Luckily for you, LC3 support is enabled by default in the nixpkgs build of PW
That’s great to know!
Anyway please share what you tried first, or where you are stuck, and you will get better answers.
Honestly, I don’t know how to approach this on NixOS, I could probably just edit /etc/bluetooth/main.conf
to include the settings on the guide and look for a kernel that already has the required patches, unless they’re on 6.11. I don’t have technical knowledge on the topic and there might be a “NixOS way” to approach this through the config file.
Use hardware.bluetooth.settings
instead
https://search.nixos.org/options?channel=24.05&show=hardware.bluetooth.settings&from=0&size=50&sort=relevance&type=packages&query=bluetooth
For example here you’d need at least
hardware.bluetooth = {
enable = true;
settings = {
General = {
ControllerMode = "le";
Experimental = true;
};
};
};
2 Likes
Thenk you,
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
ControllerMode = "le";
Experimental = true;
};
};
};
has made the devices pair as BLE but when trying to connect after pairing it just instantly disconnects with no messages on bluetoothctl, I suppose it can be due to the feature being experimental, I’ll rollback for now as with this enabled, normal mode doesn’t seem to work with the earbuds, the keyboard connects and works fine both ways. I really appreciate the help given