Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

iwd: improving on wpa_supplicant

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

iwd: improving on wpa_supplicant

#1 Post by Head_on_a_Stick »

The iNet Wireless Daemon (iwd) project aims to provide a comprehensive Wi-Fi connectivity solution for Linux based devices. The core goal of the project is to optimize resource utilization: storage, runtime memory and link-time costs. This is accomplished by not depending on any external libraries and utilizes features provided by the Linux Kernel to the maximum extent possible. The result is a self-contained environment that only depends on the Linux Kernel and the runtime C library.

https://iwd.wiki.kernel.org/

The iwd package can be used as a drop-in replacement for wpa_supplicant and works well with both NetworkManager and systemd-networkd. The versions in testing/unstable have a built-in DHCP client and so can be used as a standalone wirleless networking solution.

Usage

NetworkManager

Install the iwd package then create a file at /etc/NetworkManager/conf.d/wifi_backend.conf with this content:

Code: Select all

[device]
wifi.backend=iwd
Then reboot, iwd should be running instead of wpa_supplicant.

systemd-networkd

Disable wpa_supplicant and enable iwd instead:

Code: Select all

# systemctl enable iwd
To connect to the access point without NetworkManager run the interactive command line tool: https://wiki.archlinux.org/index.php/Iwd#iwctl

Standalone

To use iwd by itself (ie, without NetworkManager or systemd-networkd) edit /etc/iwd/main.conf and add this section:

Code: Select all

[General]
EnableNetworkConfiguration=true
Then edit the connection file at /var/lib/iwd/$ssid.psk (replace $ssid with the name of the access point) and add the IP address configuration, for example:

Code: Select all

[IPv4]
ip=192.168.1.51
gateway=192.168.1.254
Adjust the values according to the network in use (a 24-bit netmask is assumed), use ip r to list the current values.

I've backported the testing/unstable version to Debian buster, packages here: https://software.opensuse.org//download ... ackage=iwd

Once the newer package is installed delete the file at /usr/lib/modules-load.d/pkcs8.conf to avoid a unit failure for the module loading service on reboot.
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: iwd: improving on wpa_supplicant

#2 Post by Deb-fan »

Thanks, always interested in networking stuff. Networkd + wpa_supplicant works great, only been using it briefly. People have tried this setup(with iwd), found noticeable benefits-improvements over wpa_supplicant? Very pleased with what I'm using and haven't gotten down how to best use it as yet. Still there's always room for improvement. Cool, will research further. :)
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
oswaldkelso
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1493
Joined: 2005-07-26 23:20
Location: UK
Has thanked: 1 time
Been thanked: 59 times

Re: iwd: improving on wpa_supplicant

#3 Post by oswaldkelso »

Cheers for putting me on to iwd hoas

This is what I did from my notes when on buster.
I can't recall if I just removed wpa_supplicant or not. Anyway it was easy and worked well though I live in the middle of nowhere so have no need of encryption. If you do there are a few extra steps (Arch wiki)

#Show network hardware available on MY laptop: (wls33)
code:

Code: Select all

ip link
output:
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens34: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 90:fb:a6:87:be:0e brd ff:ff:ff:ff:ff:ff
3: wls33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
link/ether f0:7b:cb:90:bf:4f brd ff:ff:ff:ff:ff:ff

#iirc lines starting with "e" are ethernet "w" wifi


#show network wifi available for connection and their names : "Swift 2 Plus" (my phone) TNCAP5B7823 (router) & Belkin_G_Plus_MIMO_C51B1F (switch)
The ">" shows the currently connected one.

code:

Code: Select all

iwctl station wls33 get-networks
output:
iwctl station wls33 get-networks
Available networks
--------------------------------------------------------------------------------
Network name Security Signal
--------------------------------------------------------------------------------
TNCAP5B7823 open ****
> Belkin_G_Plus_MIMO_C51B1F open ****
Swift 2 Plus open ****

#I would make connection with one of the following:

Code: Select all

iwctl station wls33  connect "Swift 2 Plus" 
iwctl station wls33  connect  Belkin_G_Plus_MIMO_C51B1F
iwctl station wls33  connect  TNCAP5B7823  

#test connection,with ping. You should see something like this:

Code: Select all

ping -c 3 gnu.org
PING gnu.org (209.51.188.148) 56(84) bytes of data.
64 bytes from wildebeest.gnu.org (209.51.188.148): icmp_seq=1 ttl=52 time=101 ms
64 bytes from wildebeest.gnu.org (209.51.188.148): icmp_seq=2 ttl=52 time=99.4 ms
64 bytes from wildebeest.gnu.org (209.51.188.148): icmp_seq=3 ttl=52 time=100 ms

--- gnu.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 99.413/100.104/100.567/0.497 ms

edit: I checked my irc logs and found a conversation about it. Looks like I just removed wpa_supplicant dhcpclient and connman.
I tried iwd on a Debian stystem, eventually I was able to remove wpa_supplicant dhcpclient and connman
basically it has it's own dhcpclient built in I only needed dhcpcd and iwd to connect... assuming I did it all correctly

So just iwd and dhcpcd?

yes as far as I could tell. The only thing I did wonder was if there were some configs left from the previous wifi clients.
But I don't think so as I started it if found the wifi and eth0 I chose and it connected

Via GUI?

No terminal. There was dhcpcd-gtk . I tried it but the weight was the same as connman-get so tried iwd
Last edited by oswaldkelso on 2020-03-11 07:57, edited 1 time in total.
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
My oldest used PC: 1999 imac 333Mhz 256MB PPC abandoned by Debian

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: iwd: improving on wpa_supplicant

#4 Post by Deb-fan »

^ Has to be considered an upvote. Am sure looked this over eval'ing a replacement for Ceni though there was much ado surrounding networkd + wpa_supplicant so just went with that. Iwd seems really straight forward, wondering what quantifiable benefits are had using it vs wpaspplicant ? System overhead, speeds, connection stability, better security to an extent, the types of things users are bound to care about ? Looks easy enough to setup/config not seeing anything wpa_supp can't handle too. Will have to look for stats, aka: iwd vs wpa googling. Hoping someone with a decent degree of hands on will post something solid, one way or the other or someone already setup do some testing?

Edit: Not in a spot to test and not overly motivated to replace a config working great regardless. Still thanks, seems fairly well documented will eventually test things, cause why not.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: iwd: improving on wpa_supplicant

#5 Post by Head_on_a_Stick »

oswaldkelso wrote:I only needed dhcpcd and iwd to connect
You don't need dhcpcd for the version in testing/unstable, iwd now has it's own DHCP client built in:

https://wiki.archlinux.org/index.php/Iw ... figuration
deadbang

Post Reply