wiki:802.11/wlan_exp/examples/throughput_stats

802.11 Reference Design: Aggregate Throughput Example

This example of the Experiments Framework uses two WARP v3 nodes, one configured as an AP, the other as a STA. The script measures unidirectional throughput and head-to-head throughput for each node. This script demonstrates how to:

  • Control two WARP v3 nodes from one wlan_exp script
  • Use the wlan_exp framework Local Traffic Generator (LTG) to create traffic
  • Read Tx/Rx packet counts from nodes to calculate per-flow throughput

The flow of the script is:

  1. Initialize two WARP v3 nodes
  2. Ensure nodes are configured as one AP, one STA and that the STA is associated with AP
  3. Start a fully-backlogged locally generated traffic (LTG) flow from AP -> STA
  4. Read current Tx/Rx packet counts at STA
  5. Wait 10 seconds
  6. Read current Tx/Rx packet counts at STA again
  7. Calculate throughput for 10 second window
  8. Start a fully-backlogged locally generated traffic (LTG) flow from STA -> AP
  9. Read current Tx/Rx packet counts at AP
  10. Wait 10 seconds
  11. Read current Tx/Rx packet counts at AP again
  12. Calculate throughput for 10 second window
  13. Perform previous steps (3 - 11) but have head-to-head LTG flows
  14. Stop the traffic flow
  15. Print the results

To run this example:

  • Setup wlan_exp (see Getting Started for details)
  • Configure two WARP v3 nodes with the 802.11 Reference Design bitstream- one AP, one STA
  • Open the file in a text editor and change the NODE_SERIAL_LIST to match your serial numbers
  • Open a Python shell
  • CD to the Python_Reference/Examples directory from the expanded 802.11 Reference design archive
  • Run python throughput_two_nodes.py

The script will run for ~30 seconds, then display its results:

Initializing experiment

Reseting the network config for all nodes on subnet 10.0.0.
Initializing W3-a-00006 as Node 0
Initializing W3-a-00183 as Node 1

Experimental Setup:

Node 0:
    Channel  = 4
    Rate     = 18.0 Mbps (QPSK 3/4)

Node 1:
    Channel  = 4
    Rate     = 18.0 Mbps (QPSK 3/4)


Run Experiment:

Testing AP -> STA throughput for rate 18.0 Mbps (QPSK 3/4) ...
    STA Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    AP  Rate = 18.0 Mbps   Throughput = 14.17 Mbps

Testing STA -> AP throughput for rate 18.0 Mbps (QPSK 3/4) ...
    STA Rate = 18.0 Mbps   Throughput = 14.06 Mbps
    AP  Rate = 18.0 Mbps   Throughput =  0.00 Mbps

Testing Head-to-Head throughput for rate 18.0 Mbps (QPSK 3/4) ...
    STA Rate = 18.0 Mbps   Throughput =  6.71 Mbps
    AP  Rate = 18.0 Mbps   Throughput =  6.72 Mbps

Source: the script is included in the 802.11 Reference Design archive at Python_Reference/examples/throughput_two_nodes.py.

Last modified 10 years ago Last modified on Apr 13, 2014, 4:21:54 PM