Skip to content

Conversation

chirambaht
Copy link

The ESP32's WiFi event information system has now been linked with the Zephyr WiFi events system for station related operations. This allows users of the ESP32 wifi driver to obtain more precise WiFi connection related event information such as incorrect passwords, timeouts and more.

The work presented here was guided by the ESP32's WiFi event documentation provided here: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/wifi.html#event-handling.

In order to validate this, I ran the wifi_shell example with the appropriate logging levels for WiFi and passed in various different network credentials to see if the appropriate events were raised with the correct information.

Old PR can be found here: #88519

@carlescufi
Copy link
Member

@chirambaht merge commits are not allowed in PRs to Zephyr, please remove the commit.

@chirambaht
Copy link
Author

@sylvioalves sorry I never got to finishing the conversation around the first iteration of this pull request. Your last comment was as follows:

can you clarify what is the situation that does not allow merging both disconnect events? I guess each event error is dependent on the connection itself. From the changes and PR description, sounds we have the same event happening for both disconnect and not-accepted-connection. Which events are that?
I see the mutual events in there are WIFI_REASON_ASSOC_LEAVE and WIFI_REASON_AUTH_EXPIRE only.
Sorry for extending this.

My response is as follows:
I could make them both one function, it's an option. I kept them separate more for readability. Should they become one function, it would need to be a longer one which handles situations where the disconnect reason applies to either the connected or disconnected state. Would you think it best to do that in this case?

Added events for when the station iface is used to connect and disconnect.
These events will feed the NET_EVENT_WIFI_CONNECT_RESULT and
NET_EVENT_WIFI_DISCONNECT_RESULT events to send information
to applications making use of them

Signed-off-by: Humphrey Chiramba <[email protected]>
@chirambaht chirambaht force-pushed the feature/esp32/wifi/events branch from 213990b to 4302f38 Compare October 16, 2025 13:04
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Wi-Fi Wi-Fi platform: ESP32 Espressif ESP32

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants