Expressive DevKit + Sming: Spiff file system
Posted: Sat Apr 18, 2015 3:47 pm
I'm trying to get a simple example of open/write/close/read/print to work. I get open and write errors:
My app is:
Have also tried various other open flags eFO_ReadWrite etc. I saw the problem originally when trying to use HttpServer_AJAX and FtpServer.
Using Sming 1.0.5 and DevKit 2.0.2.
Thanks!
Code: Select all
11483606 <html>Hello from Spiffy</html>
open errno -10002
write errno -10010
open errno -10002
open errno -10002
11649732 content:
11651409 Goodbye
mode : softAP(1a:fe:34:a0:d6:9c)
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
add if1
bcn 100
My app is:
Code: Select all
#include <SmingCore/SmingCore.h>
const void p(const String s){ Serial.println( String() + micros() + " " + s); }
void init()
{
Serial.begin( 115200);
Serial.systemDebugOutput(true); // Enable debug output to serial
delay(5000);
String fname="test.txt";
String content="<html>Hello from Spiffy</html>";
p( content);
short file = fileOpen(fname, eFO_CreateNewAlways | eFO_WriteOnly);
fileWrite(file, content.c_str(), content.length());
fileClose(file);
file = fileOpen(fname, eFO_ReadOnly );
String out= "content: " + fileGetContent( fname);
p( out );
p( "Goodbye");
}
Have also tried various other open flags eFO_ReadWrite etc. I saw the problem originally when trying to use HttpServer_AJAX and FtpServer.
Using Sming 1.0.5 and DevKit 2.0.2.
Thanks!