bluez-hfp manual
medium
- Image Types:
- basesdk-amd64 / sdk-amd64 / target-armhf-internal / target-armhf / target-amd64
- Image Deployment:
- APT
- Type:
- functional
Description
Test Hands Free Profile (HFP) BlueZ feature.
Resources
- A Bluetooth adapter (if you have two plugged, please remove one to avoid confusion)
- A Bluetooth-enabled phone with a SIM card able to make and receive calls.
Pre Conditions
- Ensure Rootfs is remounted as read/write.
- Install dependencies
- Restart the system to restore the filesystem state to read-only before running the test.
- Please note that connman disables bluetooth by default on a fresh image.
- Enable device:
- When running the test on SabreLite boards using the headphone jack to check the audio output, PulseAudio needs to be configured to route it accordingly as it defaults to the HDMI output:
- After reboot ensure that headphones will not be muted:
$ sudo mount -o remount,rw /
$ sudo apt install chaiwala-tests python-dialog dialog python3-gi python3-dbus
$ sudo reboot
$ connmanctl enable bluetooth
$ pacmd set-default-sink alsa_output.platform-sound.stereo-fallback
$ pacmd set-sink-port alsa_output.platform-sound.stereo-fallback analog-output-headphones
$ pacmd set-sink-mute alsa_output.platform-sound.stereo-fallback false
Execution Steps
- Execute the test suite:
$ DISPLAY=:0 /usr/lib/chaiwala-tests/bluez/bluez-hfp
Expected
If FAILED is displayed, one of the test has failed. The output should be similar to that:
TEST STARTED: Pairing Initiatior
| Confiming passkey 805647 (/org/bluez/803/hci0/dev_78_47_1D_B3_6E_80)
TEST FINISHED: Pairing Initiatior : PASSED
TEST STARTED: Pairing Responder
| In the phone start pairing with BlueZ (00:1B:DC:0F:35:06).
| Device created /org/bluez/803/hci0/dev_78_47_1D_B3_6E_80
TEST FINISHED: Pairable Responder : PASSED
| Profiles supported:
* HFP AG
TEST STARTED: HFP AG
Type the phone number to call:*144
Press ENTER to hangup the call:
| Did you hear the call (y/n)
y
From a second phone call the phone connected to oFono.
Once the phone starts ring press ENTER to anwser:
Press ENTER to hangup the call:
| Did you hear the call (y/n)
y
TEST FINISHED: HFP AG : PASSED
Notes
- There are some options to run the command.
- The -i select which hci device to use(e.g.: hci0). One can find the hci device name by running 'hciconfig' and looking at the available devices in its outputs.
- The -d select which device you want to pair with, skipping discovery procedure. One can find the phone's Bluetooth address by putting the phone in discoverable mode and using "scan on" command from bluetoothctl.
- The -s skip pairing because the device is already paired. -d must be present when using this.
- Example:
$ /usr/lib/chaiwala-tests/bluez/bluez-hfp -i hci0 -d A0:F4:19:8E:D9:AF -s