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

Ensures that we don't start STA wifi when AP-only is requested. #783

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

balazsracz
Copy link
Collaborator

This PR fixes codepaths that accidentally started STA mode wifi when AP-only mode was requested.

@balazsracz balazsracz requested a review from atanisoft February 10, 2024 02:29
// Set the requested WiFi mode.
ESP_ERROR_CHECK(esp_wifi_set_mode(requested_wifi_mode));
ESP_ERROR_CHECK(esp_wifi_set_mode(parent_->wifiMode_));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you tested that when in AP mode that WiFi scan works? I had tested it long ago and found that it is required to use APSTA mode for scan to work this the comment in the section that was removed above.

@balazsracz
Copy link
Collaborator Author

balazsracz commented Feb 10, 2024 via email

@atanisoft
Copy link
Collaborator

That breaks existing user code that expects WiFi scan to work when operating in AP mode. It's not as simple as changing the mode since that would attempt to start STA mode and rightfully crash during init. I'm fine with not creating the AP / STA interface up front but it would still be good to support scanning while in AP mode as part of a reconfiguration tool.

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.

2 participants