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

Moderator: igrr

User avatar
By MarkTheDokTar
#75951 Update: Im an idiot. TLDR; There is nothing wrong with eithe WiFi or EEPROM.
Move along folks, there is nothing to see here!!


I have spent days researching this and still cannot properly formulate the problem. Perhaps someone can help me or there is an undocumented trick that I dont know of.

So I am using the EEPROM module and the WiFi module and they seem to interact. Essentially I can read and store values in the eeprom module, and it works very well. I store the network parameters ipaddress, subnet mask and gateway for a static ip address. My scheme uses a signature byte to decide weather to trust the values in the eeprom or not and if not it will later store them. Loading the code with a new signature, and all is good the parameters used to connect are the default values. What seems to have sneakily gone on in the background is that the WiFi on connection used EEPROM to write the connection data and used a different scheme to me so that my data is corrupt. If I reboot, the eeprom is read (as expected because the signatures match and are uncorrupted) but the data is faulty and my WiFi no longer connects. I do not know exactly why. (I guess the next thing I'll do is look at my data, amazing how just writing something like this can help!) Its necessary to change the signature once again, thus avoiding reading the data and so using the defaults to make the system work again.

I have tried moving the data around, using a fixed offset inside the area I reserved, but to no avail. Which is odd.

If I disable the epprom, the sketch works entirely as expected, no trouble with rebooting.

The EEPROM reserves 880 bytes but I use less than this, primarily moving it around a bit to try to avoid whatever is interfering. Currently I use from 300 to 798, but I have changed this values including starting at 0 as you would expect, it doesn't seem to help.
I use EEPROM.begin(880), EEPROM.put() several times, then commit and then end.

Anyone had similar issues or can cast any light?