Hi,
My customer would like to transfer big size of data from ethernet but failed.
I tried to add below code in C:\ti\mcu_plus_sdk_am273x_08_04_00_17\examples\networking\lwip\enet_cpsw_tcpclient\app_tcpclient.c and also failed to transfer the data successfully. The return error code is -14, which means "/** Connection reset. */".
static const uint32_t APP_CLIENT_TX_MSG2[6400] = {2};
err = netconn_write(pConn, APP_CLIENT_TX_MSG2, sizeof(uint32_t)*6000, NETCONN_COPY);
if (err == ERR_OK)
{
printf("APP_CLIENT_TX_MSG2 6000 was sent to the Server\r\n");
}
else
{
DebugP_log("couldn't send APP_CLIENT_TX_MSG2 6000 packet to server\r\n");
continue;
}
If the size for netconn_write is sizeof(uint32_t)*5500, it can work ok.
How to increase the transfer size of netconn_write()?
Is the max size of netconn_write() related to below macro? If yes, what's the relationship?
C:\ti\mcu_plus_sdk_am273x_08_04_00_17\source\networking\lwip\lwip-config\am273x\lwipopts.h
/* TCP Maximum segment size. */
#define TCP_MSS 1460
/* TCP sender buffer space (bytes). */
#define TCP_SND_BUF (16 * TCP_MSS)
/* TCP sender buffer space (pbufs). This must be at least = 2 *
TCP_SND_BUF/TCP_MSS for things to work. */
#define TCP_SND_QUEUELEN (8 * TCP_SND_BUF/TCP_MSS)
/* TCP writable space (bytes). This must be less than or equal
to TCP_SND_BUF. It is the amount of space which must be
available in the tcp snd_buf for select to return writable */
#define TCP_SNDLOWAT (TCP_SND_BUF/2)
/* TCP receive window. */
#define TCP_WND (TCP_SND_BUF)
/* Maximum number of retransmissions of data segments. */
#define TCP_MAXRTX 12
/* Maximum number of retransmissions of SYN segments. */
#define TCP_SYNMAXRTX 4
#define DEFAULT_THREAD_STACKSIZE (5 * 1024)
#define TCPIP_THREAD_STACKSIZE (8 * 1024)
Thanks,
Chris