|
From: | Noam Weissman |
Subject: | Re: [lwip-users] Lwip tcp-stack reliability issue when using non-reliable network? |
Date: | Mon, 6 Nov 2017 22:43:22 +0000 |
Hi Itzik,
From participating the group here I have heard many complaining that the driver level is the cause to problems like you are facing.
From my own experience I have noticed problems when using the RAW API. The RAW
API is NOT thread safe (I am using an OS) and therefore one needs to follow the guidelines and understand how to use it.
LwIP is small and light weight. I have used it with ARM9 that had only 96K RAM. Actually TCP
stack was assigned less then 10K... 😊
I suggest looking for a nice example with Sockets + lwipopt.h and continue from there.
If you are using it to stream an unreliable connection you should probably add some protocol
to overcome this instability.
I do not see the reasoning for defining 8M for MEM_SIZE ?
You do not need so much. 100K is more then sufficient for your testing, I think. You do not more PCB's... PCB is your control block... every block you send or receive is using one. I am defining 80 TCP PCB's with 25K RAM for MEM_SIZE and I do not have so much RAM.
Check some examples and see if you can find more ideas...
Hope that helped, Noam. From: lwip-users <lwip-users-bounces+address@hidden> on behalf of Itzik Levi <address@hidden>
Sent: Monday, November 6, 2017 11:45 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] Lwip tcp-stack reliability issue when using non-reliable network? Hi Noam,
Thanks for the prompt response!
The actual link isn't serial. its a non-reliable rfcomm link, which is a stream based protocol.
Regarding ram available ram - up to 50MB I would say.
I'm attaching my entire lwipopts.h here.
Regarding the socket API - I did not actually put lots of thought to it, it was trivial to implement and that's that. do you have a reason to believe the root cause is there? Although the only change between the 2 tests I ran was randomly dropping data
in the physical layer output?
If you think that might be it, I can rewrite the socket layer and attempt to test again.
And regarding misusing the stack - I totally agree, I probably did misused it somehow, I'm new to lwip and that's why I'm here.
Question is, what did I do wrong, and how to pinpoint the problem.
Thanks,
Itzik.
On Mon, Nov 6, 2017 at 11:19 PM, Noam Weissman
<address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |