Additional features of BlueZ for Android

With the BlueZ 5.21 release the support for Android is now fully comparable with Bluedroid. Using BlueZ for Android enables additional features on top of it.

When using Bluedroid, you get support for Bluetooth 4.0 core technology and for HFP 1.5, A2DP 1.2, AVRCP 1.3, PAN, HID, HDP, OPP, MAP, PBAP and GATT profiles.

With BlueZ for Android you get additional support for Bluetooth 4.1 core technology and upgraded profiles including HFP 1.6 + Wideband speech, A2DP 1.3, AVRCP 1.5 and MPS. It also provides full integration for aptX(R) high-quality low-latency codec from CSR (codec license not included).

This is significant upgrade of features that are additionally supported and fully integrated. BlueZ for Android is a real value add proposition.

For the Bluetooth qualification of Android, the full documentation of PICS, PIXIT and PTS instructions is available available. This makes qualification easy.

Release of BlueZ 5.21

Today is the day we celebrate our independence… from bluedroid :) This is the first BlueZ release that offers full feature parity as a drop-in replacement to what comes as part of Android by default. The biggest latest additions have been HID over GATT (HoG) and Health Device Profile (HDP) support. The development of the Android support is of course by no means over – we’ll continue improving it just like the rest of BlueZ – but the full set of features is now there. It’s also notable that for all of the supported features we have full qualification documentation, from needed PIXIT and PICS values to instructions on how to pass each test case with the PTS.

Besides Android related changes there are also fixes and other improvements throughout the tree. There were several HoG fixes to improve reconnections as well as fixes to bluetoothctl to allow using it for scripting.

An important detail of this release is that it supports several new features that are on their way to the 3.17 kernel (today testable e.g. with the bluetooth-next tree). Perhaps the most important one of these is LE passive scanning. When run on a kernel that supports it, instead of doing a kind of “fake” background scanning using the Start Discovery command, bluetoothd will now tell the kernel the relevant information and the kernel will then commence passive scanning for devices. This is particularly important since active scanning (triggered by Start Discovery) is both wasteful of resources and can cause interoperability issues with devices that use direct advertising (like several LE mice do).


Release of BlueZ 5.20

For non-Android related parts this is mostly a bug-fix release with minor fixes here and there as well as improved handling of PS3 controllers.

On the Android side we’ve now got improved support for GATT, HoG (HID over GATT) and the Multi Profile Specification. There is now also support for the A2DP aptX codec (however due to licensing the codec itself is not part of the source tree).


Release of BlueZ 5.19

A bit overdue, but very appropriate for the date, here is 5.19.

The release contains fixes to OBEX, AVRCP browsing, HID over GATT and handling of device unpaired events for dual-mode devices. There is also a fix to cleanly handle tools like bluetoothctl taking over the default agent role. Since there is no indication to the “normal” system default agent this would previously simply rob this property away without any way to know that this happened. From 5.19 onward bluetoothd maintains a stack of agents that have requested to be the default and will hand back the property to the next item in the stack when bluetoothctl (or some other tool) exits.

Besides these fixes we’ve got some new additions too:

  • User space based HID host implementation (for BR/EDR), to complement the kernel-side implementation
  • A reconnect-upon-linkloss policy for those profiles that need , such as HFP HF or an A2DP Sink. The list of remote UUIDs to try to reconnect to is also configurable through main.conf.
  • SCO over HCI support for Android (by default Android is designed with SCO over PCM routing in mind)
  • Audio quality control for Android
  • Support for a new Low Energy-only mode on Android


Release of BlueZ 5.18

This is mostly a bug fix release with issues fixed regarding LE single mode device detection and incorrect getpeername() calls which could have caused incorrect SDP records for profiles (mainly those using the Profile D-Bus interface with RFCOMM channel auto-allocation).

On the OBEX side we now have full OBEX authentication support, which is a fairly useless feature in practice but a mandatory one for qualification of some OBEX profiles. On the Android side the major feature addition this time is LE GATT client support.


BlueZ for Android status update

In past few months there has been significant amount of work put into supporting Android. This post outlines currently implemented features as well as other additions aimed at making BlueZ for Android integration as smooth as possible.

Android specifies the Bluetooth HAL and a number of profile HALs that shall be implemented by the Bluetooth stack. Each of the HALs is responsible for supporting one or more Bluetooth Profiles. The currently implemented HALs are:

  • bluetooth  – Generic Access Profile (GAP), Device ID Profile 1.3 (DID)
  • handsfree  – Headset Profile 1.2, Handsfree Profile 1.6 with Wideband Speech (HFP)
  • a2dp – Advanced Audio Distribution Profile 1.3 (A2DP)  and Audio/Video Remote Control Profile 1.0 (AVRCP)
  • socket – Phone Book Access Profile 1.1 (PBAP), Message Access Profile 1.1 (MAP), Object Push Profile 1.0 (OPP), RFCOMM
  • hidhost – Human Interface Device Profile 1.1 (HID)
  • avrcp – Audio/Video Remote Control Profile 1.5 (AVRCP)

Some profile’s optional functionality requires support from other Android components. For A2DP support media system (i.e. mediaserver) needs to use BlueZ provided audio.a2dp library. For Wideband Speech support in HFP it is required that BT chip assumes mSBC codec for transparent data.

Integration with Android system

Supported Android version is AOSP 4.4.2. Reference sources for Nexus 4 and Nexus 7 2013 with BlueZ integrated as replacement for default Bluetooth stack are provided at

Qualification documentation

Bluetooth qualification can be a tough process. To make it easier PTS PICS and PIXIT configurations for all supported profiles are provided. Those can be found in pics-*.txt and pixit-*.txt files in android folder. Tests results are also provided in pts-*.txt files. If test requires non-obvious preconditions or execution steps comments on those are also provided.

Future work

Future work includes support for Bluetooth Low Energy and Health Device Profile (health HAL). Low energy support is complex and requires implementation in multiple HALs. LE discovery and pairing (bluetooth HAL), GATT (gatt HAL) and HID over GATT (hidhost HAL) support.

Advanced Audio Distribution Profile

Release of BlueZ 5.17

This is mostly a bug fix release with issues fixed in OBEX, dual-mode device pairing, and LE related areas.

On the Android side a major new feature is Handsfree Profile 1.6 support, including Wideband Speech capability.


Release of BlueZ 5.16

Here’s 5.16. For the most part it’s a bug fix release with a couple of regressions fixed regarding the “Paired” property that had crept into 5.15. People using 5.15 are strongly recommended to upgrade because of these fixes. There is also a fix for HID over GATT (LE) device creation.

As far as new non-Android features are concerned this release supports the New Signature Resolving Key mgmt event which will make its debut in the 3.15 kernel release.

On the Android side by far the biggest feature addition is full support for A2DP 1.3 and AVRCP 1.5. Several other profiles, such as HFP and GATT have continued receiving a fair amount of patches as well, but they are not considered complete yet.