[Top][All Lists]

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

Re: [lwip-users] long time tcp receive lwip packets lost

From: Sergio R. Caprile
Subject: Re: [lwip-users] long time tcp receive lwip packets lost
Date: Mon, 19 Sep 2016 11:41:34 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

> I wrote the bridging part and for testing purposes I didn't implement
> buffer to TCP to serial. So Some while receiving data some data piles > up in somewhere in tcp thread (I think).

No, don't "think", debug, do know exactly where you have your problem, because it is not lwIP, it is you, and you are the only one who can solve it.

> I wrote a python script that sends 2096 characters every second (some
> lorem ipsum text). serial speed is 115200. So there is enough time to
> send data and free memory.

2096 x 10 = 20960 bits/115200 bps = 182ms
Yes, you should have a pulsing output assuming your TCP data has no problems in arrival and gets there on time. Have you (for example) moved a pin to know when your app runs and what it does ?

Either you are not freeing memory correctly, or you are not assigning priorities and run time correctly in your OS, or your port is broken or your driver is broken (leaky).

Do yourself some favors and
- Study X.10 (the guys at ITU-T solved the serial packetization issue for you some decades ago) - Check your port and driver by running a known to work application: the examples. - Post the section of your code that interfaces with lwIP. Not my case, but you sure will find someone versed in socket API if you label your message with the correct subject. - Give details on your OS configuration for your particular app. Again, not my case, but there are some RTOS users lurking here, do use the "subject" field wisely.

reply via email to

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