{{{#!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 ~80 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 Initializing the time of all nodes on 10.0.0 to: 0.0 Experimental Setup: Node 0: Channel = 4 Tx Power = 10 dBm Node 1: Channel = 4 Tx Power = 10 dBm Adding current time to log for nodes on 10.0.0 Start LTG - AP -> STA: Run Experiment: Starting 10 sec trial for rate 6.0 Mbps (BPSK 1/2) ... Done. Starting 10 sec trial for rate 9.0 Mbps (BPSK 3/4) ... Done. Starting 10 sec trial for rate 12.0 Mbps (QPSK 1/2) ... Done. Starting 10 sec trial for rate 18.0 Mbps (QPSK 3/4) ... Done. Starting 10 sec trial for rate 24.0 Mbps (16-QAM 1/2) ... Done. Starting 10 sec trial for rate 36.0 Mbps (16-QAM 3/4) ... Done. Starting 10 sec trial for rate 48.0 Mbps (64-QAM 2/3) ... Done. Starting 10 sec trial for rate 54.0 Mbps (64-QAM 3/4) ... Done. Results: Rate = 6.0 Mbps Throughput = 5.44 Mbps Rate = 9.0 Mbps Throughput = 7.84 Mbps Rate = 12.0 Mbps Throughput = 10.13 Mbps Rate = 18.0 Mbps Throughput = 14.16 Mbps Rate = 24.0 Mbps Throughput = 17.69 Mbps Rate = 36.0 Mbps Throughput = 23.61 Mbps Rate = 48.0 Mbps Throughput = 28.27 Mbps Rate = 54.0 Mbps Throughput = 30.38 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)]]