Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-S2: Log all Wi-Fi events & remove unneeded call #3903

Merged
merged 3 commits into from
Jan 6, 2021
Merged

ESP32-S2: Log all Wi-Fi events & remove unneeded call #3903

merged 3 commits into from
Jan 6, 2021

Conversation

anecdata
Copy link
Member

@anecdata anecdata commented Dec 30, 2020

init.c:

Add logging to the event handler default event to capture any other wi-fi events that occur, to see what else happens in the field that we may want to handle better.

Radio.c:

This call in start_station():

esp_wifi_set_config(WIFI_MODE_STA, &self->sta_config);

has the wrong parameter [type] (should be ESP_IF_WIFI_STA == 0; WIFI_MODE_STA == 1 and sets the config for AP interface type ), and is also not needed here since it's called in connect() anyway (and is not needed for scanning or ping).

Alternatively, we could correct the call in start_station(), and remove it from connect() (connect() calls start_station())

All depends on the design intent... how granular we want these functions to be as features like AP, AP+STA, etc. get added. It might be nice to keep clean code demarcation between concepts of netif [de]init, wifi [de]init, wi-fi mode, wifi start/stop, and station [dis]connect.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not early log please.

@anecdata anecdata added the espressif applies to multiple Espressif chips label Jan 6, 2021
@anecdata anecdata requested a review from tannewt January 6, 2021 02:02
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@tannewt tannewt merged commit a333597 into adafruit:main Jan 6, 2021
@anecdata anecdata deleted the reasons branch January 6, 2021 16:59
@anecdata
Copy link
Member Author

Partially addresses the logging aspect of #3837.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants