Skip to content

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

Open
balazsracz wants to merge 1 commit into
masterfrom
bracz-esp32-aponly
Open

Ensures that we don't start STA wifi when AP-only is requested.#783
balazsracz wants to merge 1 commit into
masterfrom
bracz-esp32-aponly

Conversation

@balazsracz

Copy link
Copy Markdown
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
Copy Markdown
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

balazsracz commented Feb 10, 2024 via email

Copy link
Copy Markdown
Collaborator Author

@atanisoft

Copy link
Copy Markdown
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