lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] FW: Problem with renewing DHCP after link down/up with


From: SciMan
Subject: Re: [lwip-users] FW: Problem with renewing DHCP after link down/up with the new LWIP V2.0.2
Date: Thu, 29 Mar 2018 23:56:32 -0700 (MST)

Hi!
I have stopped my trials to start-up the DHCP renewing cause it wasn't
really required. But now I'm back to this task and I still cannot find a
solution.
After power on, the device received a new address and all is fine. When I
disconnect and connect the Ethernet cable, I get the following log:
<http://lwip.100.n7.nabble.com/file/t1647/dhcp_renew.jpg> 

The address is valid, but the status change callback is not called. This
probably means that the device didn't accepted the new address. I see in the
source of the stack that the callback is called after binding to the new
address (then function netif_set_ipaddr() is called). I also don't
understand why there is a second request that is not broadcast. Is that
expected?

In my code I do the following. By detecting link down from the HW, I call
netif_set_link_down(). I have callback function that is called by link
status change that calls dhcp_renew(). By link up detected from the HW, I
call netif_set_link_up(). That's all. I expect that when the DHCP has
delivered a new address after renewing, the status change callback will be
called, so I will be able to inform the higher level software about the new
IP address (normally it should be the same), but this never happens after
DHCP renewing.
What I'm doing wrong? I really need some help here...

Simeon



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

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