Hi Noam,

 

I tried to find out something concerning my problem, but without success. 
However, I have a little progress. If I call the function dhcp_stop() on link 
down event (immediately after the call of netif_set_link_down(), then I call 
dhcp_start() in the same way on link up event, then the DHCP works fine. It 
works again after the reconnection. But there is still one problem. The 
callback function for state change is not called when the address is receive. 
This is a problem for me, because I want to inform the higher level software 
for the new address and I’m using for this purpose the callback for status 
change. So actually this is not the solution I want and any further ideas are 
welcome.

 

Simeon

 

From: lwip-users 
[mailto:[email protected]] On Behalf 
Of Noam Weissman
Sent: Thursday, October 05, 2017 3:20 PM
To: [email protected]
Subject: Re: [lwip-users] FW: Problem with renewing DHCP after link down/up 
with the new LWIP V2.0.2

 

Hi Simeon,

 

I am out of my office till next week so I cannot send any code. I am working 
with LwIP 2.02

and my DHCP works fine. There were a few small changes in using it.

 

I suggest searching the forum as this was addressed several times and I am sure 
you can 

find what you need in older correspondence.

 

BR,

Noam.

 

  _____  

From: lwip-users <[email protected] 
<mailto:[email protected]> > on behalf of 
[email protected] <mailto:[email protected]>  
<[email protected] <mailto:[email protected]> >
Sent: Thursday, October 5, 2017 2:50 PM
To: [email protected] <mailto:[email protected]> 
Subject: [lwip-users] FW: Problem with renewing DHCP after link down/up with 
the new LWIP V2.0.2 

 

I’m still can’t come to a solution of my problem. But my information wasn’t 
very exact. To be more clear I made a log with Wireshark:

 



 

The first 4 lines show normal start-up process. The address is received and all 
works fine. When the cable is unplugged and plugged again, we see new DHCP 
request and acknowledge two times (line No. 17 to 23). In this case the state 
change callback is not called, that means IP address is now received. Then new 
discover-frame follows. 

I need an advice, please!

 

Simeon

 

From: [email protected] <mailto:[email protected]>  
[mailto:[email protected]] 
Sent: Thursday, October 05, 2017 10:15 AM
To: '[email protected]' <[email protected] 
<mailto:[email protected]> >
Subject: Problem with renewing DHCP after link down/up with the new LWIP V2.0.2

 

Hi,

I’m facing to a problem with the renew of the DHCP after link down/up. With 
V1.4.1 all worked fine. Probably I’m missing something now. I call correct the 
functions netif_set_link_up() and netif_set_link_down() when the corresponding 
events occur. After power on DHCP works fine. But after disconnecting and 
connecting back the cable, I see that the discover-frame is sent from the stack 
and an offer-frame is returned from the DHCP server, but there is no reaction 
from the stack. Also the callback for status change is not called. I tried to 
call additionally netif_set_up() and dhcp_renew when link up event is 
generated, but there is no change. Can you give me a hint what I’m missing?

 

Simeon

 

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to