I followed the tutorial “WiFi manager with ESP8266 example #2 to save parameters in the flash memory of an Adafruit Huzzah board. The serial monitor always logs this error message “ failed to open config file for writing”. I tried to do the SPIFF.format() first just in case the fs is not formstted and got the same error. I also tried setting the Flash size to 4M (1M SPIFFs) under tools in the Arduino IDE and the compile would fail. What am I doing wrong? I would like to use that to save an encrption key in the program I am developing.
Hi Anthony.
Can you check if your board has a PUYA flash chip on it?
It seems that there is a problem with those chips and trying to write to SPIFFS. Any sketch you try will fail to write to SPIFFS if you have a new module with the PUYA flash chip on it.
https://github.com/esp8266/Arduino/issues/4061
https://github.com/esp8266/Arduino/issues/4102
Unfortunately, I haven’t found an answer for that issue.
However, SPIFFS works if you use the “Sketch Data Upload ” option with Arduino IDE, which I think it’s not ideal for what you want to do.
Regards,
Sara