Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By Silux
#33627 I'm trying to save the ssid and password using the library EEPROM.
That is the code i'm using
Code: Select allSerial.println(loginSSID);
      Serial.println(loginPass);
      client.stop();
      client.flush();
      if(parametro1!=""){
        Serial.println("scrivo!");
        for (int i = 0 ; i < 512; i++) {
          EEPROM.write(i, 0);
        }
        EEPROM.put(0,loginSSID);
        EEPROM.put(32,loginPass);
       
      }



That is what it prints when is asked http://192.168.43.191/config?username=c ... bmit=Login
Code: Select allnew client
ciao
pass
scrivo!
new client
Reading EEPROM ssid
SSID: �Q�?

RSSIserver.ino

Why the read doesn't give readable results?
There is a better way to save these data?
User avatar
By martinayotte
#33661 You piece of code doesn't show much how your handle both write and read to EEPROM.
It seems to you save ONLY the pointers to the values you wish to save, not the actual values.
Once rebooted, the EEPROM give you pointers to "no where" values ...