CaffeineAddict
Well-Known Member
There are several methods online about how to connect to Wi-Fi network however all those tutorials and guides are kind of deprecated and I found none that would do it by
Here are steps I come out with, but there is problem...
Scan for available Wi-Fi networks:
Output:
Connect to one of the Wi-Fi networks listed:
And finally moment of truth:
This command results in the following error:
Why and how to fix it?
I'm connecting to WPA2 PSK network.
iw
command alone.Here are steps I come out with, but there is problem...
Scan for available Wi-Fi networks:
Bash:
# List available Wi-Fi NIC's
sudo iw dev
# Scan for Wi-Fi networks with selected NIC
sudo iw dev wlan0 scan
Output:
Bash:
#<snip>
SSID: Wi-Fi-Name
#<snip>
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
#<snip>
Connect to one of the Wi-Fi networks listed:
Bash:
# Generate PSK key
wpa_passphrase Wi-Fi-Name
# Connect to Wi-Fi
sudo iw dev wlan0 connect -w Wi-Fi-Name auth<open|shared> key psk:<PSK Key> <AKM Suite> <pairwise CIPHER> <groupwise CIPHER>
# <PSK Key> = PSK key made with wpa_passphrase
# <AKM Suite> = Output of Authentication suites
# <pairwise CIPHER> = Pairwise ciphers
# <groupwise CIPHER> = Group cipher
And finally moment of truth:
Bash:
sudo iw dev wlan0 connect -w Wi-Fi-Name auth shared key psk:6f150a5617d69c6eaf7b7b042c2f4bcb322884aae9c39698 PSK CCMP CCMP
This command results in the following error:
Code:
command failed: Invalid argument (-22)
Why and how to fix it?
I'm connecting to WPA2 PSK network.