steved wrote:I've added the recent lwip initialisation changes to my working project, and all seems to be OK. Updated files attached.
As I've added to the comment, various bits need to be initialised before calling lwipInit(), especially if using SNMP.
Most users will have to call lwipInit() with some parameters set; it may be clearer to add that to the example:Code: Select all
const uint8_t localMACAddress[6] = {0x00, 0x0E, 0x32, 0x00, 0x00, 0x01 };
struct lwipthread_opts netOptions = { (uint8_t *)localMACAddress,
IP4_ADDR_VALUE(192, 168, 143, 25),
IP4_ADDR_VALUE(255, 255, 255, 0),
IP4_ADDR_VALUE(192, 168, 143, 220),
NET_ADDRESS_STATIC
// NET_ADDRESS_DHCP
};
// To initialise:
lwipInit(&netOptions);
In my restricted knowledge I think this is done in netadd() were it stands perfect. No?
I use the lwip binds to chibiOS and that is also perfect. You can add more netif's as you pleases.
I prefer to use the zero copy buf's. The IP stack is albout Pbuf's. And I use lot's of memory to get as much allocations as possible. At least as much memory for the whole TCP segment. TCPin and TCPout.