= Wildcard tournament experiment example #1 = [[TOC(DSC*,depth=2)]] == Objective == Use an OEDL script to execute a competitive-style game (similar to what will occur in the Wildcard and Preliminary matches). The example game involves a simple house bot, and the teams provide their own radio script. Teams may modify this script to use other radio bots of their own design in place of the house bot. == Hardware / Software Resources Used == 1. Four grid nodes with USRP N210s. 2. ''dsc-bot.ndz'': disk image loaded onto one pair of nodes. This image has all the prerequisite software to configure the USRPs and execute a house radio bot. 3. ''team-image.ndz'': disk image that contains the team's radio. 4. Scoring packet server: This is server that resides on the grid console (for the practice) and is used by a transmitting nodes to send data packets over the air via USRP as well as by the receiving nodes to submit received packets for scoring. 5. [attachment:dsc-wildcard.rb]: this is the OEDL experiment script to execute the game. == Setting up the nodes == * To get started first make a reservation on the [https://www.orbit-lab.org/loginService/ControlPanel Orbit Scheduler] for using the Grid. * After logging into grid console, make sure all nodes are turned off (in the example below, turn off all the nodes in the grid): {{{ username@console.grid:~$ omf tell -a offh -t system:topo:all }}} * Verify state of node before continuing. Make sure nodes are in the POWEROFF state. {{{ username@console.grid:~$ omf stat }}} * Image the two nodes to be used for the first team's radios (in this case the first team is team A, and corresponds to the participant team): {{{ username@console.grid:~$ omf load -i dsc-bot.ndz -t system:topo:dsc-teamA }}} * Image the two nodes to be used for house radios (in this case team C nodes): {{{ username@console.grid:~$ omf load -i dsc-bot.ndz -t system:topo:dsc-teamC }}} * Turn nodes back on and verify they are in POWERON state {{{ username@console.grid:~$ omf tell -a on -t system:topo:teamA username@console.grid:~$ omf tell -a on -t system:topo:teamC }}} * Download the [attachment:dsc-wildcard.rb OEDL experiment script for this tutorial] to your local directory. {{{ username@console.grid:~$ wget http://www.orbit-lab.org/raw-attachment/wiki/DSC/dc_trial2/dsc-wildcard.rb }}} == Running the experiment script == By default, the experiment script will execute '''/root/gnuradio/gr-digital/examples/narrowband/bot1_tx.py''' and '''/root/gnuradio/gr-digital/examples/narrowband/bot1_rx.py''' on the transmitter and receiver respectively. Each team will use a separate set of parameters for a very simple bot: a brute-force radio that sends a random number of packets at random intervals. The sender module draws packets from a packet server, while the receiver module delivers packets to the same packet server. The code is based on the same benchmark radio that was used for Hurdle 3. * Type to following command to run the experiment. This will start the packet server, start the transmitter and receiver for both teams and release the packet source. The actual transmission/reception will run for 100 seconds (which can be adjusted with the property at the top of the script) or until one radio successfully transmits the file. {{{ username@console.grid:~$ omf exec dsc-wildcard.rb -- --team1 dsc-teamA --team2 dsc-teamC }}} * The output should look similar to the following: {{{ username@console.grid:~# omf exec dsc-wildcard.rb ... }}} * Turn the nodes off {{{ username@console.grid:~$ omf tell -a offh -t system:topo:all }}} NOTES: Please note that actual Wildcard and Tournament games will be longer than 100 seconds. Also note that this example uses dsc-bot.ndz for both teams, and that team A needs to replace this field in the omf load command with team-image.ndz.