{{{#!comment [[Include(wiki:802.11/beta-note)]] }}} [[TracNav(802.11/TOC)]] = 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 steps through PHY rates, measuring unidirectional throughput for ~10 seconds for each rate. 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 1. Ensure nodes are configured as one AP, one STA and that the STA is associated with AP 1. Start a fully-backlogged locally generated traffic (LTG) flow from AP -> STA 1. For each WLAN rate: 1. Read current Tx/Rx packet counts at STA 1. Wait 10 seconds 1. Read current Tx/Rx packet counts at STA again 1. Calculate throughput for 10 second window 1. Stop the traffic flow 1. Print the results To run this example: * Setup wlan_exp (see [wiki:../../GettingStarted 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'''. The [source:/ReferenceDesigns/w3_802.11/python/examples/throughput_two_nodes.py latest version of the throughput_two_nodes.py script] is also shown below. [[Include(source:/ReferenceDesigns/w3_802.11/python/examples/throughput_two_nodes.py)]]