NixOS on ARM/Raspberry Pi: Difference between revisions
imported>Mweinelt |
imported>Mweinelt Add bluetooth section |
||
| Line 226: | Line 226: | ||
If the Raspberry Pi downstream kernel is used the serial interface is named <code>serial0</code> instead. | If the Raspberry Pi downstream kernel is used the serial interface is named <code>serial0</code> instead. | ||
== Bluetooth == | |||
The bluetooth controller is by default connected to the UART device at <code>/dev/ttyAMA0</code> and needs to be enabled through <code>btattach</code>: | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ pkgs, ... }: | |||
{ | |||
systemd.services.btattach = { | |||
before = [ "bluetooth.service" ]; | |||
after = [ "dev-ttyAMA0.device" ]; | |||
wantedBy = [ "multi-user.target" ]; | |||
serviceConfig = { | |||
ExecStart = "${pkgs.bluez}/bin/btattach -B /dev/ttyAMA0 -P bcm -S 3000000"; | |||
}; | |||
}; | |||
} | |||
</nowiki>}} | |||
== Camera == | == Camera == | ||