2017-03-02 21:10 GMT+08:00 Sylvain Rochet <grada...@gradator.net>: > Hi Axel, > > On Thu, Mar 02, 2017 at 08:55:15PM +0800, Axel Lin wrote: >> Hi, >> I'm using current lwIP master tree. >> >> I got my device connect to internet via 4G/LTE module now (by PPPoS). >> However, I found sometimes download file size mismatch when >> try to download some files (about 100KB) from http server. >> >> I tried enable PPP_DEBUG / PRINTPKT_SUPPORT / PPP_PROTOCOLNAME / >> LWIP_STATS_DISPLAY, but I don't see any unusual things. >> >> The only strange thing is in download success case, the download speed >> is fast. In download file mismatch (seems some packet lost) case, the >> download speed is very low. Any hint to debug such issue? > > HTTP uses TCP so whatever happens you shouldn't have a size mismatch. > > As usual, for the must common lwIP misuse, if you are using an OS, you > must not call RAW API outside the lwIP TCPIP thread and since you are > using PPPoS you must use the thread-safe PPPoS input API (see PPP > documentation). Hi Sylvain, Thanks for your comment. I'm using netconn API and running with FreeRTOS. I call pppos_input_tcpip() when received serial input.
BTW, I found the correct file and damaged file always has (TCP_MSS * x) file size mismatch. In my case, TCP_MSS is 1152. Thanks, Axel _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users