lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Debug pppos packet loss issue


From: Patrick Klos
Subject: Re: [lwip-users] Debug pppos packet loss issue
Date: Thu, 2 Mar 2017 11:53:08 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

Hello again Axel,

On 3/2/2017 10:11 AM, Axel Lin wrote:

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)

If I had to guess, it would appear your app is having concurrency issues where the rules about calling various routines from different contexts are being violated? Kind of like race conditions within and around the LwIP stack? It's just a guess, but I would totally debug your app and the rules of which calls can be made from which contexts?

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?

Well, some kind of packet trace is best, but I haven't used PPP with LwIP enough to know what options are available and useful? An external serial line monitor would be nice (if you have access to the serial stream between your processor and your LTE device?). If nothing else, could you dump out the serial bytes in each packet in a text file? (Of course, just adding code to your app to dump the packets as they come and go could change the timing enough to cause different behavior, making it even harder to debug)

Patrick



reply via email to

[Prev in Thread] Current Thread [Next in Thread]