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

WiFiS3 library: allow selection of WIFI_MODE_APSTA mode #459

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

Conversation

cotestatnt
Copy link

I am developing a WebServer library that includes a WiFi manager.
In the case of DHCP connections, it is essential to provide the user with the IP address assigned by the router.

In this situation (and in other scenarios), it is necessary to have the ability to operate in both WiFi Access Point mode and Station mode, simultaneously, after successfully connecting to the SSID.

@CLAassistant
Copy link

CLAassistant commented Mar 21, 2025

CLA assistant check
All committers have signed the CLA.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Mar 21, 2025
@JAndrassy
Copy link
Contributor

JAndrassy commented Mar 21, 2025

but which IP does then WiFi.localIP() return ?

and connecting STA to AP usually restarts SoftAP because it must match the channel used for STA. I guess that is a problem for your WiFi Manager as it disconnects clients

@cotestatnt
Copy link
Author

In my pull request, the localIP() method, in case of WIFI_MODE_APSTA, returns the address assigned by the router, but in fact it would be more correct to provide a second method that explicitly returns the IP address of the AP as happens with the ESP32 core for Arduino calling the IPAddress softAPIP() method, while I think localIP() should always return the STA address.

@cotestatnt
Copy link
Author

cotestatnt commented Mar 21, 2025

@JAndrassy regarding your doubt about the WiFi channel, I don't think it's a problem and in fact as you can see from this screenshot the WiFi manager works as expected.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants