-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu/esp32/esp wifi: add WPA2 enterprise mode with IEEE 802.1x/EAP authentication #12024
cpu/esp32/esp wifi: add WPA2 enterprise mode with IEEE 802.1x/EAP authentication #12024
Conversation
64120f2
to
0d1192c
Compare
@MrKevinWeiss @smlng @benpicco It would be great if someone would to take a look to this PR? It makes it possible to use the WPA2 Enterprise WiFi networks like the Even though the PR seems to be pretty complex, it is a very small change. Most of the code is simply original vendor code. The only real change is in file |
This looks pretty cool. I will try to find some time to dedicate to this but I can't make any promises until after Jan 15. |
Jan 15 has arrived :) Any chance that you could test this one @MrKevinWeiss ? @gschorcht, this needs a rebase BTW. |
Rebased. |
0d1192c
to
6dccb60
Compare
@miri64 I have a short question. When
Would it make sense the set |
Yes and it should be as long as you don't pull in 6LN or 6LR support (or are you also having |
|
Then I would either make it a dependency on |
Not really sure. Both merges will produce conflicts since
Yeah, unfortunately we depend on the |
`nvs_flash` functions have to be set to 0 if module `esp_idf_nvs_flash` is not enabled. Otherwise wpa_supplicant will crash in WPA2 Enterprise mode.
Add all files of wpa_supplicant from ESP32 SDK that are required for WPA2 Enterprise mode.
6dccb60
to
365fc01
Compare
Are you sure that you have the right source code version? Could you check that you have this change in your code? Sorry for asking that, but the only reason for the error message
can be that |
probably would help if I was on this PR (I was on the esp power mode pr 😥 ) |
It seems like some success, it is no longer complaining that it cannot connect but I think there are some problems with trying to use this with eduroam (maybe my password is outdated or something)
This is with the lwip fw |
Do you get repeating messages like |
Nope it seems like it connected, do you think it is something to do with restrictions at HAW? |
I remember that there were issues with multiple connections from the same eduroam account, do you have other devices logged into the WiFi? |
That is, you get something like |
I don't know, this is the only ESP in the rack, but there are many other things in the server room so maybe. |
gnrc networking has an interface, but some problems it seems
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excluding the vendor files which I did not look in detail things look pretty good from the code side.
cpu/esp32/doc.txt
Outdated
Parameter | Default | Description | ||
:------------------|:----------|:------------ | ||
ESP_WIFI_SSID | "RIOT_AP" | SSID of the AP to be used. | ||
ESP_WIFI_EAP_ID | none | Optional anonymous identity used in phase 1 (outer) EAP authentication. If it is not defined, the user name defined for phase 2 (inner) EAP authentication is used as idendity in phase 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idendity -> identity I guess code spell would have got that.
Is your notebook or phone also connected to |
@benpicco IIRC this was a problem specific to the FU Berlin's eduroam back in the ye olden days which is solved nowadays (and would not be viable today when everyone has at least two devices they want to connect to the WiFi) ;-) |
I am at home just piping into the HIL rack in the server room. It would be much easier if I was on site I guess. Short answer no. |
This looks like unstable WiFi radio conditions. You get |
Darn, I guess I will try the to simulate, I think @leandrolanzieri wants this for the release. |
@leandrolanzieri and me tried this PR at the HAW and we get the same |
Works for me™
I had to walk around a bit to find a good spot. |
Yeah, as I said, the PCB antenna can't be compared to the antennas used in smart phones or notebooks.
Let me take look. If it is possible, we could provide as |
Hm, I was already looking for RSSI some time ago. Unfortunately, the WiFi interface offeres only two functions where RSSI is available as information.
There should be RIOT app which asks the WiFi interface for the list and the RSSI of available APs. At the moment we could implement it directly on top of |
A tool to view all available networks would be neat indeed! Even better if it provided the possibility to join them 😃 I think right now an esp-specific tool would be fine. It's always hard to design a general API if there is only one implementation, it's also good to have a proof of concept and not let perfect be the enemy of good. As for this PR, I think it should be good. Just fix that one remaining typo 😉 |
596de9f
to
c1e6e70
Compare
Fixed and directly squashed. I'm a bit confused that it wasn't catched by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be good, no regressions and eduroam
confirmed working.
@benpicco Thanks for all your effort with testing this PR. And of course, thanks for reviewing and merging. |
@MrKevinWeiss @leandrolanzieri Thanks for your support with this PR, even if you had no success. I will provide an application that will make it easier to observe the radio condition. |
Thanks for your contribution! |
Contribution description
This PR adds the WPA2 enterprise mode with IEEE 802.1X/EAP authentication to the WiFi
netdev
driver.To use the WiFi
netdev
driver in WPA2 enterprise mode with IEEE 802.1X/EAPauthentication, module
esp_wifi_enterprise
has to be enabled. It supports the following EAP authentication methods:As inner (phase 2) EAP authentication method, only MSCHAPv2 is supported.
To use module
esp_wifi_enterprise
with these authentication methods, thefollowing configuration parameters have to be defined:
[UPDATE] WPA2 enterprise mode only works for ESP32 at the moment. For ESP8266, it would need ESP8266_RTOS_SDK v3.3.
Testing procedure
Flash and test
examples/gnrc_networking
. Should work for example witheduroam
:[UDPATE] Now where
lwIP
in RIOT supports IPv4 with DHCP, it might be easier to test the PR with:Issues/PRs references
Depends on
#11947,#11994and#11997