Skip to content

Instantly share code, notes, and snippets.

@DrSpeedy
Created May 17, 2021 12:29
Show Gist options
  • Save DrSpeedy/dff5850e9ab0d9454579547f0d83aa33 to your computer and use it in GitHub Desktop.
Save DrSpeedy/dff5850e9ab0d9454579547f0d83aa33 to your computer and use it in GitHub Desktop.
Automated Iperf3 Testing For Unifi APs
@echo off
set ui_ctrlr_count=1
set iperf_server_ip="10.42.0.1"
set iperf_server_port=5201
set iperf_server_threads=1
set iperf_server_window_size=64k
for /L %%A in (1,1,%ui_ctrlr_count%) do (
echo %%A
echo "Testing Controller ID#%%A 5GHz"
netsh wlan connect ssid=UI-Test-%%A-5G name=UI-Test-%%A-5G
ping -n 10 127.0.0.1 > NUL
.\iperf3.exe -c %iperf_server_ip% -p %iperf_server_port% -P %iperf_server_threads% -w %iperf_server_window_size%
rem Sleep for 3 seconds
ping -n 3 127.0.0.1 > NUL
echo
echo
echo "Testing Controller ID#%%A 2.4GHz"
netsh wlan connect ssid=UI-Test-%%A-2.4G name=UI-Test-%%A-2.4G
ping -n 10 127.0.0.1 > NUL
.\iperf3.exe -c %iperf_server_ip% -p %iperf_server_port% -P %iperf_server_threads% -w %iperf_server_window_size%
echo
echo
)
echo
echo Done.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment