WiFiMon measures the performance of WiFi networks, as experienced by WiFiMon Software Probes, i.e. End Users (crowdsourced measurements) and/or WiFiMon Hardware Probes (deterministic measurements), by embedding JavaScript code in frequently visited websites. Performance tests are triggered when End Users visit these websites and, in particular, after a web page is loaded so that browsing experience is not impacted by WiFiMon.
The aforementioned JavaScript code scripts along with the files, i.e. images that are required to perform the tests are contained in the WiFiMon Test Server (WTS). Performance results, i.e. Download/Upload Rates and Round Trip Times (RTTs) depend on the connectivity between the monitored WiFi network and the WTS location. Thus, for accurate results, the WTS should be located as close as possible to the monitored Subnets. In contrast, there is no requirement for the WiFiMon Analysis Server (WAS) to be placed close to the monitored networks. Note that the WAS and the WTS are not necessarily separate components and could be installed within the same machine. In the following, we consider the WAS and the WTS as two separate machines with FQDNs WAS_FQDN and WTS_FQDN respectively.
WiFiMon is currently using 3 JavaScript-based testtools to measure the performance of WiFi networks. These are (i) NetTest, (ii) boomerang and (iii) speedtest/HTML5.
In the reminder of this page we provide the details on:
This guide presents the commands required to install the WTS in a Debian-based distribution (Debian, Ubuntu, etc.). Other distributions may also be considered by adjusting the included commands appropriately.
In the following, we detail the steps that are required to install the WiFiMon Test Server (WTS). Our installation was tested in Ubuntu 20.04 LTS. Notably, WiFiMon currently uses the Apache2 web server. However, readers could adjust the following setup to their preferred web server.
First, Apache2 web server should be installed using the following commands:
sudo apt-get update sudo apt-get install -y apache2 sudo /etc/init.d/apache2 restart |
Then, Apache2 mod_headers should be enabled with the following commands:
a2enmod headers sudo service apache2 restart |
WiFiMon also requires enabling CORS. The following lines should be added in the /etc/apache2/apache2.conf file and Apache2 should then be restarted:
<Files ~ "\.(htm|html|css|dat|js|php|gif|jpg|png|swf)$"> Header always set Access-Control-Allow-Origin "*" Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" Header always set Access-Control-Max-Age "1000" Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" </Files> |
Finally, the required scripts and images should be uploaded to the root directory of the Apache2 web server, i.e. directly under /var/www/html. The contents of the "testtools" directory which are available from the WiFiMon code repository (https://bitbucket.software.geant.org/projects/WFMON/repos/agent/browse/testtools) should be copied in the root directory of Apache2.
NOTE: This directory must be renamed from "testtools" to "wifimon".
A single modification is required in file "wifimon/js/nettest/nettest-swfobject.js". The variable "NetTest.FlashPath" should be configured to match the FQDN of the WiFiMon Test Server, i.e. WTS_FQDN.
The following paragraphs show the lines that should be included in the HTML code of the frequently-visited websites for each testtool. The FQDN of the WiFiMon Test Server (WTS) is denoted as WTS_FQDN, the FQDN of the WiFiMon Analysis Server (WAS) is denoted as WAS_FQDN and the name of the utilized testtool should be included in the testtool attribute.
Example pages for each testtool are available in the "measurements" folder of the "testtools" directory in the WiFiMon code repository (https://bitbucket.software.geant.org/projects/WFMON/repos/agent/browse/testtools).
NetTest measurements require embedding the following lines of code in your website:
<html> <head> <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/nettest/jquery-3.5.1.min.js"></script> <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/nettest/nettest-swfobject.js"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="WAS_FQDN" agentPort="443" testtool="NetTest" testServerLocation="LOCATION" imagesLocation="https://WTS_FQDN/wifimon/images/" cookieTimeInMinutes="0.01" src="https://WTS_FQDN/wifimon/js/nettest/runtests.js" defer></script> <!--meta http-equiv="refresh" content="30" --> </head> </html> |
Triggering boomerang measurements requires embedding the following lines of code in your website:
<html> <head> <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/boomerang/jquery-3.5.1.min.js"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script src="https://WTS_FQDN/wifimon/js/boomerang/boomerang.js" type="text/javascript"></script> <script src="https://WTS_FQDN/wifimon/js/boomerang/bw.js" type="text/javascript"></script> <script src="https://WTS_FQDN/wifimon/js/boomerang/rt.js" type="text/javascript"></script> <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="WAS_FQDN" agentPort="443" testtool="boomerang" testServerLocation="LOCATION" imagesLocation="https://WTS_FQDN/wifimon/images/" cookieTimeInMinutes="" src="https://WTS_FQDN/wifimon/js/boomerang/boomerang-trigger.js" defer></script> </head> </html> |
Speedtest requires two steps.
Step 1: Create the following proxy HTML page in the "measurements" folder of the "testtools" directory in the WiFiMon code repository (https://bitbucket.software.geant.org/projects/WFMON/repos/agent/browse/testtools):
<!DOCTYPE html> <html> <body> <iframe src="https://WTS_FQDN/wifimon/js/speedtest/speedworker.html" style="visibility: hidden;"></iframe> <body/> </html> |
Step 2: Create the following HTML page with name "speedworker.html" in the "js/speedworker" folder of the "testtools" directory in the WiFiMon code repository(https://bitbucket.software.geant.org/projects/WFMON/repos/agent/browse/testtools):
<!DOCTYPE html> <html> <head> <title>Speed worker</title> <script type="text/javascript" src="jquery-3.5.1.min.js"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="WAS_FQDN" agentPort="443" testtool="speedtest" testServerLocation="LOCATION" cookieTimeInMinutes="0.01" src="speedworker-post.js"></script> </head> </html> |
Including all three types of testtools (NetTest, boomerang, speedtest/HTML) in your measurements requires injecting the following HTML lines in the "head" section of the website that is monitored by WiFiMon:
<iframe src="https://WTS_FQDN/wifimon/measurements/nettest.html" style="visibility: hidden;"></iframe> <iframe src="https://WTS_FQDN/wifimon/measurements/boomerang.html" style="visibility: hidden;"></iframe> <iframe src="https://WTS_FQDN/wifimon/js/speedtest/speedworker.html" style="visibility: hidden;"></iframe> |
where nettest.html, speedworker.html, boomerang.html include the JavaScript lines that trigger the necessary tests. These files were detailed above.