Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Pablo2048
#90513 No way! It just wait for previous .connect() result - see https://github.com/esp8266/Arduino/blob ... A.cpp#L429 . Your sketch commands SDK to disconnect and forget all credentials by calling .disconnect() method. If you want to connect again, then you have to explicitly call .connect with the right credentials before calling .waitForConnectResult...
User avatar
By Tertius21
#90514 Sorry i don't understand that . i am new.

You see, i use the wifimanager. There are the login details saved.

The first connect works fine. Why?

You see in the results after the disconnect:
Try to RECONNECT to wifi SSID: InProg1
Is WiFi Configured and saved: YES
SSID: InProg1

The ssid (and password also) is kown for a new connect.
The connection result is 0 (WL_IDLE_STATUS) and not any other like 1 or 4. Why idle?

Can i use a other method for disconnect so i can easy reconnect? Or how can i reconnect with the saved credentials as in the first connect?
User avatar
By Pablo2048
#90515 I'm not familiar with the WiFiManager so I can not give you help with using it, but at your first write (BTW it is really bad thing modifying original discussed code instead of posting the new one :-( ... ) you didn't used any form of wifi manager. Lets say it simple - by calling .disconnect() you order the SDK to disconnect from the associated AP and erase the saved credentials. If you want to connect again, the you have to use .connect() again with the credentials given (again). The IDLE status is because the WiFi stack is doing nothing - you ordered the SDK to disconnect, SDK then disconnect and came to the idle state waiting for another connect command.