Bluetooth: Difference between revisions
PureTryOut (talk | contribs) |
|||
Line 14: | Line 14: | ||
To use bluetooth headphones with pulseaudio, the package <code>pulseaudio-bluez</code> is required. | To use bluetooth headphones with pulseaudio, the package <code>pulseaudio-bluez</code> is required. | ||
== | == Supported Bluetooth Profiles == | ||
=== Audio/Video Remote Control Profile (AVRCP) === | === Audio/Video Remote Control Profile (AVRCP) === |
Revision as of 12:52, 7 April 2022
Bluetooth is a standard for the short-range wireless interconnection of cellular phones, computers, and other electronic devices. In Linux, the canonical implementation of the Bluetooth protocol stack is BlueZ.
Pairing
pinephone:~# service bluetooth start
pinephone:~# bluetoothctl
Agent registered
[CHG] Controller XX:XX:XX:XX:XX:XX Pairable: yes
[bluetooth]# scan on
[NEW] 00:11:22:33:44:55
[bluetooth]# pair 00:11:22:33:44:55
To use bluetooth headphones with pulseaudio, the package pulseaudio-bluez
is required.
Supported Bluetooth Profiles
Audio/Video Remote Control Profile (AVRCP)
To use media keys with Bluetooth, the mpris-proxy
command should be run. It needs access to Dbus.
mpris-proxy
is started at boot to enable AVRCP 1.5 support.
Advanced Audio Distribution Profile (A2DP)
PulseAudio and BlueZ handle together Bluetooth A2DP 1.3 support. PulseAudio must be installed for this. MR at pmaports: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/1804
PhoneBook Access Profile (PBAP)
BlueZ got PBAP 1.1 support recently in 5.63 with GNOME Evolution as backend. Currently, a MR is pending at Alpine to enable this feature: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29955
Object Push Profile (OPP)
OBEXd was enabled at boot to enable OPP 1.2 support for transfering and receiving files over Bluetooth. MR at pmaports: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/2245
Human Interface Device Profile (HID)
BlueZ provides the HID 1.0 profile to support mice and keyboards over Bluetooth. It is enabled by default.
Unsupported Bluetooth Profiles
Message Access Profile (MAP)
BlueZ has support for MAP 1.0 but does not have a backend which is compatible with any UI stack. The supported backends are from the old Nokia Maemo days.
Personal Area Network (PAN)
BlueZ supports PAN 1.0, but hasn't been tested or enabled in postmarketOS (yet).
Hands-Free Profile (HFP)
BlueZ and PulseAudio partly support HFP 1.6. Only the audio part is supported. Reporting battery levels from the AG to HF is unsupported and all cellular operations and status reporting is not supported (yet).
Other profiles
Bluetooth supports many other profiles, see https://www.bluetooth.com/specifications/ It is currently unknown if they are supported or not.
Troubleshooting
No default controller available
# modprobe -r btqcomsmd
# modprobe btqcomsmd
Failed to start discovery: org.bluez.Error.NotReady
or Failed to connect: org.bluez.Error.NotReady br-connection-adapter-not-powered
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller XX:XX:XX:XX:XX:XX Powered: yes
Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable
when connecting to a headset
# apk add bluez-alsa
# service bluealsa start
# bluetoothctl
[bluetooth]# connect 00:11:22:33:44:55
Attempting to connect 00:11:22:33:44:55
Connection successful
[CHG] Device 00:11:22:33:44:55 ServicesResolved: yes
Sources
- Supported Bluetooth profiles by Apple: https://support.apple.com/en-us/HT204387
- Supported Bluetooth profile by Android: https://source.android.com/devices/bluetooth/services