You are not logged in.

#201 2019-12-20 17:29:15

verto6
Member
Registered: 2019-12-18
Posts: 4

Re: The IWD thread

@CarbonChauvinist, thanks for your help. I went through the mailing list and checked that issue, but it apparently only applied to iwd 1.3. I couldn't connect to eduroam in iwd 1.2 neither.

I think I tried all possible variations of the credentials in the config file, nothing worked so far. Unfortunately, the debug messages in the journal are also really sparse.
It only tells me:

iwd[1566]: 4-Way handshake failed for ifindex: 2, reason: 15

I put

export IWD_PEAP_DEBUG=1

and the other 3 debug variables into my .bash_profile (and rebooted), but that didn't change nothing at all. Am I doing it wrong?


Regarding the DNS resolution: I switched to resolvconf in the /etc/iwd/main.conf and now I at least don't get the warning about the missing systemd-resolved service anymore.
I don't have the openresolv package installed though (which iwd expects as alternative to systemd-resolved), but I am happy with a static nameserver in /etc/resolv.conf. So DNS isn't an issue for me now. Only the eduroam connection doesn't work.

I am clearly missing something as there are almost no issues/complains about iwd and eduroam on google. Or the majority of the users is using iwd with a frontend like NM or connman or systemd-netword, which I try to avoid...

Offline

#202 2019-12-21 10:49:32

Kniyl
Member
Registered: 2019-12-20
Posts: 3

Re: The IWD thread

@verto6 Thanks for the pointers, but unfortunately this doesn't seem to be the case.

/usr/local/lib/systemd/network

and

/run/systemd/network

does not exist. There is the default

/usr/lib/systemd/network/80-iwd.link

available; and removing it gives me the interface name from the kernel back (as previously mentioned by others on this thread). Lastly, there is my

/etc/systemd/network/25-wireless.network

config which contains:

[Match]
Type=wlan

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=20

None of these feels like it could help with IWD's known networks.

Offline

#203 2019-12-21 12:56:11

progandy
Member
Registered: 2012-05-17
Posts: 3,682

Re: The IWD thread

verto6 wrote:

I put

export IWD_PEAP_DEBUG=1

and the other 3 debug variables into my .bash_profile (and rebooted), but that didn't change nothing at all. Am I doing it wrong?

The variable should be set in the systemd service file I think.
https://wiki.archlinux.org/index.php/Sy … p-in_files
https://wiki.archlinux.org/index.php/Sy … _a_service
https://coreos.com/os/docs/latest/using … units.html

Last edited by progandy (2019-12-21 12:57:36)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#204 2019-12-21 13:10:13

Kniyl
Member
Registered: 2019-12-20
Posts: 3

Re: The IWD thread

Interestingly enough, looking for solving this issue yielded the fact that IWD monitors the /var/lib/iwd folder for new files. So I went for an experiment:

# systemctl stop iwd.service
# systemctl start iwd.service
$ iwctl known-networks list
                                 Known Networks                                
--------------------------------------------------------------------------------
  Name                            Security   Hidden   Last connected     
--------------------------------------------------------------------------------
# touch /var/lib/iwd/*.*
$ iwctl known-networks list
                                 Known Networks                                
--------------------------------------------------------------------------------
  Name                            Security   Hidden   Last connected     
--------------------------------------------------------------------------------
  Visiteurs_CNES                  open                Dec 21,  1:01 PM   
  UPC0858175                      psk                 Dec 21,  1:01 PM   
  Moto_manu                       psk                 Dec 21,  1:01 PM   
  Le_terrier                      psk                 Dec 21,  1:01 PM   
  IKD_LG_Muret_Auto               open                Dec 21,  1:01 PM   

Before the touch, I was disconnected, after the touch, autoconnect eventually kicked in.

So this all boils down to IWD somehow not reading /var/lib/iwd upon restarts; as a quick fix I added an

ExecStartPost=/usr/bin/bash -c 'touch /var/lib/iwd/*.*'

line in an override file and this seems to do the job, but I wonder if anything better can be done.

Offline

#205 2019-12-22 14:06:18

verto6
Member
Registered: 2019-12-18
Posts: 4

Re: The IWD thread

progandy wrote:

