zephyr: wifi: Unable to connect to EAP-TTLS-MSCHAPv2 and EAP-PEAP-MSCHAPv2 using nrf7002dk
Describe the bug
We’re currently testing Wi-Fi connectivity with enterprise methods using FreeRADIUS as an authentication server and the wifi shell sample to connect (on a nrf7002dk). We are on the master branch of Zephyr, commit
We also have trouble connecting via EAP-TTLS-MSCHAPv2 and EAP-PEAP-MSCHAPv2.
To Reproduce
1. Generate a fresh set of certificates on freeRADIUS
The CA and the certificates that we’re using were generated on the freeRADIUS server, using the provided make commands. We are using freeRADIUS v3.2.6. The steps are:
- Modify
ca.cnf,server.cnfandclient.cnffiles - Generate .pem/.crt/.key files with
make ca,make serverandmake client - Copy the
ca.pem,client.crtandclient.keytozephyr/samples/net/wifi/test_certs.
-
build and flash with:
west build -b nrf7002dk/nrf5340/cpuapp -- -DEXTRA_CONF_FILE=overlay-enterprise.conf west flash -
Attempt to connect:
# EAP-TTLS-MSCHAPv2 wifi connect -s "MikroTikChateau-WLAN-2" -c 108 -k 14 -I "user123" -P "password123" # EAP-PEAP-MSCHAPv2 wifi connect -s "MikroTikChateau-WLAN-2" -c 108 -k 12 -I "user123" -P "password123" -
Te connection request fails:
Connection request failed (1)
Expected behavior
We would expect the connection to be successful, since we can connect from a Ubuntu PC just fine, using the following:
Impact
Showstopper. We would expect this to work.
Logs and console output /
Environment (please complete the following information):
- OS: Ubuntu 22.04
- Zephyr master branch- commit 28796076d84056d085e5a4ebf213dafbfe56202a
Additional context /
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 32 (28 by maintainers)
@Rex-Chen-NXP @MaochenWang1 @krish2718
Thank you for all the answers. I think we have all the knowledge we need now. We were missing knowledge about the EAP version and MFP.
Since everything seems to work, this issue can be closed.
Hi, TiborSovilj, I have a simple check of the logs from you, and also try the cmds you shared base on RW612 boards, summary from my side: A. For the [mschapv2_logs.txt], below logs observed, PEAP version mismatched, the default configured version as 1, I think you miss the -V 0 option. uart:~$ [00:00:59.440,124] <dbg> wpa_supp: wpa_printf_impl: EAP-PEAP: Start (server ver=0, own ver=1) uart:~$ [00:00:59.440,216] <wrn> wpa_supp: EAP-PEAP: Failed to select forced PEAP version 1
B. For the [mschapv2_logs_xtra_flags.txt], ,below logs observed, scan result not matched, failed in scan phase, EAP process didn’t start, I think you should remove the -w 2 option. uart:~$ [00:01:03.136,566] <dbg> wpa_supp: wpa_printf_impl: wlan0: skip RSN IE - no mgmt frame protection uart:~$ [00:01:03.136,779] <dbg> wpa_supp: wpa_printf_impl: wlan0: skip - MFP Required but network not MFP Capable uart:~$ [00:01:03.136,932] <dbg> wpa_supp: wpa_printf_impl: wlan0: No suitable network found
Could you try the cmds shared from me few days ago in this issue ticket? Or you can also try with the below cmd which add -V 0 option based on you shared the cmd for [mschapv2_logs.txt] : wifi connect -s “MikroTikChateau-WLAN-2” -c 108 -k 12 -a user-tls -K san -V 0
Hi all, both sap and sta test base on 2 boards. 【EAP_TLS】: WPA2: date set 2024-10-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 7 -w 2 -K whatever -I client1
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 7 -w 2 -a client1 -K whatever
WPA3 suite B: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 7 -w 2 -K whatever -I client1 -S 1
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 7 -w 2 -a client1 -K whatever -S 1
WPA3 suite B-192: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 7 -w 2 -K whatever -I client1 -S 2
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 7 -w 2 -a client1 -K whatever -S 2
【PEAPv0-MSCHAPv2】: WPA2: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 12 -w 2 -K whatever -V 0 -a client1 -I user -P pswd
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 12 -w 2 -a client1 -K whatever -V 0 -I user -P pswd
WPA3 suite B: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 12 -w 2 -K whatever -V 0 -a client1 -I user -P pswd -S 1
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 12 -w 2 -a client1 -K whatever -V 0 -I user -P pswd -S 1
WPA3 suite B-192: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 12 -w 2 -K whatever -V 0 -a client1 -I user -P pswd -S 2
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 12 -w 2 -a client1 -K whatever -V 0 -I user -P pswd -S 2
【EAP-PEAP-GTC】: WPA2: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 13 -w 2 -K whatever -a client1 -I user -P pswd
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 13 -w 2 -a client1 -K whatever -I user -P pswd
WPA3 suite B: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 13 -w 2 -K whatever -a client1 -I user -P pswd -S 1
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 13 -w 2 -a client1 -K whatever -I user -P pswd -S 1
WPA3 suite B-192: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 13 -w 2 -K whatever -a client1 -I user -P pswd -S 2
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 13 -w 2 -a client1 -K whatever -I user -P pswd -S 2
【EAP-TTLS-MSCHAPv2】: WPA2: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 14 -w 2 -K whatever -a client1 -I user -P pswd
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 14 -w 2 -a client1 -K whatever -I user -P pswd
WPA3 suite B: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 14 -w 2 -K whatever -a client1 -I user -P pswd -S 1
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 14 -w 2 -a client1 -K whatever -I user -P pswd -S 1
WPA3 suite B-192: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 14 -w 2 -K whatever -a client1 -I user -P pswd -S 2
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 14 -w 2 -a client1 -K whatever -I user -P pswd -S 2
【EAP-PEAP-TLS】: WPA2: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 15 -w 2 -K whatever -a client1 -I user -P pswd
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 15 -w 2 -a client1 --key1-pwd whatever --key2-pwd whatever -I user -P pswd
WPA3 suite B: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 15 -w 2 -K whatever -a client1 -I user -P pswd -S 1
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 15 -w 2 -a client1 --key1-pwd whatever --key2-pwd whatever -I user -P pswd -S 1
WPA3 suite B-192: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 15 -w 2 -K whatever -a client1 -I user -P pswd -S 2
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 15 -w 2 -a client1 --key1-pwd whatever --key2-pwd whatever -I user -P pswd -S 2
【EAP_TLS_SHA256】: date set 2024-09-27 00:00:00 wifi ap enable -s EapNet_AP -c 149 -k 16 -w 2 -K whatever -I client1
date set 2024-09-27 00:00:00 wifi connect -s EapNet_AP -c 149 -k 16 -w 2 -a client1 -K whatever
TTLS and PEAP are newly added and much testing hasn’t been done, your fix LGTM please go ahead and raise a PR.