|Playing back a series of WiFi attenuation levels using the attenuator_series.pl and a CSV file of attenuations make it possible to emulate the motion of a station (or stations) moving among a series APs. Or it could emulate interference in a crowd of moving people. Requires a LANforge CT703 (or better) and a LANforge CT520 (or better) system, and an access point.|
Our LANforge manager (resource 1.1) has an attenuator serial number 3 (resource 1.1.3) connected to the Device Under Test. The attenuator will be 184.108.40.206. There will be station sta100 on LANforge resource 1 and AP vap0 on LANforge resource 2. Cables connect the radios to the the attenator. The radios are configured in 1x1 mode. The corresponding channel on the attenuator is 220.127.116.11
[See LANforge Entity IDs for more on numbering.]
Let's script it with a simple data file: /home/lanforge/atten_test1.csv
channels,18.104.22.168 delay,5000 attenuate,250 attenuate,320 attenuate,450 attenuate,520 attenuate,820
We run the script in our terminal:
$ cd /home/lanforge/scripts $ ./attenuate_series.pl -f ../atten_test1.csv
Watching a Layer-3 connection in the Dynamic Display, we will see a dip, rise and dip at 10 second intervals.
Next we cable up the second channel (22.214.171.124). We can update the csv test file, by adding a new column for the channel.
channels,126.96.36.199,188.8.131.52 delay,5000 attenuate,250,250 attenuate,320,250 attenuate,450,250 attenuate,520,520 attenuate,820,820
We can run the same command and watch the dynamic reports window to see a similar graph.
The first radio on each LANforge is connected in 2x2 mode to both attenuators. This example is drawn to illustrate how you design the connection of your channels independently of their radios. Obviously, you don't need two attenuators for this scenario. However, if you had a CT523 with three radios and want to perform 2x2 testing with three client radios, it is possible to do so with only two CT703 attenuators.
We change the data file to specify the first channel on attenuator 14 (184.108.40.206): /home/lanforge/atten_test3.csv
channels,220.127.116.11,18.104.22.168 delay,5000 attenuate,250,250 attenuate,320,320 attenuate,450,450 attenuate,520,520 attenuate,820,820
We can run the script once in our terminal:
$ cd /home/lanforge/scripts $ ./attenuate_series.pl -f ../atten_test3.csv
Watching the port signal in the dynamic display we will see a rise and dip at 10 second intervals.
There is no different in attenuator control whether you have one radio in 3x3 or three radios in 1x1 to control. If you are testing multiple radios, you will be monitoring their RX Signal in the dynamic report.
Editing the test data file with a basic spreadsheet program than can save to CSV format is possible. You will want to save with comma format, without double-quoting the cells. These directives are converted to lower-case, so you can type them in UPPER-CASE or Mixed-Case if necessary.
The format of the CSV file allows you to specify many options that might also be specified on the command line.
attenuate,250 attenuate,@+50Results in the channel at 30.0dB. Spreadsheets often omit signed values when saving, so @+ will force a text type cell.
attenuate,300 attenuate,@-50Results in the channel at 25.0dB. Spreadsheets often omit signed values when saving, so @- will force a text type cell.
attenuate,500,400 attenuate,=B1+50,=C1-50, # results in 550, 350 attenuate,=B2+5,=C2-5, # fails: B2 and C2 were formulas.This feature is unlikely to be as useful as it sounds, because pasting a column of forumae will be pretty useless, since a spreadsheet processes them recursively. Also, most spreadsheets saved to CSV typically don't save formulae by default, you probably will get the computed values in your CSV file.
The attenuate_series.pl script uses these arguments. They support long and short argument switch names:
-m --mgr LANforge manager host, like localhost or 192.168.101.1 -f --file CSV file with attenuation data -d --delay Override of DELAY variable, milliseconds between applying rows -l --loop Repeat indefinitely -c --channel Override of channels variable, eg: 22.214.171.124,126.96.36.199 -i --min --minimum Set minimum attenuation value (not lower than zero) -x --max --maximum Set maximum attenuation value (not higher than 955) -n --dry --dryrun --dry_run Do not apply attenuation, just parse file, ignore nap times
This CSV shows a working example that gives warnings.
Here's the Attenuators tab used for the examples:
Here are options used for the open dialog in LibreOffice Calc:
Here are the options used for the save dialog in LibreOffice Calc: