TCP/IP data corruption

Looking into this further seems to indicate that the modem FW is not managing its internal buffer properly.

Symptoms indicate that this “COULD” be an error where the internal pointer is not updated correctly but the count is. i.e. the pointer is moved 1-3bytes to little causing those bytes to be resent. But the resultant count of bytes in the TCP packet are then correct.

This also seems to only happen when calling wip_write while there is still data in the internal TCP Buffer. I have a scenario where I send 512 bytes at a time. Normally the previously 512 bytes are sent before I call wip_write again. But on the occasion where the TCP buffer is not empty and I call wip_write (i.e. adding to the buffer), the error happens (not always, but frequently enough).

I would appreciate someone at SW looking into this and double checking that they are handling the interalal TCP buffer.

But in the meantime the work around is to make sure the TCP buffer is completely empty before sending any more data by calling

wip_getOpts(channel, WIP_COPT_NWRITE, &NWRITE, WIP_COPT_END);

and ensuring the returned value equals the size of the buffer which I set using

wip_setOpts(ev->channel, WIP_COPT_SND_BUFSIZE, MAX_TCP_SND_BUFFER, WIP_COPT_NODELAY, TRUE, WIP_COPT_END)

I hope that helps someone else.