Wifi NetworkManager
Managing WIFI using NetworkManager
Enabling and disabling WIFI
To check if WIFI is enabled by NetworkManager run
# nmcli dev show wlan0
and check the GENERAL.STATE line. If WIFI is enabled, the state is either connected or disconnected. If WIFI is disabled the state is unavailable.
To enable WIFI run
# nmcli radio wifi on
or if you need to disable it you can run
# nmcli radio wifi off
Scanning for available WIFI APs
If WIFI is enabled you can get the list of available APs by running
# nmcli dev wifi list
Connecting to an open WIFI network
To connect to an open WIFI network run
# nmcli dev wifi connect <SSID>
To connect to an open hidden WIFI network run
# nmcli dev wifi connect <SSID> hideen yes
To check connection status run
# nmcli dev show wlan0
Connecting to a protected WIFI network
To connect to a protected WIFI network run
# nmcli dev wifi connect <SSID> password <password>
To connect to a protected hidden WIFI network run
# nmcli dev wifi connect <SSID> password <password> hidden yes
To check connection status run
# nmcli dev show wlan0
Managing existing connections
Once established, the connection is preserved across reboots unless deleted explicitly.
To show existing connections run
# nmcli con show
To disconnect from WIFI network run
# nmcli con down <SSID>
To reconnect to WIFI network run
# nmcli con up <SSID>
To permanently delete connection run
# nmcli con delete <SSID>
Testing WIFI throughput
Establish connection to WIFI network and use iperf3 tool on and another node:
iperf3 server (on Target/Host):
# iperf3 -s
iperf3 client (on Host/Target):
Run UDP test for 30 seconds # iperf3 -c <IP_ADDRESS_OF_IPERF_SERVER> -u -t 30 -P 2 -b 0
Run TCP test for 30 seconds # iperf3 -c <IP_ADDRESS_OF_IPERF_SERVER> -t 30