Differences between revisions 10 and 19 (spanning 9 versions)
Revision 10 as of 2019-12-19 10:18:10
Size: 2425
Editor: ?cipher
Comment:
Revision 19 as of 2021-11-18 12:32:56
Size: 4105
Editor: ?gad3r
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<TableOfContents(3)>>
Line 3: Line 5:
DebianPkg:iwd is a new component aiming to potentially replace DebianPkg:wpasupplicant in the future. It is currently available in what should be considered a 'tech preview' state since debian Buster / 10. Both ConnMan and NetworkManager has support for using iwd as a backend. Further information below will focus on using NetworkManager with iwd. (Please note that iwd heavily relies on linux features which means you need a recent kernel version.) DebianPkg:iwd is an alternative to DebianPkg:wpasupplicant.
IWD itself is considered stable since debian Bookworm / 11,
is supported as backed by both ConnMan and NetworkManager,
however the NetworkManager backend is considered in an experimental state
([[https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.32.12/man/NetworkManager.conf.xml#L1232|as of NetworkManager v1.32.12]]).

Further information below will focus on using NetworkManager with IWD.
(Please note that IWD heavily relies on linux features which means you may benefit from using a more recent kernel version.)
Line 9: Line 18:
The iwd backend is available in upstream NetworkManager since 0.11.x but disabled by default, both at build-time and run-time. The DebianPkg:network-manager package has enabled the iwd backend at build-time since 0.11.4 (available since Buster/10.0). This means you can easily test using iwd backend just by enabling it at runtime yourself. The IWD backend is available in upstream NetworkManager but disabled by default, both at build-time and run-time.
The DebianPkg:network-manager package has enabled the IWD backend at build-time, but depends on runtime-competing daemon pkg:wpasupplicant.
This means you can test using IWD backend by enabling it at runtime yourself.
Line 11: Line 22:
= Enabling iwd backend =
Line 13: Line 23:
To enable the iwd backend you need to:
 * Install iwd: apt install iwd
 * configure NetworkManager to enable/use the iwd backend (instead of the wpasupplicant backend), see code snippet below.
 * Stop NetworkManager.service and ```wpa_supplicant.service```, then restart NetworkManager.service
= Enabling IWD backend =
Line 18: Line 25:
To enable the IWD backend, you need to:
 * Install [[DebianPkg:iwd]]: `apt install iwd`
 * configure NetworkManager to enable/use the IWD backend (instead of the wpasupplicant backend), see code snippet below.
 
Line 24: Line 35:
* Stop NetworkManager.service and disable ```wpa_supplicant.service```, then restart NetworkManager.service
{{{{
sudo systemctl stop NetworkManager
sudo systemctl disable --now wpa_supplicant
sudo systemctl restart NetworkManager
}}}}
Line 25: Line 42:
Please also refer to the [[https://iwd.wiki.kernel.org/networkmanager|upstream iwd information page on NetworkManager]]. Please also refer to the [[https://iwd.wiki.kernel.org/networkmanager|upstream IWD information page on NetworkManager]].

= Connecting through iwctl =

== Interactive mode ==

Start the interactive mode:

{{{{
$ iwclt
}}}}

To list the help menu:

{{{{
[iwd]# help
}}}}

To get the wireless device name:

{{{{
[iwd]# device list
}}}}

Sample output:

{{{{
                                    Devices
--------------------------------------------------------------------------------
  Name Address Powered Adapter Mode
--------------------------------------------------------------------------------
  wlan0 0c:98:e6:b2:ad:d5 on phy0 station
}}}}


Network scanning:

{{{{
[iwd]# station wlan0 scan
}}}}

To list available networks:

{{{{
[iwd]# station wlan0 get-networks
}}}}

To connect:
{{{{
[iwd]# station wlan0 connect "SSID"
}}}}
Then enter the passphrase when prompted.

Connection stat:
{{{{
[iwd]# station wlan0 show
}}}}

To disconnect:
{{{{
[iwd]# station wlan0 disconnect
}}}}

== Command line arguments ==

Without entering the interactive mode, the above command can be executed from shell as follows:

{{{{
$ iwctl device list
$ iwctl station wlan0 scan
$ iwctl station wlan0 get-networks
$ iwctl --passphrase "mysecret" station wlan0 connect "SSID"
$ iwctl station wlan0 show
$ iwctl station wlan0 disconnect
}}}}
Line 29: Line 121:
As of right now the only known issue with iwd is the [[https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/285|inability to connect to hidden SSIDs]] using NetworkManager. Feedback about your success or failure with iwd is warmly welcome! Please file a bug report. As of 2021-10-02 the following issues with using IWD as backend for NetworkManager are:
 * [[https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/628|NetworkManager does not reconnect a connection dropped by the other side]]
 * [[https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/202|connections created with WPA-Supplicant are not reused with IWD]]
Line 31: Line 125:
Note: Enterprise networks might not work when using official Debian kernel as it used to lack the required config options enabled. This has been fixed since linux 5.3.9-1 (see #924705) and should be available since Bullseye. Buster users are adviced to compile their own kernel if they have the need to connect to enterprise networks (or use wpa_supplicant until upgrading to Bullseye). Pease also refer to the [[https://gitlab.freedesktop.org/search?group_id=1204&project_id=411&scope=issues&search=IWD|NetworkManager issue tracker]].

Feedback about your success or failure with IWD is warmly welcome! Please file a bug report.
Line 36: Line 132:
If you're having problems getting wifi working in NetworkManager with the iwd backend enabled, please make sure the iwd service is running. See '''systemctl status iwd''' If you're having problems getting wifi working in NetworkManager with the IWD backend enabled,
please make sure the IWD service is running.
See '''systemctl status iwd'''

Intro

iwd is an alternative to wpasupplicant. IWD itself is considered stable since debian Bookworm / 11, is supported as backed by both ConnMan and NetworkManager, however the NetworkManager backend is considered in an experimental state (as of NetworkManager v1.32.12).

Further information below will focus on using NetworkManager with IWD. (Please note that IWD heavily relies on linux features which means you may benefit from using a more recent kernel version.)

Please consider reading the Upstream Wiki for more in-depth and up to date information.

Prerequisites

The IWD backend is available in upstream NetworkManager but disabled by default, both at build-time and run-time. The network-manager package has enabled the IWD backend at build-time, but depends on runtime-competing daemon pkg:wpasupplicant. This means you can test using IWD backend by enabling it at runtime yourself.

Enabling IWD backend

To enable the IWD backend, you need to:

  • Install iwd: apt install iwd

  • configure NetworkManager to enable/use the IWD backend (instead of the wpasupplicant backend), see code snippet below.

Append the following snippet in /etc/NetworkManager/NetworkManager.conf

[device]
wifi.backend=iwd

* Stop NetworkManager.service and disable wpa_supplicant.service, then restart NetworkManager.service

sudo systemctl stop NetworkManager
sudo systemctl disable --now wpa_supplicant
sudo systemctl restart NetworkManager

Please also refer to the upstream IWD information page on NetworkManager.

Connecting through iwctl

Interactive mode

Start the interactive mode:

$ iwclt

To list the help menu:

[iwd]# help

To get the wireless device name:

[iwd]# device list

Sample output:

                                    Devices                                    
--------------------------------------------------------------------------------
  Name                Address             Powered   Adapter   Mode      
--------------------------------------------------------------------------------
  wlan0               0c:98:e6:b2:ad:d5   on        phy0      station   

Network scanning:

[iwd]# station wlan0 scan

To list available networks:

[iwd]# station wlan0 get-networks

To connect:

[iwd]# station wlan0 connect "SSID"

Then enter the passphrase when prompted.

Connection stat:

[iwd]# station wlan0 show

To disconnect:

[iwd]# station wlan0 disconnect

Command line arguments

Without entering the interactive mode, the above command can be executed from shell as follows:

$ iwctl device list
$ iwctl station wlan0 scan
$ iwctl station wlan0 get-networks
$ iwctl --passphrase "mysecret" station wlan0 connect "SSID"
$ iwctl station wlan0 show
$ iwctl station wlan0 disconnect

Known issues

As of 2021-10-02 the following issues with using IWD as backend for NetworkManager are:

Pease also refer to the NetworkManager issue tracker.

Feedback about your success or failure with IWD is warmly welcome! Please file a bug report.

Troubleshooting

If you're having problems getting wifi working in NetworkManager with the IWD backend enabled, please make sure the IWD service is running. See systemctl status iwd