The variable should be set in the systemd service file I think.

Thank you, I didn't think of that. I get some more debug infos now.

@Kniyl: Nice find and good workaround! At least until you find the real cause.

Offline

#206 2019-12-23 15:21:35

digitalone
Member
Registered: 2011-08-19
Posts: 246

Re: The IWD thread

Who is successfully using iwd?

I'm trying to use it sometimes, but keep getting random disconnections.

wpa_supplicant is far more robust than iwd. I noticed that on 5 GHz where my laptop gets a bad signal, on wpa_supplicant the bandwidth is only reduced at very minimum, but the connection stays on, while on iwd it goes down. Sometimes it happens also on 2,4 GHz while never happened with wpa_supplicant.

Offline

#207 2020-01-07 05:32:20

chr0mag
Member
Registered: 2017-02-02
Posts: 90

Re: The IWD thread

Has anyone managed to get iwd working with a WPA3/SAE enabled AP? I've got a hostapd instance running with WPA3/SAE configured (correctly -- I can connect using WPA3/SAE from a different device) but can't get iwd to connect. I see:

iwd[4093]: Received Deauthentication event, reason: 2, from_ap: true

...in the iwd journal when I attempt to associate with the AP.

Searching iwd git for "wpa3" and "sae" return many commits and "WPA3-Personal (SAE)" is mentioned in *man 5 iwd.network* -- all of which suggested that there is some level of support for this so I'm curious if anyone else has attempted and had success.

Offline

#208 2020-01-12 20:49:58

chr0mag
Member
Registered: 2017-02-02
Posts: 90

Re: The IWD thread

chr0mag wrote:

Has anyone managed to get iwd working with a WPA3/SAE enabled AP? I've got a hostapd instance running with WPA3/SAE configured (correctly -- I can connect using WPA3/SAE from a different device) but can't get iwd to connect. I see:

iwd[4093]: Received Deauthentication event, reason: 2, from_ap: true

...in the iwd journal when I attempt to associate with the AP.

Searching iwd git for "wpa3" and "sae" return many commits and "WPA3-Personal (SAE)" is mentioned in *man 5 iwd.network* -- all of which suggested that there is some level of support for this so I'm curious if anyone else has attempted and had success.

After enabling more logging/debugging I see the following during the failed WPA3 connection attempt:
hostapd journal

Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 IEEE 802.11: authentication OK (open system)
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 MLME: MLME-AUTHENTICATE.indication(34:f3:9a:bc:84:e1, OPEN_SYSTEM)
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 MLME: MLME-DELETEKEYS.request(34:f3:9a:bc:84:e1)
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 IEEE 802.11: authenticated
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 IEEE 802.11: association OK (aid 2)
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 IEEE 802.11: associated (aid 2)
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 MLME: MLME-ASSOCIATE.indication(34:f3:9a:bc:84:e1)
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 MLME: MLME-DELETEKEYS.request(34:f3:9a:bc:84:e1)
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 IEEE 802.11: binding station to interface 'wifi0'
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: event 1 notification
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: start authentication
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 IEEE 802.1X: unauthorizing port
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: sending 1/4 msg of 4-Way Handshake
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: received EAPOL-Key frame (2/4 Pairwise)
Jan 11 18:44:49 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: invalid MIC in msg 2/4 of 4-Way Handshake
Jan 11 18:44:50 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: EAPOL-Key timeout
Jan 11 18:44:50 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: sending 1/4 msg of 4-Way Handshake
Jan 11 18:44:50 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: received EAPOL-Key frame (2/4 Pairwise)
Jan 11 18:44:50 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: invalid MIC in msg 2/4 of 4-Way Handshake
Jan 11 18:44:51 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: EAPOL-Key timeout
Jan 11 18:44:51 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: sending 1/4 msg of 4-Way Handshake
Jan 11 18:44:51 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: received EAPOL-Key frame (2/4 Pairwise)
Jan 11 18:44:51 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: invalid MIC in msg 2/4 of 4-Way Handshake
Jan 11 18:44:52 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: EAPOL-Key timeout
Jan 11 18:44:52 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: sending 1/4 msg of 4-Way Handshake
Jan 11 18:44:52 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: received EAPOL-Key frame (2/4 Pairwise)
Jan 11 18:44:52 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: invalid MIC in msg 2/4 of 4-Way Handshake
Jan 11 18:44:53 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: EAPOL-Key timeout
Jan 11 18:44:53 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: PTKSTART: Retry limit 4 reached
Jan 11 18:44:53 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 WPA: event 3 notification
Jan 11 18:44:53 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 IEEE 802.1X: unauthorizing port
Jan 11 18:44:53 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 MLME: MLME-DEAUTHENTICATE.indication(34:f3:9a:bc:84:e1, 2)
Jan 11 18:44:53 apu2c4 hostapd[16489]: wifi0: STA 34:f3:9a:bc:84:e1 MLME: MLME-DELETEKEYS.request(34:f3:9a:bc:84:e1)

