lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Strategy Question for DHCP


From: Robert Deschambault
Subject: Re: [lwip-users] Strategy Question for DHCP
Date: Thu, 18 Jun 2015 11:32:47 -0400

It amazes me how one simple bad example can lead to several weeks of frustration.  I am glad the user's group has been able to help me with my issues.  Thanks especially to you Zach for your help

On Thu, Jun 18, 2015 at 11:08 AM, Zach Smith <address@hidden> wrote:

Maybe someone else could also comment on this and let me know if I am wrong but as far as I know you don’t have to do anything once the IP address is obtained from DHCP. I don’t think you should ever be calling dhcp_stop() unless maybe you really don’t want to use dhcp anymore. Maybe they are incorrectly doing that in the example to free up the udp pcb being used by dhcp. But I don’t think dhcp_stop() should be called because the dhcp client should continue to run to renew IP leases when they expire and stay registered with the dhcp server.

 

As far as I know all you have to do is call dhcp_start() (which also ends up calling autoip_start() if AUTOIP is enabled) then just call dhcp_fine_tmr(),dhcp_coarse_tmr(), and autioip_tmr() at their respective intervals. Once the address is obtained, your netif will be updated with that address – you don’t have to do anything.

 

From: lwip-users-bounces+zsmith=address@hidden [mailto:lwip-users-bounces+zsmith=address@hidden] On Behalf Of Robert Deschambault
Sent: Thursday, June 18, 2015 8:29 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Strategy Question for DHCP

 

Hi,

 

Ok, did another little experiment and I notice that if I don't call dhcp_stop() in the DHCP state machine when the IP address gets assigned I can ping my target when I use AUTOIP.  Autoip is in state 3 (bound) and everything is fine.  When I call dhcp_stop() at any time, autoip goes to state 0 (stop) and I lose comms with the target.

 

My question is this:  What should I be doing once the IP address is assigned by either DHCP or AUTOIP in coop mode?  Any call to dhcp_stop() seems to be the wrong answer.  But all the examples I have seen for an STM32F4xx call that function once the IP address has been assigned.  Any comments?

 

 

--- 

Bob Deschambault

reply via email to

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