Ok i have sucessfully found, why this problem occurs. When you look at these 
two log files you will find that when DEAUTH_LEAVING error occurs on 
wpa_supplicant with NM case, because of wrong AUTH_TYPE being set. For SAE it 
should be set to value 4, just like it is in 
wpa_supplicant-2.9/src/drivers/nl80211_copy.h enum nl80211_auth_type as 
NL80211_AUTHTYPE_SAE, but for some reason it is NL80211_AUTHTYPE_OPEN_SYSTEM 
and because of this i am unable to establish a connection.

I think that something is wrong in NM, but currently i don't know even where to 
look....

BR
Piotr Łobacz
________________________________
Od: Piotr Lobacz
Wysłane: sobota, 2 października 2021 03:48
Do: networkmanager-list@gnome.org <networkmanager-list@gnome.org>
Temat: Ampak AP6356S with WPA3

Hi all,
I am using firefly-rk3399 board with Ampak AP6356S wifi chip. The kernel is 
mainline 5.4.18 release with patches from cypress/infineon for wpa3 feature. 
I'm running on buildroot 2018.08 mainline release with systemd-249.1, 
wpa-supplicant-2.9 and network-manager-1.32.2. The problem i have observed 
using NM is that if i have mi AP set to WPA2/WPA3 the connection is being 
established by default using WPA2 not WPA3 encryption scheme. If add by myself 
a WPA3 connection to given ssid it doesn't connect, just keep asking me for 
network password. Connection to network with WPA3 works after first connection 
with the usage of WPA2. Than i can even modify my AP to be only WPA3 and 
connection is being established.

If i try to establish the connection straightforward to WPA3 i'm getting a 
request to deauthenticate which looks like this:

....
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: nl80211: Connect request 
send successfully
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: wlan0: Setting 
authentication timeout: 10 sec 0 usec
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: EAPOL: External 
notification - EAP success=0
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: EAPOL: External 
notification - EAP fail=0
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: EAPOL: External 
notification - portControl=Auto
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: dbus: 
flush_object_timeout_handler: Timeout - sending changed properties of object 
/fi/w1/wpa_supplicant1/Interfaces/0
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: dbus: 
flush_object_timeout_handler: Timeout - sending changed properties of object 
/fi/w1/wpa_supplicant1/Interfaces/0/BSSs/0
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: dbus: 
flush_object_timeout_handler: Timeout - sending changed properties of object 
/fi/w1/wpa_supplicant1/Interfaces/0/BSSs/1
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: dbus: 
flush_object_timeout_handler: Timeout - sending changed properties of object 
/fi/w1/wpa_supplicant1/Interfaces/0/BSSs/7
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: dbus: 
flush_object_timeout_handler: Timeout - sending changed properties of object 
/fi/w1/wpa_supplicant1/Interfaces/0/BSSs/2
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: dbus: 
flush_object_timeout_handler: Timeout - sending changed properties of object 
/fi/w1/wpa_supplicant1/Interfaces/0/BSSs/3
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: dbus: 
flush_object_timeout_handler: Timeout - sending changed properties of object 
/fi/w1/wpa_supplicant1/Interfaces/0/BSSs/8
Oct 02 01:05:07 firefly-rk3399 wpa_supplicant[586]: dbus: 
flush_object_timeout_handler: Timeout - sending changed properties of object 
/fi/w1/wpa_supplicant1/Interfaces/0/BSSs/4
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: dbus: 
fi.w1.wpa_supplicant1.Interface.Disconnect 
(/fi/w1/wpa_supplicant1/Interfaces/0) []
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: wlan0: Cancelling scan 
request
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: wlan0: Request to 
deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=c0:c9:e3:3b:64:e2 
reason=3 (DEAUTH_LEAVING) state=ASSOCIATING
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: 
wpa_driver_nl80211_disconnect(reason_code=3)
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: nl80211: Ignored event 127 
(NL80211_CMD_EXTERNAL_AUTH) for foreign interface (ifindex 3 wdev 0x0)
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: nl80211: Drv Event 127 
(NL80211_CMD_EXTERNAL_AUTH) received for wlan0
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: wlan0: nl80211: Ignored 
unknown event (cmd=127)
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: wlan0: Event DEAUTH (11) 
received
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: wlan0: Deauthentication 
notification
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: wlan0:  * reason 3 
(DEAUTH_LEAVING) locally_generated=1
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: Deauthentication frame 
IE(s) - hexdump(len=0): [NULL]
Oct 02 01:05:09 firefly-rk3399 wpa_supplicant[586]: wlan0: 
CTRL-EVENT-DISCONNECTED bssid=c0:c9:e3:3b:64:e2 reason=3 locally_generated=1
...

Btw. if i'm using wpa_supplicant without the usage of NM and systemd just 
simply by making my wpa_supplicant.conf file:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
eapol_version=1
ap_scan=1
fast_reauth=1
country=PL
pmf=1
network={
                ssid="OpenWrt"
                proto=RSN
                key_mgmt=SAE
                sae_password="12345678"
}

and running it by command:

wpa_supplicant -c wpa_supplicant.conf -dd -i wlan0 &

I can see that connection is being established without any issue what you can 
see in the attached file wpa_supplicant-without-nm-logfile.txt. I'm also 
attaching a logfile from wpa_supplicant if connection is being performed with 
NM - wpa_supplicant-with-nm-logfile.txt. The difference between these two files 
is after EAPOL: External notification - portControl=Auto call. With the usage 
of NM a dbus flush_object_timeout_handler​ with Timeout is being called which i 
suspect breakes the authentication and DEAUTH_LEAVING is returned.

Now the question is, what what can cause this situation?

BR
Piotr Łobacz
[https://softgent.com/wp-content/uploads/2020/01/Zasob-14.png]<https://www.softgent.com>

Softgent Sp. z o.o., Budowlanych 31d, 80-298 Gdansk, POLAND

KRS: 0000674406, NIP: 9581679801, REGON: 367090912

www.softgent.com<https://www.softgent.com>

Sąd Rejonowy Gdańsk-Północ w Gdańsku, VII Wydział Gospodarczy Krajowego 
Rejestru Sądowego

KRS 0000674406, Kapitał zakładowy: 25 000,00 zł wpłacony w całości.

Jesteśmy uczestnikiem Programu
RZETELNA Firma
Sprawdź naszą rzetelność na
https://www.rzetelnafirma.pl/F5IA32UW
_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to