Hi Sergio,
I took your suggestion of only sending out more data in tcp_sent callbak
and rewrite the codes
And I run into another problem: The data stream is very jerky (I am
streaming 200kb/s)
So I used a scope to see how often the tcp_sent callback is invoked, it
turns out:
I will get about 10-20 callbacks within a short burst of 5 to 10ms, then
there is NO callback for 200ms, then repeat
I tried to tune lwip based on various previous suggestions on the forum
and didn't have much luck.
With this callback frequency, it is impossible to plot data in real time
smoothly (data acquisition application)
Any suggestion? Thanks!
Chen
On 7/11/2015 12:00 PM, [email protected] wrote:
Send lwip-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nongnu.org/mailman/listinfo/lwip-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of lwip-users digest..."
Today's Topics:
1. Re: Retransmit too quick? (Sergio R. Caprile)
----------------------------------------------------------------------
Message: 1
Date: Fri, 10 Jul 2015 13:31:37 -0300
From: "Sergio R. Caprile" <[email protected]>
To: [email protected]
Subject: Re: [lwip-users] Retransmit too quick?
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
The RAW API is event driven code.
The ACK is handled as an ACK by lwIP. This means the window is updated,
the sent pbufs are freed, and you can send data again.
You can't send more data until you receive an ACK for your window size.
You can't queue more data until lwIP frees pbus (when you receive an ACK).
There is no point in calling the send function when you don't have room
to queue/send more data, this causes CPU hog.
There is no point in calling the send function at specific intervals
(assuming you need to send a big bunch of data); if the ACK gets
received in between the interval, you'll have dead times where nothing
is sent.
The write time to call the send function is when the sent callback is fired.
You are free to choose and write your app the way you want; but, if it
does not work and you ask for help...
Good luck.
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users