This page' objective is to get a network WiFi connection on a laptop, using iwd.
iwd requires the DNS resolution service to run, so run it by typing:
systemcltl start systemd-resolved
Then, start the iwd daemon by typing:
systemctl start iwd
Launch iwd by typing:
iwctl
You get a iwd-specific prompt.
List the available network interfaces by typing:
device list
I got an interface named wlan0.
If the interface is not enabled, try to enable it via:
device wlan0 set-property Powered on
If it fails, quit iwd by typing:
quit
and use executable rfkill to get the blocking status for the wlan0 interface:
rfkill
For me, the interface was "software-blocked". Unlock it by typing:
rfkill unblock wlan
Then, come back to iwctl, list devices and the wlan0 should be "on".
Scan surrounding WiFi networks by typing:
station wlan0 scan
Then, get the scanned network named by typing:
station wlan0 get-networks
iwd will show you the available networks. In my case, my WiFi netwok is named GeezTeem. In order to connect to it, type:
station wlan connect GeezTeem
If it is not the first time iwd connects to the network, and if it is protected, iwd will ask you to enter thr passphrase.
Then, iwd stores passphrases in /var/lib/iwd. For the GeezTeem network, it created a file named /var/lib/iwd/GeezTeem.psk.
You can then quit iwctl by typing "quit": your network is up. To check it, try a ping:
ping geezteem.com
and check the "packet loss" that should be 0%.
In order to enable all this at boot, enable, at boot, the 3 following services:
systemctl enable systemd-resolved
systemctl enable systemd-networkd
systemctl enable iwd
On next next reboot, your laptop should be automatically connected to the GeezTeem WiFi network.