Iwd: Difference between revisions

imported>Nix
m add Software/Applications subcategory
Silk (talk | contribs)
Fixed an error in prior change (forgot Network)
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
iwd (iNet wireless daemon) is a Linux-only wireless daemon aiming to decrease the time spent making connections.
{{DISPLAYTITLE:iwd}}
[https://archive.kernel.org/oldwiki/iwd.wiki.kernel.org/ iwd] (iNet wireless daemon) is a Linux-only wireless daemon aiming to decrease the time spent making connections.


== Installation ==
== Setup ==


iwd can be enabled with the following snippet.
iwd can be enabled with the following snippet.
Line 13: Line 14:


== Configuration ==
== Configuration ==
To configure iwd, you should use <code>networking.wireless.iwd.settings</code> option. An example configuration, which enables IPv6 and automatic connection to known networks, would be similar to:
<syntaxhighlight lang="nix">
{
  networking.wireless.iwd.settings = {
    Network = {
      EnableIPv6 = true;
    };
    Settings = {
      AutoConnect = true;
    };
  };
}
</syntaxhighlight>
For a detailed and up-to-date list of available settings, please reference the [https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/src/iwd.network.rst network daemon configuration docummentation], from kernel Git repo.
=== Eduroam (WPA2 Enterprise) network ===
[https://eduroam.org Eduroam] wireless networks need to get configured manually by creating following file <code>/var/lib/iwd/eduroam.8021x:</code><syntaxhighlight lang="ini">
[Security]
EAP-Method=PEAP
EAP-Identity=eduroamHDcat2024@uni-heidelberg.de
EAP-PEAP-CACert=/var/lib/iwd/ca.pem
EAP-PEAP-ServerDomainMask=radius-node1.urz.uni-heidelberg.de
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=xyz123@uni-heidelberg.de
EAP-PEAP-Phase2-Password=mypassword
[Settings]
Autoconnect=true
</syntaxhighlight>Replace the value in <code>EAP-Identity</code>, <code>EAP-PEAP-ServerDomainMask</code>, <code>EAP-PEAP-Phase2-Identity</code> and <code>EAP-PEAP-Phase2-Password</code> according to your university presets which can be acquired at [https://cat.eduroam.org cat.eduroam.org]. After entering your university name there the site will offer you a download link to a Python script which contains most of the required default values. The script also contains a certificate string which can be copied into the file <code>/var/lib/iwd/ca.pem</code>.


=== iwd as backend for NetworkManager ===
=== iwd as backend for NetworkManager ===
Line 20: Line 52:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
networking.networkmanager.wifi.backend = "iwd";
networking.networkmanager.wifi.backend = "iwd";
</syntaxhighlight>
</syntaxhighlight>{{Warning|Setting this will silently turn off MAC address randomization as Networkmanager does not control the MAC address randomization features of `iwd` for which it is turned off by default.<ref>https://bbs.archlinux.org/viewtopic.php?id=280657</ref><ref>https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1111</ref>
To remediate this, configure iwd directly using the `AddressRandomization` option.}}


=== iwd as backend for Connman ===
=== iwd as backend for Connman ===
Line 40: Line 73:
</pre>
</pre>
Your desktop manager may not enable some secrets management service you may need to enable one:
Your desktop manager may not enable some secrets management service you may need to enable one:
<syntaxHighlight lang=nix>
<syntaxhighlight lang="nix">
{
{
   services.gnome3.gnome-keyring.enable = true;
   services.gnome.gnome-keyring.enable = true;
}
}
</syntaxHighlight>
</syntaxhighlight>


=== rfkill blocks wireless device ===
=== rfkill blocks wireless device ===
Line 61: Line 94:
</syntaxHighlight>
</syntaxHighlight>


[[Category:Applications]]
=== desconnect-info reason: 2 ===
When using certain chipsets, such as the Qualcomm qcncm865<ref>https://community.frame.work/t/guide-successful-wi-fi-7-802-11be-on-framework-13-amd-with-qualcomm-qcncm865-and-arch-linux/44723</ref>, you need to use legacy EAPoL packets<ref>https://lkml.org/lkml/2020/10/14/1101</ref> to prevent a disconnect loop. In <code>iwd.service</code> this issue shows up as:<syntaxhighlight>
SA Query timed out, connection is invalid.  Disconnecting...
Feb 26 10:17:10 probook iwd[4486]: event: disconnect-info, reason: 2
</syntaxhighlight>If you are using systemd-networkd, this shows up in <code>systemd-networkd.service</code> as repeated <code>Carrier Gained. Carrier Lost.</code> messages. On nixos, this can be resolved by setting the matching iwd settings option.<syntaxhighlight lang="nix">
{
  networking.wireless.iwd.settings.General.ControlPortOverNL80211 = false;
}
</syntaxhighlight>
[[Category:Applications]][[Category: Networking]]