...
- An IP address (WTS_IP) configured for the WTS. This IP should be accessible from the WiFiMon Hardware Probes (WHP's) and WiFiMon Software Probes (WSP's), i.e. the end users of the Wi-Fi network.
- Optionally, you may associate an FQDN (WTS_FQDN) with the WTS_IP,.
- We assume that WAS has already been installed in a separate machine. The FQDN of the WAS is denoted as WAS_FQDN.
In the sequel, we assume that an FQDN (WTS_FQDN) was selected.
AnchorWTS WTS
2. WiFiMon Test Server (WTS) Installation
WTS | |
WTS |
...
Code Block |
---|
sudo 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:
Code Block |
---|
<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 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 (Download the required zip file and unzip it with the following commands:
Code Block |
---|
wget https://bitbucket.software.geant.org/projects/WFMON/repos/agent/ |
...
raw/wifimon.zip?at=refs%2Fheads%2Fmaster --output-document wifimon.zip
unzip wifimon.zip |
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.
...
Example pages for each testtool are available in the "measurements" folder of the "testtoolswifimon" directory in the WiFiMon code repository (https://bitbucket.software.geant.org/projects/WFMON/repos/agent/browse/testtools)that was downloaded in the previous section.
2.1.1: NetTest
NetTest measurements require embedding the following lines of code in your website:
...
Step 1: Create the following proxy HTML page in page in the "measurements" folder of the "testtoolswifimon" directory in the WiFiMon code repository (https://bitbucket.software.geant.org/projects/WFMON/repos/agent/browse/testtools)that was downloaed in the previous section:
Code Block | ||||
---|---|---|---|---|
| ||||
<!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 "testtoolswifimon" directory in the WiFiMon code repository(https://bitbucket.software.geant.org/projects/WFMON/repos/agent/browse/testtools)that was downloaded in the previous section:
Code Block | ||||
---|---|---|---|---|
| ||||
<!DOCTYPE html> <html> <head> <title>Speed worker</title> <script type="text/javascript" src="jquery-3.6.0.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> |
...