draco wrote:I would suggest that you just hardcode the address and length in your program, if all you need to store are the SSID and password.
For example, write your SSID into byte 0, with a length of 32.
Then write your password into byte 33, with a length of 64.
32 and 64 are the maximum lengths permitted for SSID/password, according to the standards. No overhead wasted on metadata in your tiny EEPROM space available that way, and you've ensured that you have enough space available for any SSID/password combination possible.
But, realistically, you might not even need to do that. In my experience, the ESP8266 is already storing the SSID and password by itself somewhere, so if you just start it up and tell it to connect, it will use the previous SSID/password.
Thanks for the feedback.
I need to store a few other values in addition to the SSID and password, but you could argue that the same format would work. I believe this is similar to my fixed length option above.
I agree the SSID and password is stored in the config but it need to get in there in the first place or if I move the module to a different network. I will have multiple of these running on different networks. Unless I am missing something here I would have to connect using the AT firmware and then setup the SSID and password and then flash my firmware to make this work without EEPROM. If I wanted to move a module to another network I would need to reflash it with the AT firmware and reset the SSID/password and then reflash my code.
Another and maybe better option would be to have WiFi.begin(ssid, pass); to take default SSID and password like WiFi.begin(); this would take the SSID and password stored in in the config area.