Goal: Use a diagnostic script to parse a WiFi packet capture file and generate histograms, packet loss stats, and other helpful information for diagnosing WiFi behaviour.
LANforge will be used to create a WiFi capture file, and then we will run the diagnostic script to help understand the on-air behaviour.
Create capture file.
If you already have your own capture file or know how to create them, then skip this section.
Packet captures are created using WiFi Monitor interfaces. LANforge can automatically create and manage these for you. The simplest way to create a capture is to use the Port-Mgr tab in the LANforge GUI.
Select WiFi radio that you wish to use and double-click it to bring up the modify window. Set the frequency to match the channel you wish to sniff and click OK to submit the changes and close the window.
Make sure the radio is still selected, and click the 'Sniff Packets' button on the Port Mgr tab. You normally need to be connectedto the LANforge system using remote-desktop or VNC for this to work properly. After you click 'Sniff Packets', a monitor interface will be created and Wireshark will start. When your capture is complete, stop the capture in Wireshark and save the capture file.
Use the do_wifi_diag.bash script to diagnose the capture file.
The LANforge scripts package is normally installed in /home/lanforge/scripts You can also clone the repository from github using this link: https://github.com/greearb/lanforge-scripts Assuming it is in the standard location, change to the wifi_diag directory: cd /home/lanfore/scripts/wifi_diag. The ./do_wifi_diag.bash script will be used to launch the wifi-diag script.
Run the do_wifi_diag.bash script with appropriate arguments to match your device-under-test (DUT) and pcap file. The diagnostic script can process around 300 packets per second on a fast machine, so it can take a while to process a big file.
When the test is complete, you can open the [test]/index.html file to view the results, print to PDF, etc.