Esp-radio
Esp-radio copied to clipboard
saving .ini corrupts file
All,
when saving the ini file, only the first approx. 100 chars will be stored, the rest is lost. So after reset the sketch can no more read the ini file.
Any idea? I did some debugging, but no results :-( This is what I did for debugging:
...
// *****************************************************************************
// For the "save" command, the contents is the value of the next parameter
if ( argument.startsWith ( "save" ) && ( params > 1 ) )
{
dbgprint ( "saving ini-file +++++++++++++++++++++++++++++++++++++++++++" ) ;
dbgprint ( "counting param: %d", params ) ;
for(int i=0;i<params;i++){
dbgprint ( "LOOP {%d}", i) ;
p = request->getParam(i);
dbgprint ( "isPost(): {%d} %s", i, p->isPost() ? "yes":"no" ) ;
dbgprint ( "isFile(): {%d} %s", i, p->isFile() ? "yes":"no" ) ;
dbgprint ( "size(): {%d} %d", i, p->size()) ;
if(p->isFile()){
dbgprint("_FILE[%s]: %s, size: %u\n", p->name().c_str(), p->value().c_str(), p->size());
} else if(p->isPost()){
dbgprint("_POST[%s]: %s\n", p->name().c_str(), p->value().c_str());
} else {
dbgprint("_GET[%s]: %s\n", p->name().c_str(), p->value().c_str());
}
}
...
I know that the SPIFFS is not very reliable. Sometimes the position of the file on the SPIFFS makes a difference. The quality of the power supply is also very important. The ESP32 version of the radio performs much better.