# P2P group client

Source: [https://docs.qualcomm.com/doc/80-Y8730-2/topic/p2p_group_client.html](https://docs.qualcomm.com/doc/80-Y8730-2/topic/p2p_group_client.html)

Wi-Fi Peer-to-Peer (P2P), also known as Wi-Fi Direct, provides a straightforward method for devices to connect with one another wirelessly. Unlike traditional Wi-Fi networks that require a centralized access point, Wi-Fi P2P allows devices to establish direct connections, enabling them to share files, stream media, or communicate without an internet connection.

The following sections explain how to use P2P related functions.

Note: This feature is available since the QCC730.FR.1.0 Post-CS 8 release.

## Enable P2P on QCC730

Follow these steps to enable the P2P function on QCC730:

1. Set the following configuration in the qccsdk\demo\qcli\_demo\prj.conf file:

        CONFIG_ENABLE_P2P_MODE=y
        CONFIG_ENABLE_P2P_LIB=yCopy to clipboard
2. Set the following configuration in the qccsdk\modules\wifi\Kconfig.lib file:

        config ENABLE_P2P_MODE
            bool "enable p2p support"
            default y
        
        config ENABLE_P2P_LIB
            bool "enable p2p lib support"
            default yCopy to clipboard
3. Set the following configuration in the qccsdk\configs\_decl.gni file:

        ENABLE_P2P_MODE = trueCopy to clipboard
4. Create a folder named p2p in the qccsdk\modules\wifi\bin\ directory. Then, copy the libwifi\_core.a file from the \prebuilt\_HY11\p2p\lib\ directory to the qccsdk\modules\wifi\bin\p2p\ directory.
5. Build an image by using the following command:

        python qccsdk.py set -S=demo/qcli_demo -b=mqm730x build --rebuildCopy to clipboard

Note: For details about how to build images with `qccsdk.py`, see [QCC730 Evaluation Kit Quick Start Guide (80-Y8730-1)](doc/80-Y8730-1).
6. Flash the image to a QCC730 board by using the following command:

        python qccsdk.py flash --flash --resetCopy to clipboard

## P2P group formation example

The following steps demonstrate how to form a P2P group between QCC730 and another phone that supports Wi-Fi P2P:

1. On QCC730, perform the following steps to enable P2P device discovery:
    1. Enable WLAN.

            >wlan enableCopy to clipboard
    2. Enable P2P.

            >wlan p2p onCopy to clipboard
    3. Start P2P device discovery on QCC730.

            >wlan p2p findCopy to clipboard
2. On the phone, start P2P device discovery by tapping the Scan button.
3. On QCC730, perform the following steps to connect to the phone:
    1. Check nearby P2P devices.

            >wlan p2p listnodesCopy to clipboard
    2. Connect to the phone using the push-button method.

            >wlan p2p connect <p2p device address> pushCopy to clipboard

## Run P2P iPerf on Raspberry Pi

In the setup described in [Set up SPI host with Linux](https://docs.qualcomm.com/doc/80-Y8730-2/topic/use_spi_for_hosted_mode.html#qcc730_spi_hosted_mode_for_linux), QCC730 connects to Raspberry Pi via SPI and functions as an Ethernet device. This section demonstrates how to enable P2P on QCC730, which is connect to Raspberry Pi, and how to run iPerf on Raspberry Pi.

On QCC730:

1. Set the following configuration in the qccsdk\demo\qcli\_demo\prj.conf file:

        CONFIG_ENABLE_P2P_MODE=y
        CONFIG_ENABLE_P2P_LIB=y
        CONFIG_RING_IF_ONLY=y
        CONFIG_QCSPI_HFC_TEST=n
        CONFIG_QCSPI_HFC_ETH_ENABLE=yCopy to clipboard
2. Set the following configuration in the qccsdk\modules\wifi\Kconfig.lib file:

        config ENABLE_P2P_MODE
            bool "enable p2p support"
            default y
        
        config ENABLE_P2P_LIB
            bool "enable p2p lib support"
            default yCopy to clipboard
3. Set the following configuration in the qccsdk\configs\_decl.gni file:

        ENABLE_P2P_MODE = trueCopy to clipboard
4. Compile image.

        python qccsdk.py set -S=demo/qcli_demo -b=mqm730x build --rebuildCopy to clipboard
5. Flash the image to the QCC730 board by using the following command:

        python qccsdk.py flash --flash --resetCopy to clipboard
6. After QCC730 is restarted, run the following commands to connect to a P2P device:

        >wlan enable
        >wlan p2p on
        >wlan p2p find
        >wlan p2p listnodes
        >wlan p2p connect <P2P device IP address> pushCopy to clipboard

On Raspberry Pi, perform the following steps to run iPerf:

1. Enable `ETH1` and get the IP address of Raspberry Pi.

        $ sudo insmod qcc730.ko
        $ ifconfigCopy to clipboard
2. Ping the P2P device to verify that the setup is successful.

        $ ping <P2P device IP address>Copy to clipboard
3. Use the following commands to run iPerf:
    - UDP Tx

            $ iperf -c <P2P device IP address> -t 10 -i 1 -u -b 20MCopy to clipboard
    - TCP Tx

            $ iperf -c <P2P device IP address> -t 10 -i 1 -p 5002 -b 20MCopy to clipboard
    - UDP Rx

            $ iperf -s -i 1 -uCopy to clipboard
    - TCP Rx

            $ iperf -s -i 1Copy to clipboard

Last Published: Jun 03, 2026

[Previous Topic
Memory dump](https://docs.qualcomm.com/bundle/publicresource/80-Y8730-2/topics/ram_dump.md) [Next Topic
WPA2/WPA3 Enterprise](https://docs.qualcomm.com/bundle/publicresource/80-Y8730-2/topics/wpa2_wpa3_enterprise.md)