Scanning

You can use different tools to scan the Wi-Fi network:

To scan with the nmcli tool:

~# nmcli dev wifi rescan
~# nmcli dev wifi list
*  SSID                      MODE   CHAN  RATE       SIGNAL  BARS  SECURITY        
   ap-wlan1-wpa2aes_a        Infra  36    54 Mbit/s  69      ***   WPA2            
   Buffalo_AG300H_5_N        Infra  36    63 Mbit/s  60      ***   WPA2            
   --                        Infra  132   54 Mbit/s  50      **    WPA1 802.1X     
   LINKSYSENG                Infra  11    54 Mbit/s  60      ***   WPA2            
   Connect                   Infra  11    54 Mbit/s  57      ***   WPA2            
   RoamingNetwork            Infra  9     54 Mbit/s  49      **    WPA2            
   DAP-GUEST                 Infra  11    54 Mbit/s  49      **    WPA1            
   --                        Infra  11    54 Mbit/s  49      **    WPA2 802.1X     
   TP-LINK_26B9              Infra  1     54 Mbit/s  45      **    WPA2 802.1X     
   DAP-GUEST                 Infra  1     54 Mbit/s  45      **    WPA1            
   NETGEAR_WPA2AES           Infra  11    54 Mbit/s  42      **    WPA2            
   --                        Infra  1     54 Mbit/s  42      **    WPA1 802.1X     
   Orange-f702               Infra  6     54 Mbit/s  35      **    WPA1 WPA2       
   _AUTO_ONOWiFi             Infra  1     54 Mbit/s  24      *     WPA1 WPA2 802.1X
   Cisco_2600_WEP128_HEX4    Infra  5     54 Mbit/s  87      ****  WEP             
   Cisco_2600_WEP128_HEX4    Infra  2     54 Mbit/s  79      ***   WEP             
   --                        Infra  1     54 Mbit/s  47      **    WEP             
   Silicon Labs Thread 1F8A  Infra  6     54 Mbit/s  20      *     --              
*  Cisco_1200G_EAP_PEAP      Infra  6     54 Mbit/s  61      ***   WPA2 802.1X     
   Buffalo_AG300H_24_N       Infra  6     63 Mbit/s  62      ***   WPA2 802.1X     
   --                        Infra  52    54 Mbit/s  57      ***   WPA1 802.1X     
   cisco_hb_aes              Infra  6     54 Mbit/s  34      **    WPA1 WPA2       
   Nebraska                  Infra  6     54 Mbit/s  29      *     WPA2            
   MOVISTAR_0F50             Infra  6     54 Mbit/s  19      *     WPA2            
   ONO0D9C                   Infra  9     54 Mbit/s  17      *     WPA2            
   SARES_Cisco_1200          Infra  6     54 Mbit/s  15      *     WPA2            
   --                        Infra  11    54 Mbit/s  50      **    WEP             
   _ONOWiFi                  Infra  9     54 Mbit/s  20      *     --              
 
*  SSID  MODE  CHAN  RATE  SIGNAL  BARS  SECURITY

To scan with the iw tool:

~# iw dev wlan0 scan
 
BSS 84:b5:17:40:a7:c0(on wlan0) -- associated
        TSF: 546312162668 usec (6d, 07:45:12)
        freq: 5180
        beacon interval: 102 TUs
        capability: ESS Privacy SpectrumMgmt (0x0111)
        signal: -11.00 dBm
        last seen: 0 ms ago
        Information elements from Probe Response frame:
        SSID: Cisco_2600_WPA2_AES
        Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0
        HT capabilities:
                Capabilities: 0x19ee
                        HT20/HT40
                        SM Power Save disabled
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 7935 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT RX MCS rate indexes supported: 0-23
                HT TX MCS rate indexes are undefined
        RSN:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
                 * Capabilities: 16-PTKSA-RC 16-GTKSA-RC (0x003c)
        HT operation:
                 * primary channel: 36
                 * secondary channel offset: no secondary
                 * STA channel width: 20 MHz
                 * RIFS: 1
                 * HT protection: no
                 * non-GF present: 1
                 * OBSS non-GF present: 0
                 * dual beacon: 0
                 * dual CTS protection: 0
                 * STBC beacon: 0
                 * L-SIG TXOP Prot: 0
                 * PCO active: 0
                 * PCO phase: 0
        WMM:     * Parameter version 1
                 * u-APSD
                 * BE: CW 15-1023, AIFSN 3
                 * BK: CW 15-1023, AIFSN 7
                 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
                 * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
