These are chat archives for SmingHub/Sming

15th
Sep 2017
Andriy Petrynchyn
@petrynchyn
Sep 15 2017 05:14
@R3cycl0r Try install Java Runtime Environment 8 by hand and run choco install again
bbourdel
@bbourdel
Sep 15 2017 09:27

Hello everyone,
Does anyone already success to upload a file from the SPIFF memory to a external webserver ?
I try to use FileStream lib but it raise a Fatal exception 20, each time it try to upload file. Here my code and my exception :

FileStream fileS = FileStream("data.raw");

Serial.println("File loaded " + String(fileS.fileName()) + "  " + String(fileS.getPos()) + "  " + String(fileS.length()) + "  " + String(fileS.id()));
uploadClient.send(
        uploadClient.request("http://posttestserver.com/post.php")
        ->setHeaders(requestHeaders)
        //->setBody(&fileS)
        ->setBody(&fileS)
        //->setSslOptions(SSL_SERVER_VERIFY_LATER)

// ->pinCertificate(googlePublicKeyFingerprint, eSFT_PkSha256)
->onRequestComplete(onDownload)
);

And error :

connected
Readdy to upload
attached file: data.raw (16 bytes)
File loaded data.raw 0 16 00f-1-100-8
Creating new httpConnection
HttpConnection::connect: TCP state: -1, isStarted: 0, isActive: 0
HttpConnection::connecting ...
+TCP connection
connect to: posttestserver.com
request launch
DNS record found: posttestserver.com = 107.170.47.130
TcpConnection::connect result:, 0
OnConnected
HttpConnection::onConnected: waitingQueue.count: 1
Storing 59 bytes in stream

* Fatal exception 20
pc=0x00000000 sp=0x3ffffa60 excvaddr=0x00000000
ps=0x00000030 sar=0x00000010 vpri=0x00000000
r00: 0x402359f9=1076058617 r01: 0x3ffffa60=1073740384 r02: 0x3ffffd88=1073741192
r03: 0x00000000= 0 r04: 0x3ffea050=1073651792 r05: 0x3fff1370=1073681264
r06: 0x3ffea074=1073651828 r07: 0x00000018= 24 r08: 0x3fff1340=1073681216
r09: 0x00000000= 0 r10: 0x3fff1358=1073681240 r11: 0x000000ff= 255
r12: 0x3fff1738=1073682232 r13: 0x3fff1760=1073682272 r14: 0x3fff1948=1073682760
r15: 0x3ffe8c4b=1073646667

Stack dump:

Thanks

R3cycl0r
@R3cycl0r
Sep 15 2017 10:05

@petrynchyn Thanks, I tried, then I installed it again but the same ad the picture: alt

I put also the log attached title

Thank you all