> ## 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 FTP functions

> FTP defines the requirements to exchange files between two Bluetooth devices.

<a id="bluez-ftp" />

To perform Bluetooth FTP 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>.

* Ensure that the DUT and the remote device support the BlueZ stack. One device acts as a server and another device acts as a client.

  <Note>
    To test or verify FTP server functions, a test application isn't required. Perform FTP functions through the client connection.
  </Note>

* 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 Bluetooth FTP 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}
   obexctl
   ```

   To view OBEX functions, run the following command:

   ```text theme={null}
   help
   ```

   This command provides the main menu of **obexctl**.

   **Sample output**

   ```text theme={null}
   sh-5.1# obexctl
   [NEW] Client /org/bluez/obex
   [obex]# help
   Menu main:
   Available commands:
   -------------------
   connect <dev> [uuid] [channel]                    Connect session
   disconnect [session]                              Disconnect session
   list                                              List available sessions
   show [session]                                    Session information
   select <session>                                  Select default session
   info <object>                                     Object information
   cancel <transfer>                                 Cancel transfer
   suspend <transfer>                                Suspend transfer
   resume <transfer>                                 Resume transfer
   send <file>                                       Send file
   pull <file>                                       Pull Vobject & stores in file
   cd <path>                                         Change current folder
   ls <options>                                      List current folder
   cp <source file> <destination file>               Copy source file to destination file
   mv <source file> <destination file>               Move source file to destination file
   rm <file>                                         Delete file
   mkdir <folder>                                    Create folder
   version                                           Display version
   quit                                              Quit program
   exit                                              Quit program
   help                                              Display help about this program
   export                                            Print environment variables
   [obex]#
   ```

4. Connect to the remote device by running the following command from the `obexctl` menu:

   ```text theme={null}
   connect <bt_address> <profile_name>
   ```

   **Parameters**

   * `<bt_address>` is the Bluetooth address of the remote device.

   * `<profile_name>` is `ftp`.

   **Example**

   To connect to a remote device with `<bt_address>` `E8:48:B8:C8:20:00`, run the following command:

   ```text theme={null}
   connect E8:48:B8:C8:20:00 ftp
   ```

   **Sample output**

   ```text theme={null}
   [E8:48:B8:C8:20:00]# connect E8:48:B8:C8:20:00 ftp
   Attempting to connect to E8:48:B8:C8:20:00
   [NEW] Session /org/bluez/obex/client/session7
   [NEW] FileTransfer /org/bluez/obex/client/session7
   Connection successful
   ```

   To perform FTP client functions, see <a href="perform-bluetooth-ftp-client-functions" target="_self">Perform Bluetooth FTP client functions</a>.

## Next steps

### <a href="perform-bluetooth-ftp-client-functions" target="_self">Perform Bluetooth FTP client functions</a>

You can verify Bluetooth FTP client functionality using the commands provided in the main menu of **obexctl**. Bluetooth FTP client functions include creating a new folder and changing the current folder to navigate the file system. You can retrieve information about the current folder, copy a file to a remote device, copy a file from a remote device, copy a file within the remote device, move files between locations and delete files when they are no longer required using the FTP client functions.
