Hi Patrick, 2017-03-02 21:21 GMT+08:00 Patrick Klos <[email protected]>: > On 3/2/2017 8:10 AM, Sylvain Rochet wrote: >> >> 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. > > > I was thinking the same thing. If you get to the end of the HTTP download > with a file, then the network communications via TCP is (probably) not > responsible for the corrupt file. That implies that your app that collects > the pieces of the file from the network and writes them down may have a > problem instead. > > Add to that the fact that the transfer takes a lot longer when the file is > corrupt, and knowing that LwIP has rules about what can be called when and > in which context, it seems probable that your app's use of LwIP is not quite > right and causing the network errors that are resulting in the problems > you're seeing.
The problem is I don't get any error code while download the file. Only compare the download size then I know it's incorrect. (and sometimes it's correct) > Do you have a packet trace of the HTTP download? That will likely have > clues about what's going on Regarding "packet trace of the HTTP download" do you mean wireshark log? I don't know how to capture the packet sent/received via LTE. Or do you mean get the packet trace by enable some debug options? Thanks for your help, Axel _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
