bluez-phone manual


Image Types:
basesdk-amd64 / hmi-armhf / hmi-amd64 / sdk-amd64
Image Deployment:


Test all BlueZ features needing interaction with a phone (Pairing, OBEX, PBAP, AVRCP, A2DP, HSP, HFP, PAN). Strategic component: Bluetooth phone calls is part of smartphone interaction functionality.


  • A Bluetooth adapter (if you have two plugged, please remove one to avoid confusion)
  • A Bluetooth-enabled phone with a SIM card and a data plan. (

Pre Conditions

  1. From a PC, download and unpack the test data tarball from the gitlab test repository:
  2. $ wget
    $ tar -xvf bluez-phone.tar.gz
  3. Copy the bluez-phone-* folder to the target device:
  4. $ DUT_IP=<device-ip>
    $ scp -r bluez-phone-* user@$DUT_IP:
  5. Log into the target device:
  6. $ ssh user@$DUT_IP
  7. After log into the DUT, enter the test directory
  8. $ cd bluez-phone-*
  9. Note that the tarball may change depending on the release/branch being tested, please make sure to download the correct tarball for the release in question.
  10. If running the test on an SDK image, kill the blueman-applet process, as it prevents the test from installing its own pairing agent.
  11. When running the test on SabreLite boards using the headphone jack to check the audio output, the audio manager needs to be configured to route it accordingly as it defaults to the HDMI output:
  12. $ pactl set-default-sink alsa_output.platform-sound.stereo-fallback
    $ pactl set-sink-port alsa_output.platform-sound.stereo-fallback analog-output-headphones
  13. After reboot ensure that headphones will not be muted:
  14. $ pactl set-sink-mute alsa_output.platform-sound.stereo-fallback false

Execution Steps

  1. The phone must be in discoverable mode for starting this test. Look for the phone in this list, and save the BT address. It will be used while running the test.
  2. Execute the test suite inside an environment with dbus:
  3. $ ./
  4. There are some options:
  5. -a select which device you want to pair with (specify the address)

    -s skip pairing because the device is already paired. -a must be present when using this.

    -x enables test debugging (only useful if a test fails)

  6. Once the test begins, after Apertis finishes pairing with the phone, you must initiate pairing from the phone and do the pairing again as part of the test. You may need to unpair Apertis from within the phone first. The test will display the following message when that is required:
  7. Start a pairing from the phone! was it successful (y/n).

  8. After you've initiated the pairing from the phone, the test will continue.
  9. If the pairing fails from the test, try to do the pairing separately, and then run the test using './ -a <phone addr> -s'. To do a separate pairing: unpair the phone, and run 'bluetoothctl'. Then, in bluetoothctl prompt, issue the following commands in order: 'remove <phone addr>', 'discoverable on', 'agent off', 'agent NoInputNoOutput', 'default-agent'. The either 'pairable on' to pair from phone, or 'pair <phone addr>' to issue a pairing to the phone. '<phone addr>' is the phone address of the form 'a1:b2:c3:d4:e5:f6'.
  10. The next step is to initiate a file transfer from the phone. This can be done by sending a contact from the phone. The test will display the following message when that is required:
  11. Start an OPP transfer in the phone, was it successful? (y/n)

  12. After you’ve initiated the file transfer from the phone, the test will continue.


If PASSED is displayed, all of the test have passed. The output should be similar to that:


Selected /org/bluez/hci0

select_device: Discovering...

Device found: F0:39:42:86:2E:1B Charge 2

Device found: 88:83:22:2F:56:2A Galaxy A5 2016

Input device address: 88:83:22:2F:56:2A

Selected address: 88:83:22:2F:56:2A



Scanning in progress...

Pairing request to 88:83:22:2F:56:2A in progress...

Device found: /org/bluez/hci0/dev_88_83_22_2F_56_2A

Device 88_83_22_2F_56_2A is paired


Start a pairing from the phone! was it successful (y/n): 


Device found: /org/bluez/hci0/dev_88_83_22_2F_56_2A

Device 88_83_22_2F_56_2A is paired





./ 360: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or

kill -l [exitstatus]

Start an OPP transfer in the phone, was it successful? (y/n)





Play music from the device! Did you hear it (y/n): 



AV Remote Control Target

Headset Audio Gateway




NAP:service name 

Handsfree Audio Gateway


PBAP Phonebook Access PSE



Number of contacts: (uint16 119,)


Number of contacts: (uint16 87,)


Number of contacts: (uint16 321,)


Number of contacts: (uint16 92,)


Number of contacts: (uint16 500,)

MAP Message Access Server




Unknown profile '00001800-0000-1000-8000-00805f9b34fb',

Unknown profile '00001801-0000-1000-8000-00805f9b34fb']>,)


Transfer will start

(objectpath '/org/bluez/obex/client/session8/transfer56', {'Status': <'queued'>, 'Name': <'vcard.vcf'>, 'Size': <uint64 81>, 'Filename': <'/tmp/vcard.vcf'>, 'Session': <objectpath '/org/bluez/obex/client/session8'>})

Please ensure the transfer is received on the target, was it received? (y/n)



If FAILED is displayed, one of the test has failed and the test sequence is interrupted.

Some specific settings has to be enabled on the iPhone in order to make the MAP test pass. In Bluetooth > Settings, notifications must be enabled in the device specific screen. The notifications can only be enabled after the device is paired. The following procedure can be used. MAP test should pass after that:

1 - Run a first time: pair, run all tests, and let MAP test fail.

2 - Go to Settings > Bluetooth. In the device speficic screen, enable notifications.

3 - Run with the following options: -s -a <bluetooth address of target device>.


  • Errors most frequently occurs at pairing. This can be used to circumvent pairing problems, though this does not mean the test is a full pass, as the pairing is part of the test:
  • cd ~/bluez-phone-master

    armhf/bin/pair_two hci0 <bt address of the phone>

    ./ -a <address of the phone> -s