<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Acdw</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Acdw"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Acdw"/>
	<updated>2026-04-25T23:55:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Bluetooth&amp;diff=31869</id>
		<title>Bluetooth</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Bluetooth&amp;diff=31869"/>
		<updated>2025-12-24T05:36:11Z</updated>

		<summary type="html">&lt;p&gt;Acdw: Correct service -&amp;gt; rc-service&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://en.wikipedia.org/wiki/Bluetooth Bluetooth] is a standard for the short-range wireless interconnection of cellular phones, computers, and other electronic devices. [https://www.bluez.org/ BlueZ] is an implementation of the Bluetooth protocol stack for Linux, and it is provided by the {{Pkg|bluez}} package.&lt;br /&gt;
&lt;br /&gt;
This article describes the basic installation of Bluetooth controllers and devices.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Set up [[Include:Setup Device Manager|eudev]]&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Basic installation requires the Installation of {{Pkg|bluez}} package as follows:{{Cmd|# apk add {{Pkg|bluez}}}}&lt;br /&gt;
&lt;br /&gt;
Optionally install {{Pkg|bluez-deprecated}} if you need deprecated tools like &amp;lt;code&amp;gt;hcitool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== File transfer ===&lt;br /&gt;
&lt;br /&gt;
To enable bluetooth file transfer, [[Install]] the {{Pkg|openobex}} package.&lt;br /&gt;
&lt;br /&gt;
=== Front-ends ===&lt;br /&gt;
&lt;br /&gt;
There are several front-ends available:&lt;br /&gt;
&lt;br /&gt;
* The {{Pkg|bluez}} comes with the &amp;lt;code&amp;gt;bluetoothctl&amp;lt;/code&amp;gt; front-end&lt;br /&gt;
* {{Pkg|blueman}}: a full-featured Bluetooth manager&lt;br /&gt;
* {{Pkg|bluedevil}}: the [[KDE]] Bluetooth manager&lt;br /&gt;
* {{Pkg|bluetuith}}: simple text-based bluetooth management user interface&lt;br /&gt;
* {{Pkg|gnome-bluetooth}}: the [[GNOME]] Bluetooth manager&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Set up the bluetooth hardware first before connecting it to other devices. The steps involved are as follows:&lt;br /&gt;
&lt;br /&gt;
Load the &amp;lt;code&amp;gt;btusb&amp;lt;/code&amp;gt; kernel module: {{Cmd|# modprobe btusb}}&lt;br /&gt;
Add user &amp;lt;username&amp;gt; to the &amp;lt;code&amp;gt;lp&amp;lt;/code&amp;gt; group: {{Cmd|# adduser &amp;lt;username&amp;gt; lp}}&lt;br /&gt;
&lt;br /&gt;
=== Service configuration ===&lt;br /&gt;
&lt;br /&gt;
It is necessary to set up the {{ic|bluetooth}} service before proceeding further.&lt;br /&gt;
&lt;br /&gt;
Use standard &#039;&#039;&#039;start|stop|restart&#039;&#039;&#039; [[OpenRC]] command to start the {{ic|bluetooth}} service immediately: {{Cmd|# rc-service bluetooth start}}&lt;br /&gt;
Add the {{ic|bluetooth}} service to start during every boot: {{Cmd|# rc-update add bluetooth default}}&lt;br /&gt;
&lt;br /&gt;
=== Verify the hardware ===&lt;br /&gt;
&lt;br /&gt;
Now, check the state of the Bluetooth radio transmitter using &amp;lt;code&amp;gt;rfkill&amp;lt;/code&amp;gt;: {{Cmd|$ rfkill list bluetooth}}&lt;br /&gt;
&lt;br /&gt;
It should return something similar to:&lt;br /&gt;
&lt;br /&gt;
 0: hci0: Bluetooth&lt;br /&gt;
         Soft blocked: no&lt;br /&gt;
         Hard blocked: no&lt;br /&gt;
&lt;br /&gt;
If the device is listed as blocked, it can be unblocked using the same tool: {{Cmd|# rfkill unblock bluetooth}}&lt;br /&gt;
&lt;br /&gt;
{{Note|It may be necessary to [[OpenRC|restart]] the Bluetooth service before continuing.}}&lt;br /&gt;
&lt;br /&gt;
=== Pairing with &amp;lt;code&amp;gt;bluetoothctl&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;bluetoothctl&amp;lt;/code&amp;gt; tool can be run both in interactive and non-interactive mode. The non-interactive commands can be issued from the shell by suffixing &amp;lt;Code&amp;gt;bluetoothctl&amp;lt;/Code&amp;gt; like {{ic|$ bluetoothctl list}} or {{ic|$ bluetoothctl power on}}. &lt;br /&gt;
&lt;br /&gt;
The example below shows step-by-step procedure to configure a bluetooth adapter in interactive mode. Begin by starting &amp;lt;code&amp;gt;bluetoothctl&amp;lt;/code&amp;gt; and follow these basic steps:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ bluetoothctl}}&lt;br /&gt;
&lt;br /&gt;
The prompt should display:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;#&lt;br /&gt;
&lt;br /&gt;
List the available controllers:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# list&lt;br /&gt;
&lt;br /&gt;
Display information about a controller:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# show &#039;&#039;controller_mac_address&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Set the default controller:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# select &#039;&#039;controller_mac_address&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Power on the controller:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# power on&lt;br /&gt;
&lt;br /&gt;
Enable the agent and set it as default:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# agent on&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# default-agent&lt;br /&gt;
&lt;br /&gt;
Set the controller as discoverable (temporarily for 3 minutes) and pairable:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# discoverable on&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# pairable on&lt;br /&gt;
&lt;br /&gt;
Scan for devices:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# scan on&lt;br /&gt;
&lt;br /&gt;
Put the device into pairing mode. This generally involves pressing a button or a combinations of buttons, usually for several seconds.&lt;br /&gt;
&lt;br /&gt;
Discover the device MAC address:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# devices&lt;br /&gt;
&lt;br /&gt;
Pair with the device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# pair &#039;&#039;device_mac_address&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Enter the PIN if prompted:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;[agent]&amp;lt;/span&amp;gt; PIN code: ####&lt;br /&gt;
&lt;br /&gt;
Trust the device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# trust &#039;&#039;device_mac_address&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Connect to the device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# connect &#039;&#039;device_mac_address&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Display information about the device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# info &#039;&#039;device_mac_address&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The device is now paired:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# quit&lt;br /&gt;
&lt;br /&gt;
=== Set adapter power state ===&lt;br /&gt;
&lt;br /&gt;
If you would like the adapter to not be automatically enabled (e.g. on a portable device where you wish to save battery), set &amp;lt;code&amp;gt;AutoEnable=false&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;/etc/bluetooth/main.conf&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;[Policy]&amp;lt;/code&amp;gt; section: {{Cat|/etc/bluetooth/main.conf|[Policy]&lt;br /&gt;
...&lt;br /&gt;
AutoEnable&amp;amp;#61;false&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
=== Battery Reporting ===&lt;br /&gt;
&lt;br /&gt;
An experimental feature can be enabled in order to report device battery level: {{Cat|/etc/bluetooth/main.conf|[General]&lt;br /&gt;
...&lt;br /&gt;
Experimental&amp;amp;#61;true&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
Due to the variety of available Bluetooth hardware it is possible that you receive errors while attempting to install, activate, or find your Bluetooth device.&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;No default controller available&amp;quot; error ===&lt;br /&gt;
&lt;br /&gt;
After having followed these instructions, or others, you run &amp;lt;code&amp;gt;bluetoothctl&amp;lt;/code&amp;gt; and encounter the following scenario:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# list&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;[bluetooth]&amp;lt;/span&amp;gt;# show&lt;br /&gt;
 No default controller available&lt;br /&gt;
&lt;br /&gt;
One possible solution is that you are missing firmware drivers.&lt;br /&gt;
&lt;br /&gt;
Try running the following command to discover the source of the issue: {{Cmd|# dmesg &amp;amp;#124; grep -i bluetooth &amp;amp;#124; grep -i firmware}}&lt;br /&gt;
&lt;br /&gt;
There are many firmware packages available that could likely solve the this problem (see {{Pkg|linux-firmware-*}}).&lt;br /&gt;
&lt;br /&gt;
Another possible solution is to install {{Pkg|hidapi}} and add load the module: {{Cmd|# apk add hidapi&lt;br /&gt;
&amp;amp;#35; modprobe uhid}}&lt;br /&gt;
&lt;br /&gt;
It may also be necessary to create configuration to load the uhid and btusb kernel modules on boot: {{Cmd|cat &amp;lt;&amp;lt;EOF &amp;gt; /etc/modules-load.d/uhid.conf&lt;br /&gt;
&amp;amp;#35;Load uhid kernel module:&lt;br /&gt;
uhid&lt;br /&gt;
EOF}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|cat &amp;lt;&amp;lt;EOF &amp;gt; /etc/modules-load.d/btusb.conf&lt;br /&gt;
&amp;amp;#35;Load btusb kernel module:&lt;br /&gt;
btusb&lt;br /&gt;
EOF}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;org.bluez.Error.NotAvailable br-connection-profile-unavailable&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The error &amp;lt;code&amp;gt;br-connection-profile-unavailable&amp;lt;/code&amp;gt; is sometimes produced when trying to connect a Bluetooth HID device but the &amp;lt;code&amp;gt;uhid&amp;lt;/code&amp;gt; kernel module is not loaded. HID devices include keyboards and the volume buttons on headphones (which are sometimes presented to the OS as a keyboard), mice, game controllers, alphanumeric displays, etc.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;uhid&amp;lt;/code&amp;gt; kernel module is required for USB HID devices with drivers that are implemented in userspace, when userspace HID support is enabled.&lt;br /&gt;
&lt;br /&gt;
Loading &amp;lt;code&amp;gt;uhid&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;modprobe&amp;lt;/code&amp;gt; after encountering this error does not always fix the problem.&lt;br /&gt;
&lt;br /&gt;
Try setting up &amp;lt;code&amp;gt;uhid&amp;lt;/code&amp;gt; to load at boot, and then rebooting: {{Cmd|# cat &amp;lt;&amp;lt;EOF &amp;gt; /etc/modules-load.d/uhid.conf&lt;br /&gt;
&amp;amp;#35;Load uhid kernel module:&lt;br /&gt;
uhid&lt;br /&gt;
EOF&lt;br /&gt;
&amp;amp;#35; reboot}}&lt;br /&gt;
&lt;br /&gt;
Alternatively, the userspace HID feature can be disabled entirely in favour of kernel HIDP drivers in &amp;lt;code&amp;gt;/etc/bluetooth/input.conf&amp;lt;/code&amp;gt;: {{Cmd|1=UserspaceHID=false}}&lt;br /&gt;
&lt;br /&gt;
If running [[PipeWire]], you may also try installing {{Pkg|pipewire-spa-bluez}} to see if that solves the issue.&lt;br /&gt;
&lt;br /&gt;
=== Unable to control Bluetooth speaker volume / Bluetooth output is muted (Pulseaudio) ===&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically switch audio output and volume control to last connected device.&lt;br /&gt;
&lt;br /&gt;
This can solve the problem of controlling the speaker volume when switching between Bluetooth devices.&lt;br /&gt;
&lt;br /&gt;
Append the following lines at the end of the {{Path|/etc/pulse/default.pa}}: {{Cat|/etc/pulse/default.pa|...&lt;br /&gt;
&amp;amp;#35;##Automatically switch audio to the most recently connected device (Bluetooth, HDMI, USB)&lt;br /&gt;
load-module module-switch-on-connect}}&lt;br /&gt;
&lt;br /&gt;
=== Failed to connect: org.bluez.Error.NotReady br-connection-adapter-not-powered ===&lt;br /&gt;
&lt;br /&gt;
The error code &amp;lt;code&amp;gt;Failed to connect: org.bluez.Error.NotReady br-connection-adapter-not-powered&amp;lt;/code&amp;gt; may appear after resuming from suspend. This error can be resolved by issuing the command:{{Cmd|$ bluetoothctl power on}}&lt;br /&gt;
&lt;br /&gt;
=== Failed to connect: org.bluez.Error.Failed br-connection-unknown ===&lt;br /&gt;
&lt;br /&gt;
When trying to connect to a bluetooth speaker, If you receive the following error message {{Cmd|$ bluetoothctl connect 88:C6:26:0A:7D:F1&lt;br /&gt;
Attempting to connect to 88:C6:26:0A:7D:F1&lt;br /&gt;
Failed to connect: org.bluez.Error.Failed br-connection-unknown}}  &lt;br /&gt;
Check the following {{Cmd|&amp;lt;nowiki&amp;gt;$ bluetoothctl info&lt;br /&gt;
Missing device address argument&lt;br /&gt;
DeviceSet (null) not available&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The above errors may appear after resuming from suspend. In such cases, resolve it by restarting {{ic|bluetooth}} service: {{Cmd|$ doas rc-service bluetooth restart}}&lt;br /&gt;
&lt;br /&gt;
=== dbus-daemon[2431]: [system] Rejected send message error name=&amp;quot;org.bluez.Profile1.Error.NotImplemented&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
 Jul 19 20:54:59 homepc2 auth.notice dbus-daemon[2431]: [system] Rejected send message, 0 matched rules; type=&amp;quot;error&amp;quot;, sender=&amp;quot;:1.119&amp;quot; (uid=1000 pid=10213 comm=&amp;quot;/usr/bin/wireplumber&amp;quot;) interface=&amp;quot;(unset)&amp;quot; member=&amp;quot;(unset)&amp;quot; error name=&amp;quot;org.bluez.Profile1.Error.NotImplemented&amp;quot; requested_reply=&amp;quot;0&amp;quot; destination=&amp;quot;:1.661&amp;quot; (uid=0 pid=11828 comm=&amp;quot;/usr/lib/bluetooth/bluetoothd&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To make the above error message in {{path|/var/log/message}} to disappear, enable the following {{Cat|/etc/bluethooth/main.conf|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[General]&lt;br /&gt;
...&lt;br /&gt;
# Enables D-Bus experimental interfaces&lt;br /&gt;
# Possible values: true or false&lt;br /&gt;
Experimental = true&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[PulseAudio#Bluetooth|PulseAudio with Bluetooth]]&lt;br /&gt;
* [[PipeWire#Bluetooth_audio|PipeWire with Bluetooth]]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Bluetooth Bluetooth entry on PostmarketOS Wiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Bluetooth Bluetooth entry on Gentoo Wiki]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Bluetooth Bluetooth entry on ArchWiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Multimedia]]&lt;br /&gt;
[[Category:Hardware]]&lt;br /&gt;
[[Category:Sound]]&lt;br /&gt;
[[Category:Drivers]]&lt;/div&gt;</summary>
		<author><name>Acdw</name></author>
	</entry>
</feed>