# Perform Bluetooth SPP server functions

Source: [https://docs.qualcomm.com/doc/80-70014-13/topic/perform_bluetooth_functions_in_spp_server.html](https://docs.qualcomm.com/doc/80-70014-13/topic/perform_bluetooth_functions_in_spp_server.html)

You can perform SPP server functions using the `spp_server_menu`
        options.

## About this task

Before you begin, set up the device and go to the SPP server menu as described in
                    [Set up device for Bluetooth SPP functions](https://docs.qualcomm.com/doc/80-70014-13/topic/set_up_bluetooth_in_spp.html#set_up_bluetooth_in_spp__context_bgp_lts_s1c).

**Parent Topic:** [Serial Port Profile](https://docs.qualcomm.com/doc/80-70014-13/topic/set_up_bluetooth_in_spp.html)

## Configure DUT in SPP server role

Source: [https://docs.qualcomm.com/doc/80-70014-13/topic/perform_bluetooth_functions_in_spp_server.html](https://docs.qualcomm.com/doc/80-70014-13/topic/perform_bluetooth_functions_in_spp_server.html)

### About this task

To configure the DUT in an SPP server role, do the following:

### Procedure

1. Start the server connection by running the following command:
                    
start_serverCopy to clipboard
2. Initiate a connection from the remote device SPP client application.
                    
The following sample output shows that the SPP server connection has been
                            established successfully:

![Result of Step 3 Configure DUT in SPP server role](data:image/png;base64,UklGRqwHAABXRUJQVlA4TJ8HAAAvDAIaAF/BKJIkRbn/dcBwYOKUncHTAaZYRZLspN8/DnJGG8awgoac8cGgkSRFJeAc3DOLeLMvi/l9zH/EKAxhQO2U06NGfmPHbKXQa5BBrcRUOT9JSgwZP0RiTPDj8Xh5U9JMfSH6bvj9OzxemDG8pLcrG93jxA4zNaBoW3vU1sFOB2hVkdiNMltXLZ3g/V8Q/d/3/whKINON6L8sSLLjtllGPnQE85YgQBFPgL+rzxdbdHaed3sdLiGEpkohbz5XuhBOQ1UlN6I45NE5JV/bE76r3+sqP0/l2V1KXmt5UjMitH2VQtvLSuWMnNGL+5HvcBnxUtvrPLtLp8HQDXVZ4/3HeyETp0S6uhmQLxdwuDQGnv31LQRPdXUbcv/CWyoLJ+CFc034jg/DWPc4z357jicS3UynycRJGhvK13S+IjxUu+wFoj+pqu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LztrB9919fxakCAA==)

## Send a file in server role

Source: [https://docs.qualcomm.com/doc/80-70014-13/topic/perform_bluetooth_functions_in_spp_server.html](https://docs.qualcomm.com/doc/80-70014-13/topic/perform_bluetooth_functions_in_spp_server.html)

### About this task

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

### Procedure

1. Set the remote device in receive mode in the SPP application, if
                        applicable.
2. Create a test file with some sample data and place the file in the
                            /etc/bluetooth folder of the DUT.
                    
For example, create a test file bt\_stack.conf.
3. Send the test file to the remote device by running the following
                        command:
                    
send_file <directory_with_file_name>Copy to clipboard

Where, `<directory_with_file_name>` is the complete
                            file path with the filename.

For example, to send the test file bt\_stack.conf at
                                /etc/bluetooth, run the following command:

        send_file /etc/bluetooth/bt_stack.confCopy to clipboard

The sample output of this command appears as follows:

![Result of Step2 Send data in server role](data:image/png;base64,UklGRiQIAABXRUJQVlA4TBcIAAAvowEZAFfBKJIkRbn/dXDMJk7+mWA+T4wiSVKU+18He4yezjnz+WDQSJKiEnAO7pk1vsHXwPw+5j9iDEMYUDOiZZCzY6aRMlKATNZClJfwS3KIFPD7kSSImPjx8HspkHjA7f1hdz9Q8+bcqXFiekb7C735ntkBRWvbo8YNnixWSkXHk1rOQhV1g5j7v0L0f9/3gzHZk4j+y2IkO2ybE0ogBlzuO1KUw2e+/DdfRNcvcBX6ier4lFJpmkNnaNqUsl+xWC3iOnTDLOC/hSq3jmOpbuaR9n3v9HCq7lvZUfXr+OYqzHdxwVgC/8qDFgtIx7EC722kfd8neUd8qdrSCLm4tiEex4YlfL9fHbqU0lBNSqmfZox/Tuk8Wo4khWsiE/KKif44Ep6KmSxpSCkV4Kr6u5vjA5mxNXNR8lpfLlfsAHmQW8eBcWpfKU+scaAPsD6fRxDyYJw4DvcqfffEXF+3PrWGgTfGWzC1JWK8NhIPD7tBgvGfzoU0NOFy1RK8hqfMZP2EHTCeOuDZEQe5IeXqQHjaYUboJ/Ch6tCBbegPjxfGgfh+r7pc4SYwUxTHaOZw/iBEefkNM1AeolgYl32fudO1F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6TyzcPji+j65b++X1cDAA==)

Note: If an issue occurs, disconnect the operation
                            from the SPP client application on the remote device, and stop the SPP
                            server in the DUT by running the following command:

        stop_serverCopy to clipboard
4. Verify the status of file reception on the remote application.

## Receive a file in server role

Source: [https://docs.qualcomm.com/doc/80-70014-13/topic/perform_bluetooth_functions_in_spp_server.html](https://docs.qualcomm.com/doc/80-70014-13/topic/perform_bluetooth_functions_in_spp_server.html)

### About this task

To receive a file in the server role, do the following:

### Procedure

1. Set the DUT in receive mode.
2. Receive a file from the remote device by running the following
                        command:
                    
recv_file <directory_with_file_name>Copy to clipboard

Where, `<directory_with_file_name>` is the complete
                            file path with the filename.

Note: To receive a file,
                            use the /etc/bluetooth directory only.

For example, to receive fileName.txt at
                                /etc/bluetooth from the remote device, run the
                            following command:

        recv_file /etc/bluetooth/fileName.txtCopy to clipboard
3. Send the file from the remote device SPP server application.
4. Verify the received file as follows:
    1. Open the Command Prompt window.
    2. Pull the received file by running the following command:
                            
scp -r root@<IP_address>:<source_file_path> <destination_file_path>Copy to clipboard

To pull a file to the current file path, enter the
                                        `<destination_file_path>` as
                                        `.` in the command.

For example, the IP address of the device is
                                        `10.92.160.222`. To pull
                                        fileName.txt from
                                        /etc/bluetooth, run the following
                                    command:

            scp -r root@10.92.160.222:/etc/bluetooth/fileName.txt .Copy to clipboard

Note: When
                                    prompted for a password, enter `oelinux123` to
                                    authenticate the file transfer via Secure Copy Protocol
                                    (SCP).
    3. Open the received file and verify the data.
5. Disconnect operation from the remote device SPP client application, and
                        stop the SPP server in DUT by running the following command:
                    
stop_serverCopy to clipboard

Note: All devices of a particular development kit have
                            the same default MAC address.

Last Published: Jul 12, 2024

[Previous Topic
Serial Port Profile](https://docs.qualcomm.com/bundle/publicresource/80-70014-13/topics/set_up_bluetooth_in_spp.md) [Next Topic
Perform Bluetooth SPP client functions](https://docs.qualcomm.com/bundle/publicresource/80-70014-13/topics/perform_bluetooth_functions_in_spp_client.md)