-->
Page 1 of 3

OTA erases SPIFFS? (SOLVED)

PostPosted: Fri Aug 10, 2018 10:10 pm
by JimDrew
I have been using the ESPhttpUpdate class successfully for a couple of years. Today I was adding some features to some code that would give you access to the SPIFFS. After formatting the SPIFFS I am able to create and read files perfectly.

However, I have noticed two problems:

1) If I do an OTA, the SPIFFS is no longer valid. I get a failure that the file system is not ready. I can format the SPIFFS again and it all works fine, until I do another OTA - then it's gone again.

2) When I use the ESP8266 Sketch Data Upload feature it uploads the data (from the files contained in the DATA folder), but when I try to access the SPIFFS, I get the message that the file system is not ready.

I am using a NodeMCU1.0(ESP-12E Module), 4M (3M SPIFFS),80MHz. My sketch size is 372,276 bytes, which is plenty under the 2x requirement for the ESPhttpUpdate to work within 1M of remaining flash space (when 3M are dedicated to the SPIFFS).

Having the SPIFFS destroyed every time when doing an OTA is unacceptable. Has anyone run into this?

Thanks!

Re: OTA erases SPIFFS?

PostPosted: Sat Aug 11, 2018 2:36 am
by schufti
not that I can be of any help with spiffs or OTA but anyone that could would surely be interested if you tested with different core versions and which ones show this effect.

Re: OTA erases SPIFFS?

PostPosted: Sat Aug 11, 2018 1:13 pm
by JimDrew
I tried with 2.3.0 through 2.4.2, all with the same results.

Re: OTA erases SPIFFS?

PostPosted: Mon Aug 13, 2018 3:28 am
by btidey
I don't think there is anything intrinsic in the underlying OTA mechanism which touches SPIFFS.

I do my OTA updates by exporting a new binary and then using the browser based OTA to perform the update and it always leaves my SPIFF files intact.

So it sounds like it is something specific in how the OTA procedure is being called that is causing this problem.