iwd run with -d option

src/network.c:network_connect() 
src/network.c:network_connect_psk() ask_passphrase: true
src/agent.c:agent_request_passphrase() agent 0x5642e2d8eef0 owner :1.1180 path /agent/5418
src/agent.c:agent_send_next_request() send request to :1.1180 /agent/5418
src/agent.c:agent_receive_reply() agent 0x5642e2d8eef0 request id 75
src/network.c:passphrase_callback() result 0
src/station.c:station_enter_state() Old State: autoconnect_quick, new state: connecting
src/scan.c:scan_periodic_stop() Stopping periodic scan for wdev 1
src/scan.c:scan_cancel() Trying to cancel scan id 1 for wdev 1
src/netdev.c:netdev_mlme_notify() MLME notification New Station(19)
src/station.c:station_netdev_event() Associating
src/netdev.c:netdev_mlme_notify() MLME notification Authenticate(37)
src/netdev.c:netdev_authenticate_event() 
src/netdev.c:netdev_mlme_notify() MLME notification Associate(38)
src/netdev.c:netdev_associate_event() 
src/netdev.c:netdev_mlme_notify() MLME notification Connect(46)
src/netdev.c:netdev_connect_event() 
src/netdev.c:netdev_link_notify() event 16 on ifindex 3
src/netdev.c:netdev_link_notify() event 16 on ifindex 3
src/netdev.c:netdev_link_notify() event 16 on ifindex 3
src/netdev.c:netdev_link_notify() event 16 on ifindex 3
src/netdev.c:netdev_unicast_notify() Unicast notification 129
src/netdev.c:netdev_control_port_frame_event() 
src/eapol.c:eapol_handle_ptk_1_of_4() ifindex=3
src/netdev.c:netdev_control_port_frame_cb() 0
src/netdev.c:netdev_unicast_notify() Unicast notification 129
src/netdev.c:netdev_control_port_frame_event() 
src/eapol.c:eapol_handle_ptk_1_of_4() ifindex=3
src/netdev.c:netdev_control_port_frame_cb() 0
src/netdev.c:netdev_unicast_notify() Unicast notification 129
src/netdev.c:netdev_control_port_frame_event() 
src/eapol.c:eapol_handle_ptk_1_of_4() ifindex=3
src/netdev.c:netdev_control_port_frame_cb() 0
src/netdev.c:netdev_unicast_notify() Unicast notification 129
src/netdev.c:netdev_control_port_frame_event() 
src/eapol.c:eapol_handle_ptk_1_of_4() ifindex=3
src/netdev.c:netdev_control_port_frame_cb() 0
src/netdev.c:netdev_link_notify() event 16 on ifindex 3
src/netdev.c:netdev_mlme_notify() MLME notification Del Station(20)
src/netdev.c:netdev_mlme_notify() MLME notification Deauthenticate(39)
src/netdev.c:netdev_deauthenticate_event() 
src/netdev.c:netdev_mlme_notify() MLME notification Disconnect(48)
src/netdev.c:netdev_disconnect_event() 
Received Deauthentication event, reason: 2, from_ap: true
src/station.c:station_disconnect_event() 3
src/station.c:station_connect_cb() 3, result: 3
src/station.c:station_disassociated() 3
src/station.c:station_enter_state() Old State: connecting, new state: disconnected

