NNDK 2.5.3 and DHCP

Discussion to talk about software related topics only.
Post Reply
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

NNDK 2.5.3 and DHCP

Post 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.
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: NNDK 2.5.3 and DHCP

Post 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.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: NNDK 2.5.3 and DHCP

Post 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.
seulater
Posts: 445
Joined: Fri Apr 25, 2008 5:26 am

Re: NNDK 2.5.3 and DHCP

Post 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.
Post Reply