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

Connection status after doing a scanNetworks() ?? #237

Open
lcoffin opened this issue Feb 2, 2023 · 1 comment
Open

Connection status after doing a scanNetworks() ?? #237

lcoffin opened this issue Feb 2, 2023 · 1 comment

Comments

@lcoffin
Copy link

lcoffin commented Feb 2, 2023

If I do the following code:

WiFi.begin(ssid, password);

WiFi.scanNetworks();

int status = WiFi.status();

status has a value of WL_SCAN_COMPLETED until/unless I do a WiFi.begin() again.

How do I tell if my WiFi connection is still connected? Returning the result of the scan in WiFi.status() basically wipes out whether the connection is still active or not.

How do I check the connection status and not the scan status? Shouldn't there be different methods to check the connection status vs the scan status??

Or does scanNetworks() kill my existing connection?

@vshymanskyy
Copy link

Looks like the connection is actually lost.

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

No branches or pull requests

2 participants