MOD5282: Unit (sometimes) stuck on (TCP) write() function

Discussion to talk about software related topics only.
Post Reply
nicos
Posts: 1
Joined: Tue Aug 25, 2009 12:28 pm

MOD5282: Unit (sometimes) stuck on (TCP) write() function

Post by nicos »

Tools used: Netburner Version 1.99_beta_2_21

Hi. For quite some time now we are using this system for data acquisition (pretty high rate). I am using a 256 KB circular buffer for my data and when I have at least 4 KB I send it out using the function:
write(packet->Socket, (char*) &packet->Data[packet->Rd_Index], packet->iCount);

Now, if my pointer (packet->Rd_Index) is close to the end of the circ. buffer (it happens every 3-4 seconds for the 256 KB buffer) it makes two calls of the above function: the first to write whatever number of bytes till the end of the buffer and the second from the beginning of that buffer for the remaining count.

This scheme works in some systems without any problem. It also works fine for a few hours (5-25?) in one problematic system, but it then hangs on the second write() call. It appears it never returns from it. Any reason why?

Thanks
Post Reply