Skip to main content
To perform HFP client or audio gateway functions, you must first complete the steps in the following procedure.

Prerequisites

  • Enable SSH to access your host device. For instructions, see Sign in using SSH.
  • Place the DUT and the remote device in the Bluetooth vicinity.

Set up the device for HFP functions

  1. Run the SSH in command prompt using the following command:
    Example If the IP address of the device is 10.92.160.222, run the following command:
  2. Connect to the SSH by entering the following password:
  3. Configure the DUT for the HFP client or audio gateway functions, as required.

Configure the DUT for HFP client functions

After the initial device set up for HFP functions, do the following for an HFP client:
  1. Verify the status of ofono service by running the following command in SSH:
  2. Download the Bluetooth configuration file bluetooth.conf from GitHub PipeWire page.
  3. Push the bluetooth.conf file to the device at the /usr/share/wireplumber/wireplumber.conf.d directory.
  4. Open the bluetooth.conf file in a text editor.
  5. Uncomment the bluez5.hfphsp-backend = "native" property. Change its value from "native" to "ofono". The file must appear as follows:
  6. Save the file.
  7. Reload the daemon by running the following command:
  8. Restart the WirePlumber service by running the following command:
    After you reload the daemon and restart the WirePlumber service, the changes in the bluetooth.conf configuration file reflect in the system. PipeWire establishes a connection with ofono using DBUS.
  9. Run bluetoothctl by running the following command in SSH:
  10. Verify if the UUID of the hands-free-client device appears in the list by running the following command from the bluetoothctl menu:
Sample output
The hands-free audio gateway and headset UUIDs aren’t listed. Only the hands-free client UUID that’s configured from PipeWire appears in the list.
  1. Open the ofono/test menu by running the following command in SSH:
    Build and install the ofono-tests package on your device for the ofono/test application.
Sample output
For HFP client functions, see Perform Bluetooth HFP client functions.

Configure the DUT for HFP audio gateway functions

After the initial device set up for HFP functions, do the following for an HFP audio gateway:
  1. Run bluetoothctl by running the following command in SSH:
  2. Verify if the UUID of the hands-free audio gateway and the headset appear in the list by running the following command from the bluetoothctl menu:
    Sample output
  3. Enable Modified Sub Band Coding (mSBC) codec as the default codec for HFP audio gateway connection as follows: a. Open the bluetooth.conf file using a text editor on the device. b. Uncomment bluez5.enable-msbc = true line in the bluetooth.conf file. c. Save the bluetooth.conf file.
  4. Reload the Bluetooth daemon by running the following command:
  5. Restart the WirePlumber service by running the following command:
    The changes in the bluetooth.conf configuration file are applied in the device.
For HFP audio gateway functions, see Perform Bluetooth HFP audio gateway functions.

Next steps

Perform Bluetooth HFP client functions

You can perform HFP client functions using the bluetoothctl menu and ofono/test tools. Bluetooth HFP client functions include connecting or disconnecting to a remote device and managing phone calls over Bluetooth. You can dial a phone number, answer or reject incoming calls, and list active calls using HFP client functions.

Perform Bluetooth HFP audio gateway functions

You can perform HFP audio gateway functions using the bluetoothctl menu and paplay commands. Bluetooth HFP audio gateway functions allow you to connect or disconnect to a remote device and verify audio gateway functionality to ensure proper hands-free operation.