Prerequisites
Before you begin, set up your device and go to the required menu as described in Set up the device for A2DP functions.Connect a remote device
To connect a remote device in the A2DP source role, run the following command from thebluetoothctl menu:
<bt_address> is the Bluetooth address of the remote device.
Example
To connect to a paired remote device with <bt_address> 17:1A:35:8D:A2:A4, run the following command:
List available transport
To list the available transport, run the following command from themenu transport submenu:
Get information about codec capabilities
To get the information about the codec capabilities of a transport, run the following command from themenu transport submenu:
<transport> is the transport path.
Example
To get the information about the codec capabilities of <transport> /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0, run the following command:
Set absolute volume
Ensure that the DUT and the remote device support the
setabsvolume feature.menu transport submenu:
-
<transport>is the transport path. -
[value]is the volume level.
<transport> /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 as 50, run the following command:
Play an audio file
The DUT doesn’t support an audio player. Use
paplay commands to play music.Only PCM audio sample is supported.- Run SSH.
-
Play a WAV file by running the following command:
Parameters
<audio_filepath>is the filepath of the WAV file. Example To play a WAV file at/tmp/playback.wav, run the following command:Sample output
Get a list of sinks
To get the list of sinks when multiple devices are connected, run the following command in SSH:The pactl tool isn’t available by default. Enable and build the tool on your device.
Play audio on a specific sink
To play audio on a specific sink when multiple devices are connected, run the following command in SSH:-
<audio_filepath>is the filepath of the WAV file. -
<device_name>is the sink name.
pcmtest.wav on the bluez_output.17:1A:35:8D:A2:A4 sink, run the following command:
Disconnect a remote device
To disconnect a remote device, run the following command from thebluetoothctl menu:
<bt_address> is the Bluetooth address of the remote device.
Example
To disconnect a paired remote device with <bt_address> 17:1A:35:8D:A2:A4, run the following command:

