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?


On Wed, Jun 17, 2015 at 8:28 PM, Robert Deschambault <
[email protected]> wrote:

> Hi,
>
> I did a quick test to see when the autoip state is set to stop.  It looks
> like that when the IP address becomes non-zero, the DHCP code recognizes
> the assignment and makes a call to dhcp_stop() which I believe is calling
> autoip_stop() function coop mode.  Here is what the printf debug looks like
> at assignment (my code is also printing stuff too and please remember I
> have modified the default IP address pool for my application):
>
> ...
> dhcp_discover()
> transaction id xid(abcd0001)
> dhcp_discover: making request
> dhcp_discover: realloc()ing
> dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)
> dhcp_discover: deleting()ing
> dhcp_discover: SELECTING
> dhcp_discover(): set request timeout 16000 msecs
> autoip_tmr() AutoIP-State: 2, ttw=6
> autoip_tmr() AutoIP-State: 2, ttw=5
> autoip_tmr() AutoIP-State: 2, ttw=4
> autoip_tmr() AutoIP-State: 2, ttw=3
> autoip_tmr() AutoIP-State: 2, ttw=2
> autoip_tmr() AutoIP-State: 2, ttw=1
> autoip_tmr() AutoIP-State: 2, ttw=0
> autoip_bind(netif=20000778) cd0 192.168.252.11
> autoip_tmr() AutoIP-State: 2, ttw=20
> autoip_tmr() AutoIP-State: 2, ttw=19
> MAIN: Network assigned by DHCP server:
> dhcp_stop()
> MAIN:    IP:    192.168.252.11
> MAIN:    SN:    255.255.255.0
> MAIN:    GW:    192.168.252.1
> autoip_tmr() AutoIP-State: 0, ttw=18
> autoip_tmr() AutoIP-State: 0, ttw=18
> autoip_tmr() AutoIP-State: 0, ttw=18
> ...
>
> after this the last line is repeated over and over again.  ttw always
> stays at 18 and the state is always 0 (stop).  I don't know if this the
> expected behavior?
>
> --
> Bob Deschambault
>



-- 
Bob Deschambault
6614 Astro Court, Mississauga
Ontario, Canada L5N 7J2
home: 905 824 7159
cell: 416 457 7163
twitter: @rdeschambault
1Fm3QkinyqiMbpnvSZMLM1AyjBvbuYeTBE
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to