Chat freely about anything...

User avatar
By Next
#80326 I've been search for a way to upload "settings.h" to an ESP8266 with having to flash the chip.

I have found where we can Post files to SPIFF but have yet to find how I can POST a file to where it can be used as an "include" file in the Sketch.

I tried #include </data/settings.h> but that yields an error.

The idea is that in operation the chip will be physically installed in a place that is hard to get at. In order to update the chip with configuration settings for ht e application, I put all those settings in an Include file.

What I want to do is to replace the Include file (Setting.h) using a call to the ESP8266.

I was following this but I could not figure out how to get the file to anyplace but in /data inthe SPIFF:

https://tttapa.github.io/ESP8266/Chap12 ... erver.html
User avatar
By quackmore
#80414 bad news and good news

bad news first:
'C' is a compiled language, not interpreted
you cannot think of modifying a source file on the target device

good news:
you can upgrade the fw running on your target device using OTA
that's the feature you have to look for not SPIFFS

beside SPIFFS does not allows for directories other than '/'