Page 1 of 1

NNDK 2.5.3 and DHCP

Posted: Thu May 17, 2012 2:02 pm
by tod
I just noticed there was quite a lengthy delay when booting. I eventually traced it down to the GetDHCPAddress() call. If I comment that out it shaves 5 SECONDS off the boot time. I tried it with two different routers on different LANs. I'm wondering if anyone else has seen this in 2.5.3. I'm using a MOD5272. It also becomes problematic to program over Ethernet when DHCP is enabled. AutoUpdate will often get partway and stop, requiring that the NB module be reset or cold booted (AutoUpdate can no longer find it on the network). Often it will take multiple reboots before it can be programmed. When DHCP is not used I never have a problem.

Re: NNDK 2.5.3 and DHCP

Posted: Wed May 23, 2012 10:34 pm
by tod
I think this may have been due to a bad Mod5272. I swapped it out and things are behaving much better. The DHCP call for both 2.4.rc2 and 2.5.3 both take 31 ticks to complete.

Re: NNDK 2.5.3 and DHCP

Posted: Thu May 24, 2012 10:54 am
by rnixon
One thing that might be worth experimentation is to check for link before you call GetDHCP. If the first discover msg goes out before link it up you have to wait for a re-transmission and dhcp back-off timer. But you also need to make sure you don't get stuck in the link check for too long if your trying to boot with the cable unplugged.

Re: NNDK 2.5.3 and DHCP

Posted: Thu May 24, 2012 11:52 am
by seulater
i use this in my code upon booting to make sure cable is there before we try anything network related.
BOOL x = EtherLink();

I also check for this periodically in a task to make sure things dont get stuck to long if the cable is removed.