Skip to content

network: print ev_base when logging unhandled event#403

Merged
stintel merged 1 commit intomainfrom
fix/network_unhandled_event_log
Feb 25, 2025
Merged

network: print ev_base when logging unhandled event#403
stintel merged 1 commit intomainfrom
fix/network_unhandled_event_log

Conversation

@stintel
Copy link
Copy Markdown
Collaborator

@stintel stintel commented Feb 25, 2025

The ev_id value on its own is pretty useless without ev_base, as the event handler is register for both IP_EVENT and WIFI_EVENT.

Before:

I (18:32:27.019) WILLOW/NETWORK: unhandled network event ev_id='4'

After:

I (18:36:19.211) WILLOW/NETWORK: unhandled network event ev_base='WIFI_EVENT' ev_id='4'

Now we can git grep WIFI_EVENT in ESP-IDF, which learns us that the event is coming from the esp_wifi component, and that the events are defined in components/esp_wifi/include/esp_wifi_types.h

In that file, we can find that ev_id 4 is WIFI_EVENT_STA_CONNECTED, which triggers when the station connected to the AP.

This particular event is expected to occur, so we might consider silencing it, or logging it with a human readable message.

@stintel stintel force-pushed the fix/network_unhandled_event_log branch from f9ccce0 to fd3274f Compare February 25, 2025 17:47
The ev_id value on its own is pretty useless without ev_base, as the
event handler is register for both IP_EVENT and WIFI_EVENT.

Before:

I (18:32:27.019) WILLOW/NETWORK: unhandled network event ev_id='4'

After:

I (18:36:19.211) WILLOW/NETWORK: unhandled network event ev_base='WIFI_EVENT' ev_id='4'

Now we can `git grep WIFI_EVENT` in ESP-IDF, which learns us that the
event is coming from the esp_wifi component, and that the events are
defined in `components/esp_wifi/include/esp_wifi_types.h`

In that file, we can find that ev_id 4 is WIFI_EVENT_STA_CONNECTED,
which triggers when the station connected to the AP.

This particular event is expected to occur, so we might consider
silencing it, or logging it with a human readable message.
@stintel stintel force-pushed the fix/network_unhandled_event_log branch from fd3274f to 2848dd3 Compare February 25, 2025 18:08
@stintel stintel merged commit c0b9096 into main Feb 25, 2025
9 checks passed
@stintel stintel deleted the fix/network_unhandled_event_log branch February 25, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant