[Top][All Lists]

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

[lwip-users] lwip-1.3.2 update to lwip-2.1.2

From: Adam Fullerton
Subject: [lwip-users] lwip-1.3.2 update to lwip-2.1.2
Date: Mon, 17 Feb 2020 11:33:22 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0


I am in the process of upgrading a remote monitoring system that used lwip-1.3.2 to 2.1.2. It all went very well but I am having issues with some of the options. The application uses the sockets API exclusively.
In lwipopts.h I have the following:

/* Memory options */
#define MEM_LIBC_MALLOC                 1
#define MEMP_MEM_MALLOC                 1
#define MEMP_MEM_INIT                   1
#define MEM_ALIGNMENT                   4
#define MEM_SIZE                        (1024U * 1024U * 3U)
/* Define the padding to align the payload on a 4 byte boundary */
#define ETH_PAD_SIZE                    2

The issue I experienced was that the call-back function pointers were not initialised so the system would randomly crash. I have added a call memset in the allocator which has fixed the problems. However now the pbuf memory is zero’d which I see as unnecessary. What is the correct way to configure lwip to use the c library malloc?.

What is the define which controls the number of sockets that can be open at one time?

#define MEMP_NUM_NETCONN                64
#define MEMP_NUM_TCP_PCB                64
#define MEMP_NUM_TCPIP_MSG_INPKT        64
#define MEMP_NUM_TCP_PCB_LISTEN         64

When a web browser loads some of the more complex web pages the web server reports a socket write error, usually on about the 20th file linked by the page.

Also large files (> 2Mbyte) now fail to download.  Is there anything that controls the maximum size of a transfer over a socket?

Can anyone shed any light on these problems?

Best regards,


reply via email to

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