> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify A2DP functions

> A2DP defines how to stream multimedia audio from one device to another over a Bluetooth connection. This mechanism is also called as Bluetooth audio streaming.

<a id="bluez-a2dp" />

To perform A2DP source or sink functions, you must first complete the steps in the following procedure.

## Prerequisites

* Enable SSH to access your host device. For instructions, see <a href="https://dragonwingdocs.qualcomm.com/Key-Documents/Flash-Guide/how-to-sign-in-with-ssh" target="_self">Sign in using SSH</a>.

* Pair the DUT and the remote device. For instructions, see <a href="perform-bluetooth-gap-functions#pair-with-a-remote-bluetooth-device" target="_self">Pair with a remote Bluetooth device</a>.

* Place the DUT and the remote device in the Bluetooth vicinity.

## Set up the device for A2DP functions

1. Run the SSH in command prompt using the following command:

   ```text theme={null}
   ssh root@<device_IP_address>
   ```

   **Example**

   If the IP address of the device is `10.92.160.222`, run the following command:

   ```text theme={null}
   ssh root@10.92.160.222
   ```

2. Connect to the SSH by entering the following password:

   ```text theme={null}
   oelinux123
   ```

3. Open the Bluetooth test application by running the following command:

   ```text theme={null}
   bluetoothctl
   ```

   **Sample output**

   ```text theme={null}
   sh-5.1# bluetoothctl
   Agent registered        uetoothd...
   [CHG] Controller 22:22:F1:C1:99:C0 Pairable: yes
   ```

4. Go to the **Transport submenu** or **Player submenu**, as required.

   * To go to the **Transport submenu**, run the following command from `bluetoothctl`:

     ```text theme={null}
     menu transport
     ```

     **Sample output**

     ```text theme={null}
     [bluetooth]# menu transport
     Menu transport:
     Available commands:
     -------------------
     list                                              List available transports
     show <transport>                                  Transport information
     acquire <transport>                               Acquire Transport
     release <transport>                               Release Transport
     send <transport> <filename>                       Send contents of a file
     receive <transport> [filename]                    Get/Set file to receive
     volume <transport> [value]                        Get/Set transport volume
     back                                              Return to main menu
     version                                           Display version
     quit                                              Quit program
     exit                                              Quit program
     help                                              Display help about this program
     export                                            Print environment variables
     ```

     To perform **Transport submenu** functions in the source, see <a href="perform-bluetooth-a2-dp-source-functions" target="_self">Perform Bluetooth A2DP source functions</a>.

     To perform **Transport submenu** functions in the sink, see <a href="perform-bluetooth-a2-dp-sink-functions" target="_self">Perform Bluetooth A2DP sink functions</a>.

   * To go to the **Player submenu**, run the following command from `bluetoothctl`:

     ```text theme={null}
     menu player
     ```

     **Sample output**

     ```text theme={null}
     [bluetooth]# menu player
     Menu player:
     Available commands:
     -------------------
     list                                              List available players
     show [player]                                     Player information
     select <player>                                   Select default player
     play [item]                                       Start playback
     pause                                             Pause playback
     stop                                              Stop playback
     next                                              Jump to next item
     previous                                          Jump to previous item
     fast-forward                                      Fast forward playback
     rewind                                            Rewind playback
     equalizer <on/off>                                Enable/Disable equalizer
     repeat <singletrack/alltrack/group/off>           Set repeat mode
     shuffle <alltracks/group/off>                     Set shuffle mode
     scan <alltracks/group/off>                        Set scan mode
     change-folder <item>                              Change current folder
     list-items [start] [end]                          List items of current folder
     search <string>                                   Search items containing string
     queue <item>                                      Add item to playlist queue
     show-item <item>                                  Show item information
     back                                              Return to main menu
     version                                           Display version
     quit                                              Quit program
     exit                                              Quit program
     help                                              Display help about this program
     export                                            Print environment variables
     ```

     To perform **Player submenu** functions in the sink, see <a href="perform-bluetooth-a2-dp-sink-functions" target="_self">Perform Bluetooth A2DP sink functions</a>.

## Next steps

### <a href="perform-bluetooth-a2-dp-source-functions" target="_self">Perform Bluetooth A2DP source functions</a>

You can perform Bluetooth A2DP source functions using the **bluetoothctl** menu, **menu transport** submenu, and **paplay** commands. Bluetooth A2DP source functions include connecting or disconnecting to a remote device and listing available transport options. They allow you to retrieve information about codec capabilities, set the absolute volume, and play an audio file. You can also get a list of available sinks and play audio on a specific sink using the Bluetooth A2DP source functions.

### <a href="perform-bluetooth-a2-dp-sink-functions" target="_self">Perform Bluetooth A2DP sink functions</a>

You can perform Bluetooth A2DP sink functions using the **bluetoothctl** menu, **menu transport** submenu, and **menu player** submenu. Bluetooth A2DP sink functions include connecting or disconnecting to a remote device and listing available transport options for audio streams. They allow you to retrieve information about codec capabilities, set the absolute volume, and play an audio file. You can use playback controls to pause, stop, play the next or previous audio file, and fast-forward during playback.
