Replies: 5 comments 8 replies
-
Update: I'm now using the esp-idf wifi example, don't bother. |
Beta Was this translation helpful? Give feedback.
-
OK, EAP-PEAP works with the example code. Now I've got to see how I use this in my patch mentioned above :-) |
Beta Was this translation helpful? Give feedback.
-
as far as the ESP32 compilation is concerned. You do not need to add anything to the sdkconfig file. all of the config settings are able to be set at the command line. If you add --debug to the build command this will turn on debugging for the ESP32 and you can add the additional CONFIG_* parameters to the build command as well. The build scripts do quite a bit of "hot patching" of the MicroPython source and header files. so you need to take care as to what you are modifying because it can potentially break the build system. I know I am not specifically doing anything to the source files for the wlan stuff what you might consider doing is creating a module that you add to the build system that hot patches the MicroPython files with the changes that you want. This will make it easier for you when updating the binding to a more recent version of it because you will not have to go in and make all of the modifications again, You can simply copy the one python source file and edit the esp32 build script to include your file. The build system is written so that if a file is modified a backup of the original gets made and once the build has finished that backup gets restored keeping the state of micropython as original. The "readfile" and "writefile" functions are what handle doing that. I recommend that you use those to keep the state original. This is done because not all changes made are universal across all MCU's so if you wanted to compile for a different MCU you know you will be starting off with unaltered source files for that MCU. |
Beta Was this translation helpful? Give feedback.
-
Ah, thank your for pointing this out. I'll try this tomorrow. In fact I'm trying to get EAP stable enough to take a PR upstream. ATM I use your build system as an extremely helpful test bed for building the image because I failed miserably to build an image from vanilla Micropython. :-( |
Beta Was this translation helpful? Give feedback.
-
By the way I finally found the root cause of my problem. It is described in my follow-up to https://github.com/orgs/micropython/discussions/16456, resulting in my pull request to add WPA2 Enterprise wifi. Whohoo! |
Beta Was this translation helpful? Give feedback.
-
I would like to (mis-) use this fork to add WPA2 Enterprise to Micropython. This basically involves implementing and exposing the esp_eap_client functions. I added the code to lib/micropython/ports/esp32/network_wlan.c and wpa_supplicant to the IDF_COMPONENTS.
Connecting to the university eduroam network works fine in EAP-PWD mode with the username and password only, similar to the proposed setting for Android smartphones:
Insofar, works for me. But I would also like to get EAP-PEAP to work which involves using the supplied CA certificate and the anonymous identity. This is is how our laptops are usually configured using the CAT installer (https://cat.eduroam.org/). The supplied configuration works on Ubuntu 24.04 using Networkmanager or wpa_supplicant.
However, on my Micropython build, I get STAT_WRONG_PASSWORD consistently, and I need to switch on wpa_supplicant debugging and monitor the stuff in order to find where the handshake breaks. And this I can't seem to get going.
esp_log_level_set("wpa_supplicant", ESP_LOG_DEBUG);
is set in my code, and I also set
in sdkconfig.board.
Question: how do I see the esp logs on the Micropython level? Or do I need to write a custom C program in order to access the low level stuff?
TIA!
Beta Was this translation helpful? Give feedback.
All reactions