lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Using tcp_write() outside tcp_recv callback


From: Jamie
Subject: Re: [lwip-users] Using tcp_write() outside tcp_recv callback
Date: Sat, 18 Apr 2020 00:37:03 -0700 (MST)

I'm making some progress. I've got my code running on an evaluation kit of my MCU, connected to a PC, so I now have proper serial output for debugging. The main issue I've found so far, is that at some point, lwIP stops sending data out on the wire, causing the snd_buf() availability to gradually/rapidly decrement until it hits 0, causing a 'tcp_write: too much data' error. I've included a screenshot of a plot I've made in Excel, which plots snd_buf() over the number of tcp_write() calls. As you can see, normal behaviour is exhibited (snd_buf() decrements as data is added to the queue, then the data is sent out on the wire, and the buffer is cleared) up until a certain point. At this point, data is no longer being received by the attached computer, and the snd_buf() grows larger and larger until it's full, causing the tcp_write: too much data error. Does anyone have any idea as to why this might be the case? Bear in mind that the rate of calling tcp_write() is fixed, as is the data being sent (it's a sequence of chars making up 20 bytes, which is dynamically allocated in the function which calls tcp_write()).

Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

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