You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
servestatic (SPIFFS) method will not send the whole file (tested with 30kB file) #3075
Problems is that when using servestatic method esp8266 server does not send all content and browser stays at 'Connecting....'
I have uploaded files :
index.html
jquery-3.2.0.min.js.gz
into flash using ESP8266FS tool from Arduino IDE.
It seems index.html is sent okay but when ESP8266 server tries to send jquery-3.2.0.min.js.gz file it only sends part of it and not everything. Browser will stay 'connecting'
I this known error ? Can I enable some debugging to see better what is going on ?
changed the title [-]servestatic method will not send the whole file (tested with 30kB file) [/-][+]servestatic (SPIFFS) method will not send the whole file (tested with 30kB file) [/+]on Mar 23, 2017
The debug info reveals that esp stores your data in the outgoing tcp queue (:w) but are not actually sent to the client. Only some got out from esp (:sent).
I have no real clue of what's going on.
You could use wireshark to show the packet exchanges (not the stream) to understand why tcp protocol is not behaving.
Glad it worked, but I would'nt suspect your laptop adapter.
I too had strange tcp behaviour which I try to understand.
Had you try with your cell phone without the patch above ?
It can be disabled without recompiling with extern int lwip_bufferize; somewhere in the top of the sketch,
and lwip_bufferize = 0; in setup().
edit: I meant "without switching branch", not "without recompiling"
Was this gremlin resolved? I have the same issue and trying to understand if its my page or the ESP device. (Serving jquery, Bootstrap and some other CSS/javascript files that are quite large - 200k and above)
I don't believe its a laptop wifi issue at this time as two seperate laptops have the same problem..
Activity
[-]servestatic method will not send the whole file (tested with 30kB file) [/-][+]servestatic (SPIFFS) method will not send the whole file (tested with 30kB file) [/+]maichaell commentedon Mar 23, 2017
Capture from WireShark using 'Follow TCP Stream'
d-a-v commentedon Mar 23, 2017
Out of curiosity, could you try #3027 ?
maichaell commentedon Mar 23, 2017
Yes! but can you help in merging. Seems I've forgotten something..
$ git fetch origin pull/3073/head
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 7 (delta 1), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
From https://github.com/esp8266/Arduino
git checkout FETCH_HEAD/3073/head
error: pathspec 'FETCH_HEAD/3073/head' did not match any file(s) known to git.
d-a-v commentedon Mar 23, 2017
I tried too that way and I failed.
The following works if you want to try:
git remote add tcptest https://github.com/d-a-v/Arduino.git
git pull tcptest tcpbufferized
when you are done:
git remote prune tcptest
git remote remove tcptest
git checkout origin
maichaell commentedon Mar 23, 2017
Got it. I'll try it.
Do you know how to enable DEBUGV macros if you need I can enable them ? I did it a year ago but can't remember how to do it anymore :-)
d-a-v commentedon Mar 23, 2017
I don't know the proper way, but adding #define DEBUG_ESP_CORE
on top of cores/esp8266/debug.h
does the trick.
maichaell commentedon Mar 23, 2017
I just flashed the new image but unfortunately the situation is the same. Browser stays at 'Connecting..'. Perhaps my issue could be something else ?
I still don't see any debug messages which I find quite strange. I'll try to get them displayed.
maichaell commentedon Mar 23, 2017
Finally got debug working. It seems you have to also call Serial.setDebugOutput(TRUE);
Same thing, it jammed but hopefully this debug will reveal something.
Here's log from Serial
Monitor:d-a-v commentedon Mar 23, 2017
The debug info reveals that esp stores your data in the outgoing tcp queue (:w) but are not actually sent to the client. Only some got out from esp (:sent).
I have no real clue of what's going on.
You could use wireshark to show the packet exchanges (not the stream) to understand why tcp protocol is not behaving.
maichaell commentedon Mar 23, 2017
Attached wireshark log:
wireshark_log.zip
maichaell commentedon Mar 23, 2017
Ok, now I tried connecting with my cell phone and it works !!
There must be something wrong with my laptop WLAN adapter I guess..
here's log with connecting from cell phone
d-a-v commentedon Mar 23, 2017
Glad it worked, but I would'nt suspect your laptop adapter.
I too had strange tcp behaviour which I try to understand.
Had you try with your cell phone without the patch above ?
It can be disabled without recompiling with
extern int lwip_bufferize;somewhere in the top of the sketch,and
lwip_bufferize = 0;in setup().edit: I meant "without switching branch", not "without recompiling"
maichaell commentedon Mar 24, 2017
Thanks. I tried and set lwip_bufferize to 0 and recompiled/flashed. With my cell phone that works also.
So it seems esp is having some problems with my laptop wlan adapter. If you have some ideas I'm happy to debug more.
d-a-v commentedon Mar 24, 2017
I have something else to try, could you send me an email
RichardPar commentedon Jun 11, 2017
@maichaell @d-a-v
Was this gremlin resolved? I have the same issue and trying to understand if its my page or the ESP device. (Serving jquery, Bootstrap and some other CSS/javascript files that are quite large - 200k and above)
I don't believe its a laptop wifi issue at this time as two seperate laptops have the same problem..
Richard
d-a-v commentedon Jun 11, 2017
It was resolved with what became this pull request.