WPS on ESP32-S3 #10599
-
Hi there, I'm trying to import the WPS example that can be found in ESP-IDF examples into micropython. I'm trying to integrate it into the network.WLAN class. Here is the modnetwork.c event handler that I'm using:
and this is the way i manage the system events into the network_wlan.c file:
It seems that the system event is caught correctly, since I'm able to see the "WIFI_EVENT_STA_WPS_ER_SUCCESS" message.
What's wrong with the code? Thank you very much |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This has nothing to do with micropython. According to the ESP-IDF docs found on https://docs.espressif.com/projects/esp-idf/en/v4.4.3/esp32/api-guides/event-handling.html, the Maybe you used a (too) old example ? |
Beta Was this translation helpful? Give feedback.
-
Hi @karfas thanks for your help. I'm using the latest esp-idf/examples/wifi/wps/main/wps.c example from esp-idf. The example itself works great compiling it with the same esp-idf I use to compile Micropython. So I'd like to know what differs. Thank you |
Beta Was this translation helpful? Give feedback.
-
I've solved changing the wps_event_handler into network_wlan.c file.
I noticed that WPS scan and connection attemp finished successfully. Then I got the disconnect event that disconnected from my router. |
Beta Was this translation helpful? Give feedback.
This has nothing to do with micropython.
According to the ESP-IDF docs found on https://docs.espressif.com/projects/esp-idf/en/v4.4.3/esp32/api-guides/event-handling.html, the
SYSTEM_EVENT_STA_WPS_ER_SUCCESS
doesn't come with an "event data structure", so I would not rely on anything found inevent->event_info
.Maybe you used a (too) old example ?