BSS 6c:99:89:76:43:9f(on wlan0)
(truncated)

To scan with the wpa_cli tool:

~# wpa_cli -iwlan0 scan
~# wpa_cli -iwlan0 scan_results
bssid / frequency / signal level / flags / ssid
84:b5:17:40:a7:c0       5180    -11     [WPA2-PSK-CCMP][ESS]    Cisco_2600_WPA2_AES
84:b5:17:40:a7:c0       5180    -11     [WPA2-PSK-CCMP][ESS]    \x00
6c:99:89:76:43:92       2462    -70     [WPA-PSK-CCMP+TKIP][ESS]        DAP-GUEST
58:6d:8f:ea:0e:7a       2462    -71     [WPA2-PSK-CCMP][WPS][ESS]       LINKSYSENG
d8:eb:97:ab:11:20       5240    -81     [WPA2-PSK-CCMP][ESS]    RoamingNetwork_A
6c:99:89:76:43:90       2462    -75     [WPA2-EAP-CCMP][ESS]    \x00
68:7f:74:17:cc:c4       2437    -75     [WPA2-PSK-CCMP][ESS]    WRT610N
6c:99:89:76:43:9f       5260    -82     [WPA2-EAP-CCMP][ESS]    \x00
6c:99:89:76:43:9e       5260    -82     [WPA-EAP-TKIP][ESS]     \x00
a4:2b:b0:de:26:b9       2437    -82     [WPA-PSK-CCMP][WPA2-PSK-CCMP][WPS][ESS] TP-LINK_26B9
e0:0e:da:38:c1:cf       5320    -91     [WPA2-EAP-CCMP][ESS]    \x00
6c:99:89:76:43:93       2462    -70     [WEP][ESS]      \x00
e0:0e:da:38:c1:c3       2412    -78     [WEP][ESS]      \x00
ec:e1:a9:9a:66:50       5580    -83     [ESS]   cisco_me_open_5g
00:90:4c:91:00:01       2462    -84     [ESS]   Connect

Connect

You can use NetworkManager to connect to a Wi-Fi network. Run nmcli with parameter '-a' to be prompted for any missing parameters, like Wi-Fi password:

~# nmcli dev wifi connect TP-LINK_2A39_5G -a
Password:
Device 'wlan0' successfully activated with '26130be0-7ac4-49f7-a97e-bf68ef8c443b'.
~#

You can use different tools to get information about the status of the Wi-Fi interfaces:

To get the status of all devices managed by NetworkManager, use the nmcli tool:

~# nmcli dev status
DEVICE  TYPE      STATE        CONNECTION
eth1    ethernet  connected    eth1      
wlan0   wifi      connected    wlan0     
eth0    ethernet  unavailable  --        
can0    can       unmanaged    --        
lo      loopback  unmanaged    --        
sit0    sit       unmanaged    --        
wlan1   wifi      unmanaged    --

To get the status with the iw tool:

~# iw dev wlan0 link
Connected to 84:b5:17:40:a7:c0 (on wlan0)
	SSID: Cisco_2600_WPA2_AES
	freq: 5180
	RX: 14188 bytes (110 packets)
	signal: -11 dBm
	tx bitrate: 72.2 MBit/s MCS 7 short GI

To get the status with the wpa_cli tool:

~# wpa_cli -iwlan0 status
bssid=84:b5:17:40:a7:c0
freq=5180
ssid=Cisco_2600_WPA2_AES
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.43.30
p2p_device_address=00:40:9d:98:a6:84
address=00:40:9d:98:a6:84
uuid=883ffae7-742b-59c4-9422-ab29a4b2ab6a

Use the following command to get a list of Wi-Fi link capabilities:

~# iw list