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

Moderator: igrr

User avatar
By chupo_cro
#59871
schufti wrote:Maybe from some earlier sketch. WiFi.persistent(false) doesn't remove allready stored credentials neither replaces them or prevents reconnect with stored values; it just does not store the actually provided ones in flash on successful connect.

Change the PW on your WiFi and see if it still reconnects at startup.

Yes, that might be the reason. I will check that but only after New Year.
schufti wrote:It is not regarding the board you use, it is the Version of ESP-Package (look in board-manager).

Thank you, I'll check that too.

Regards
User avatar
By Pablo2048
#59872
schufti wrote:Maybe from some earlier sketch. WiFi.persistent(false) doesn't remove allready stored credentials neither replaces them or prevents reconnect with stored values; it just does not store the actually provided ones in flash on successful connect.
Change the PW on your WiFi and see if it still reconnects at startup.

IMHO WiFi.persistent(false) only direct SDK to NOT store credentials given in following WiFi.connect(). To remove already stored credentials inside SDK use WiFi.disconnect() ...
User avatar
By martinayotte
#59877 WiFi.disconnect will clear persisted settings only in persistent mode :

Code: Select allbool ESP8266WiFiSTAClass::disconnect(bool wifioff) {
    bool ret;
    struct station_config conf;
    *conf.ssid = 0;
    *conf.password = 0;
 
    ETS_UART_INTR_DISABLE();
    if(WiFi._persistent) {
        wifi_station_set_config(&conf);
    } else {
        wifi_station_set_config_current(&conf);
    }
    ret = wifi_station_disconnect();
    ETS_UART_INTR_ENABLE();

    if(wifioff) {
        WiFi.enableSTA(false);
    }
 
    return ret;