|
From: | Mohsin Madki |
Subject: | Re: [lwip-users] how to handle multiple TCP socket simultaneously |
Date: | Fri, 4 Aug 2017 10:49:54 +0530 |
Hi,I am using STM32F107 with FreeRTOS+LWIP with Netconn APIs.I have created 4 tcp ports (server in listening mode) and trasfers data received to UARTS and viseversa. i.e. Ethernet to Serial converter (4 port).I works well for few hours but later it stops working. lwipopts defines are as follows:/* ---------- Memory options ---------- *//* MEM_ALIGNMENT: should be set to the alignment of the CPU for whichlwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2byte alignment -> define MEM_ALIGNMENT to 2. */#define MEM_ALIGNMENT 4/* MEM_SIZE: the size of the heap memory. If the application will senda lot of data that needs to be copied, this should be set high. */#define MEM_SIZE (10*1024)/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the applicationsends a lot of data out of ROM (or other static memory), thisshould be set high. */#define MEMP_NUM_PBUF 64 //100/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. Oneper active UDP "connection". */#define MEMP_NUM_UDP_PCB 6/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCPconnections. */#define MEMP_NUM_TCP_PCB 10/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCPconnections. */#define MEMP_NUM_TCP_PCB_LISTEN 10 //6/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCPsegments. */#define MEMP_NUM_TCP_SEG 20/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously activetimeouts. */#define MEMP_NUM_SYS_TIMEOUT 10/* ---------- Pbuf options ---------- *//* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */#define PBUF_POOL_SIZE 12/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */#define PBUF_POOL_BUFSIZE 512Please suggest if i am missing something.Regards,Mohsin Madki.
[Prev in Thread] | Current Thread | [Next in Thread] |