A bit of searching suggests that WPA: invalid MIC in msg 2/4 of 4-Way Handshake indicates an incorrect passphrase which is curious since this passphrase is WPA3/SAE specific and works successfully from my iPhone. (hostapd allows specifying an 'sae_passphrase' for WPA3-Personal that is different from the 'wpa_passphrase' used for WPA2 -- this is how I am confirming whether clients can connect using WPA3/SAE.)

Offline

#209 2020-01-19 23:03:15

dilyn
Member
From: Lansing, MI
Registered: 2014-07-16
Posts: 10

Re: The IWD thread

goether wrote:

I actually have the same problem with exact specs (Macbook pro 11,3 with broadcom-wl-dkms) I could not get iwd to work so at the moment I'm using NetworkManager


tagenk wrote:

Any update on this  for anyone "in the know"?  I am having this exact issue.  I am running a MacBook Pro with the broadcom-wl-dkms package. I am also using the iwd 1.0 package.  Thanks!


Moo-Crumpus wrote:

... and what about this? Weird.

                                
[iwd]# station wlan0 show
                                 Station: wlan0                                
--------------------------------------------------------------------------------
  Settable  Property            Value                                          
--------------------------------------------------------------------------------
            Scanning            no
            State               disconnected

[iwd]# station wlan0 scan 
Argument type is wrong             

After trying all sorts of things to try and get it to work and reading docs for everything under the sun, I shelved the endeavor and settled on systemd-networkd.
I tried iwd again yesterday to see if anything had changed, and somehow it all works quite easily now! Unsure what all changed, but very little actual setup was required to make iwd work - not much beyond enabling and starting the service.
I'm using Broadcom-wl-dkms and the latest linux-macbook kernel, running iwd 1.4-1. Have been able to connect to networks without any issues so far.

Last edited by dilyn (2020-01-19 23:03:53)

Offline

#210 2020-01-28 01:16:04

jayache80
Member
Registered: 2015-11-19
Posts: 15

Re: The IWD thread

My experience has been that, if the iwd service is enabled in systemd, at boot time iwd will start up but it will not working properly; trying to list the devices won't cough up any devices, and because of that I can't connect anything. However, if I leave iwd disabled, and manually start it, it has no problem; it can list wireless devices fine, it shows networks when I scan, and I have no problem connecting.

So, I have my .xinitrc call a script that starts up iwd and connects to my wireless network, and it works great, every boot. It even goes to the next "known" network if the primary known network isn't available. That's probably a hack, and I should figure out why iwd doesn't work properly if enabled in systemd. I believe it is simply starting too early before my wireless driver(s) are initialized, and can't recover.

Anywho, maybe I'm missing something, but I can't get iwctl to tell me *which* wireless network I'm connected to.

[iwd]# station wlan0 show 
                                 Station: wlan0                               *
--------------------------------------------------------------------------------
  Settable  Property            Value                                          
--------------------------------------------------------------------------------
            Scanning            no
            State               connected

connected to what?

The only thing I know to do is this, in a regular shell:

iw dev wlan0 info

and that will spit some info out including the SSID of the network I'm connected to.

My specs:
IWD version 1.4
5.4.14-arch1-1
mid-2009 macbook pro (5,5)

Offline

#211 2020-01-28 02:40:47

Zod
Member
Registered: 2019-03-10
Posts: 279

Re: The IWD thread

[iwd]# station wlan0 get-networks
                               Available networks
--------------------------------------------------------------------------------
    Network name                    Security  Signal
--------------------------------------------------------------------------------
  > ATT65jGh9Q_5ghz                 psk       ****

[iwd]# station wlan0 show
                                 Station: wlan0
--------------------------------------------------------------------------------
  Settable  Property            Value
--------------------------------------------------------------------------------
            Scanning            no
            State               connected

[iwd]# station wlan0 scan


[iwd]# station wlan0 get-networks
                               Available networks                             *
--------------------------------------------------------------------------------
    Network name                    Security  Signal
--------------------------------------------------------------------------------
    ATT65jGh9Q                      psk       ****
    MotoVAP_M91348SA12BV            psk       ****
    ATT8tzy4pI 2.4                  psk       ****
  > ATT65jGh9Q_5ghz                 psk       ****

The little greater then symbol denotes the network I am connected to.

Offline

Board footer

Powered by FluxBB