# Power test demo

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

The power test demo sends TCP or UDP packets at specified millisecond intervals in sleep mode. This demo allows you to evaluate power consumption based on a defined traffic pattern.

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

The following procedure shows how to build, flash, and run the power test demo.

## Build and flash the power test demo

Run the following commands to build and flash the power test demo:

    python qccsdk.py set -S=demo/powertest_demo
    python qccsdk.py build --rebuild
    python qccsdk.py flash --flash --resetCopy to clipboard

## Run the power test demo

Follow these steps to run the power test demo:

1. Run the following commands on a PC to start the iPerf tool in server mode for UDP or TCP traffic testing:
    - UDP:

            iperf -s -i 1 -uCopy to clipboard
    - TCP:

            iperf -s -i 1Copy to clipboard
2. Run the following commands on the DUT to start the power test demo:

        wlan enable
        wlan setSTAListenInterval 1000 0
        wlan SetWpaPassphrase
        wlan SetWpaParameters
        wlan Connect
        net dhcpv4c wlan1 new
        Powertest iperf_for_powertest -c <server_IP_address> -d <interval> -u -p <server_port> -l <data_length>Copy to clipboard

The options used in the Powertest command are as follows:
- `-u`: Use UDP instead of the default TCP
- `-p`: Server port. Default: 5001
- `-d`: The interval in milliseconds for sending data
- `-c`: Server IP address
- `-l`: Data length. Default: 1452 bytes for TCP, 1462 bytes for UDP (the default values are also the maximum supported values)

The following command is an example: 

    Powertest iperf_for_powertest -c 192.168.1.1 -d 3000 -u -p 5001 -l 1400Copy to clipboard

For details about how to set up a power test, see [QCC730 Power Measurement Test Guide (80-Y8730-3)](doc/80-Y8730-3).

Last Published: Jun 03, 2026

[Previous Topic
MQTT demo](https://docs.qualcomm.com/bundle/publicresource/80-Y8730-2/topics/mqtt_demo.md) [Next Topic
DFU from host through SPI](https://docs.qualcomm.com/bundle/publicresource/80-Y8730-2/topics/firmware_upgrade_via_spi.md)