lpcware

lwIP - timeouts and re-init

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by tamirmichael on Wed Sep 26 05:32:25 MST 2012
Hello,

I use lwIP in one commercial product (LPC2478) and intend to continue to use it in a future LPC1788-based product as well.
I am wondering how I can best deal with traffic being disturbed by pulling out the network cable - yes, this event can be detected by lwIP, but the port uses several FreeRTOS synchronization resources (semaphores...) that might be locked/held by the time, for example, a new IP address is needed (consider for example one pulling out the cable while data is transferred, followed by disabling DHCP and then enabling DHCP). I tried to kill these resources but I did not manage to get it right yet.
I was wondering what the appropriate way to restart the lwIP port actually is (in case, for example, a transfer timeout is detected) ?

Thanks in advance

Outcomes