# Perform Bluetooth OPP client functions

Source: [https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-perform-bluetooth-opp-client-functions.html](https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-perform-bluetooth-opp-client-functions.html)

You can verify Bluetooth OPP client functionality using the commands provided in the
        main menu of obexctl.

## Send a file in the client role

Before you begin, set up the device as described in [Set up device for Bluetooth OPP functions](https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-opp.html#bluez-opp__section_qyc_wdd_rcc_navyanka_09-09-24-2148-41-416).

To send a file in the client role, do the following:

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

        connect <bt_address> <profile_name>Copy to clipboard

    **Parameters**

    - `<bt_address>` is the Bluetooth address of the remote
                            device.
    - `<profile_name>` is `opp`.

    **Example**

To connect to a remote device with
                            `<bt_address>`
                        `22:22:5A:A5:56:6B`, run the following command:

        connect 22:22:5A:A5:56:6B oppCopy to clipboard

    **Sample                            output**

[obex]# connect 22:22:5A:A5:56:6B opp
        Attempting to connect to 22:22:5A:A5:56:6B
        [NEW] Session /org/bluez/obex/client/session1 [default]
        [NEW] ObjectPush /org/bluez/obex/client/session1
        Connection successful
        [22:22:5A:A5:56:6B]#Copy to clipboard
2. Create a text file at a local directory of the DUT.
3. Send this text file to the remote device by running the following command from
                    the `obexctl` menu:

        send <filepath>Copy to clipboard

    **Parameters**

    `<filepath>`
                        is the filepath of the text file.

    **Example**

To send a text
                        file temp.txt at
                            /local/mnt/workspace/, run the following command:

        send /local/mnt/workspace/temp.txtCopy to clipboard

    **Sample                            output**

[22:22:5A:A5:56:6B]# send /local/mnt/workspace/temp.txt
        Attempting to send /local/mnt/workspace/temp.txt to /org/bluez/obex/client/session1
        [NEW] Transfer /org/bluez/obex/client/session1/transfer1
        Transfer /org/bluez/obex/client/session1/transfer1
            Status: queued
            Name: temp.txt
            Size: 36
            Filename: /local/mnt/workspace/temp.txt
            Session: /org/bluez/obex/client/session1
        [CHG] Transfer /org/bluez/obex/client/session1/transfer1 Status: complete
        [DEL] Transfer /org/bluez/obex/client/session1/transfer1
        [22:22:5A:A5:56:6B]#Copy to clipboard
4. On the remote device, accept the prompt to receive the file.
    The file is
                        successfully sent to the remote device.

**Parent Topic:** [Object Push Profile](https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-opp.html)

Last Published: Dec 26, 2024

[Previous Topic
Perform Bluetooth OPP server functions](https://docs.qualcomm.com/bundle/publicresource/80-70017-13/topics/bluez-perform-bluetooth-opp-server-functions.md) [Next Topic
File Transfer Protocol](https://docs.qualcomm.com/bundle/publicresource/80-70017-13/topics/bluez-ftp.md)