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

Wifi keeps disconnecting #5

Open
buttim opened this issue Aug 23, 2022 · 1 comment
Open

Wifi keeps disconnecting #5

buttim opened this issue Aug 23, 2022 · 1 comment

Comments

@buttim
Copy link

buttim commented Aug 23, 2022

The wifi connect loop never ends. The return value from WiFi.begin() is always 6 (WL_DISCONNECTED).
I solved this issue changing the code in DIY_CameraSlider.ino like this:
from
WiFi_status = WiFi.begin(ssid, password);

to
WiFi.begin(ssid, password); WiFi_status = WiFi.waitForConnectResult();

I found the solution here

@thijstriemstra
Copy link

thijstriemstra commented May 16, 2023

thanks. the begin call can/should also be moved out of the while loop:

WiFi.begin(ssid, password);

while (WiFi_status != wl_status_t::WL_CONNECTED)
{
    Serial.print("Connecting to SSID: ");
    Serial.println(ssid);
    WiFi_status = WiFi.waitForConnectResult();
}

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