network: print ev_base when logging unhandled event#403
Merged
Conversation
f9ccce0 to
fd3274f
Compare
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.
fd3274f to
2848dd3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_EVENTin ESP-IDF, which learns us that the event is coming from the esp_wifi component, and that the events are defined incomponents/esp_wifi/include/esp_wifi_types.hIn 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.