Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Secure the Raspberry Pi by changing the default password. Optionally, you may enable SSH to access the command line of a Raspberry Pi remotely or setup remote desktop. Next, you have to connect to the wireless network you want to measure.

First, the following programs should be downloaded:

Code Block
sudo apt-get update
sudo apt-get install -y xvfb firefox-esr

The WiFiMon Hardware Probe (WHP) performs performance tests towards the WiFiMon Test Server (WTS) in an automated manner. It uses crontab to schedule the tests. To do that, open the terminal (as user "pi") and enter the command: crontab -e. You will have to pick the text editor. Then scroll to the bottom of the file and add the following code block (which you will modify as explained below):

Code Block
languagebash
19,39,5900,10,20,30,40,50 * * * * exportXvfb DISPLAY=:0 && firefox --new-window https://www.google.com >/dev/null 2>&1

00,05,10,15,20,25,30,35,40,45,50,55:100 &
02,12,22,32,42,52 * * * * export DISPLAY=:0100 && firefox-esr --new-tab URL_TO_nettest.html >/dev/null 2>&1

0104,0614,1124,1634,21,26,31,36,41,46,51,5644,54 * * * * export DISPLAY=:0100 && firefox-esr --new-tab URL_TO_speedworker.html >/dev/null 2>&1

0206,0716,1226,1736,22,27,32,37,42,47,52,5746,56 * * * * export DISPLAY=:0100 && firefox-esr --new-tab URL_TO_boomerang.html >/dev/null 2>&1

03,08,13,18,23,28,33,38,43,48,53,58 * * * * /home/pi/wireless.py >> ~/cron.log 2>&1

18,38,58 * * * * scripts/kill-firefox.sh >/dev/null 2>&1

10 0 * * 0 scripts/pi-reboot.sh >/dev/null 2>&1

You have to modify the following parts of the crontab in lines 2-4:

...

Line 5 of the crontab is related to the streaming of wireless network interface metrics to the WiFiMon Analysis Server (WAS). Optionally, the intervals of the WHP measurements could be altered by appropriately configuring the crontab so that measurement are more or less frequent. The configuration of the crontab config given above sets up 510-minute intervals between the measurements of each test tool in a way in which there are no overlapping measurements.

...

That's all! At this point you may (optionally) unplug the keyboard, the mouse and the monitor and let the WHP measure the performance of your wireless network!

...

In /home/pi, construct the new directory "scripts". Within this directory, include the following scripts with names "kill-firefox.sh" and "pi-reboot.sh" respectively. The contents of the aforementioned scripts should be the following:

Code Block
languagebash
titlekill-firefox.sh
#!/bin/bash
let COUNT=$(pgrep firefox | wc -l)
for (( i=1; i<=COUNT; i++ ))
do
  PID=$(pgrep -o firefox)
  kill $PID
  sleep 3
done

and

...

languagebash
titlepi-reboot.sh

...

!

...

Then, Step 3 and Step 4 must be followed as described above. Script wireless.py should be included in the home directory of the Raspberry Pi.