Bluetooth: Difference between revisions
imported>Makefu No edit summary |
imported>Mic92 No edit summary |
||
Line 1: | Line 1: | ||
== Bluetooth headsets with Pulseaudio == | == Bluetooth headsets with Pulseaudio == | ||
< | <syntaxHighlight lang="nix">{ | ||
hardware.pulseaudio = { | hardware.pulseaudio = { | ||
enable = true; | enable = true; | ||
Line 7: | Line 7: | ||
}; | }; | ||
hardware.bluetooth.enable = true; | hardware.bluetooth.enable = true; | ||
}</ | }</syntaxHighlight> | ||
After updating the configuration | After updating the configuration | ||
< | <syntaxHighlight class="bash">nixos-rebuild switch</syntaxHighlight> | ||
I had to restart the system for pulseaudio to load the bluetooth module. | I had to restart the system for pulseaudio to load the bluetooth module. | ||
Line 17: | Line 17: | ||
As I'm not using a desktop-manager I've configured the device from the command line following [https://wiki.archlinux.org/index.php/Bluetooth_Headset ArchLinux instructions] | As I'm not using a desktop-manager I've configured the device from the command line following [https://wiki.archlinux.org/index.php/Bluetooth_Headset ArchLinux instructions] | ||
< | <syntaxHighlight lang="bash">$ bluetoothctl | ||
[bluetooth] # power on | [bluetooth] # power on | ||
[bluetooth] # agent on | [bluetooth] # agent on | ||
Line 24: | Line 24: | ||
...put device in pairing mode and wait [hex-address] to appear here... | ...put device in pairing mode and wait [hex-address] to appear here... | ||
[bluetooth] # pair [hex-address] | [bluetooth] # pair [hex-address] | ||
[bluetooth] # connect [hex-address]</ | [bluetooth] # connect [hex-address]</syntaxHighlight> | ||
I've then played some audio and opened configured PulseAudio using pavucontrol. I changed the headset profile to "High Fidelity Playback (A2DP Sink)" for decent audio quality. | I've then played some audio and opened configured PulseAudio using pavucontrol. I changed the headset profile to "High Fidelity Playback (A2DP Sink)" for decent audio quality. | ||
Revision as of 07:39, 23 August 2017
Bluetooth headsets with Pulseaudio
{
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
};
hardware.bluetooth.enable = true;
}
After updating the configuration
nixos-rebuild switch
I had to restart the system for pulseaudio to load the bluetooth module.
pactl list
should show the bluetooth module.
As I'm not using a desktop-manager I've configured the device from the command line following ArchLinux instructions
$ bluetoothctl
[bluetooth] # power on
[bluetooth] # agent on
[bluetooth] # default-agent
[bluetooth] # scan on
...put device in pairing mode and wait [hex-address] to appear here...
[bluetooth] # pair [hex-address]
[bluetooth] # connect [hex-address]
I've then played some audio and opened configured PulseAudio using pavucontrol. I changed the headset profile to "High Fidelity Playback (A2DP Sink)" for decent audio quality.