Hi,
I’ve been trying to get bluetooth to work on my Raspberrry Pi model 4B under Nixos (24.11) for some time, but am having no luck. I’m using this kernel param:
kernelParams = [ "console=tty0,115200n8" ];
together with these settings:
hardware = {
bluetooth.enable = true;
bluetooth.powerOnBoot = true;
enableRedistributableFirmware = true;
};
I set the kernel param because it appeared that Nixos was spawning a console on the same tty which apparently hosts bluetooth (ttyAMA0
).
bluetoothctl power on
gives No default controller available
and dmesg
shows
[ 13.596584] Bluetooth: hci0: command 0xfc18 tx timeout
[ 13.601881] Bluetooth: hci0: BCM: failed to write update baudrate (-110)
[ 13.608676] Bluetooth: hci0: Failed to set baudrate
[ 15.644618] Bluetooth: hci0: command 0xfc18 tx timeout
[ 15.650001] Bluetooth: hci0: BCM: Reset failed (-110)
[ 31.452582] Bluetooth: hci1: command 0x0c03 tx timeout
[ 31.457791] Bluetooth: hci1: BCM: Reset failed (-110)
There’s some history to this problem: NixOS on Raspberry Pi 4 Model B | bluetoothctl issue: No default controller available · Issue #123725 · NixOS/nixpkgs · GitHub
I’ve tried a bunch of things listed in this issue, but switching the tty had no effect and changing the kernel packages to the pi ones leads to an unbootable system.
I’d really appreciate any tips or tricks to get this to work, because it can: when I used to run the pi off of a home-assistant image bluetooth worked. I just need to find the right config.
The entire config is here: GitHub - mdirkse/akkad: NixOS configuration of my home automation system
Regards,
Maarten