[En-Nut-Discussion] Problem with NutDhcpIfConfig()
Sivertsen, Eivind A
Eivind.Sivertsen at atmel.com
Thu Apr 2 08:59:46 CEST 2009
Hey guys,
I am desperately trying to unsubscribe from this mail list, but my confirmation emails never come back.
Can a moderator or somebody please help me?
The traffic here is too heavy for my needs, I'm better off just popping by the forum :)
Cheers;
Eivind
---
Eivind A. Sivertsen
Senior Marketing Engineer
Atmel Norway
Please include previous correspondence in any reply!
----------------
http://www.avrtv.com
http://www.atmel.com/avr
http://www.avrfreaks.net
-----Original Message-----
From: en-nut-discussion-bounces at egnite.de [mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Paulo Silva(OpenSoftware)
Sent: 1. april 2009 16:09
To: Ethernut User Chat (English)
Subject: Re: [En-Nut-Discussion] Problem with NutDhcpIfConfig()
Hi,
Looking into NutDhcpIfConfig, you have 4 possibility as described below:
1 - If you have configuration into eeprom, it is used and your code goes
to B.
2 - If dhcp has did his job.(this is not the case because you take off
the cable).
3 - If interface was configured by arp.(your code goes to B).
4 - If dhcp failed but system has remenbered last configuration.(your
code goes to B).
So you should verify what this situations are happening.
regards
PSilva
Benoit Smeysters escreveu:
> Hi everybody,
>
> I have a probleme with example tcps.c.
>
> When I test the program with my ethernut board and the cable Ethernet is connected, every is OK.
>
>
> printf("Configure eth0...");
> if (NutDhcpIfConfig("eth0", 0, 60000)) { A)
> printf("initial boot..."); C)
> if (NutDhcpIfConfig("eth0", mac, 60000)) {
> u_long ip_addr = inet_addr("192.168.16.35");
> u_long ip_mask = inet_addr("255.255.255.0");
> printf("no DHCP...");
> NutNetIfConfig("eth0", mac, ip_addr, ip_mask);
> /* If not in a local network, we must also call
> NutIpRouteAdd() to configure the routing. */
> }
> }
> puts("OK"); B)
>
>
> But when I disconnect the cable, program execution stop 60 secondes in A) and then go to B.
>
> I have the same output on the UART wiht and wihtout cable. Like if my ethernut board think it is still connected to the switch.
>
> When cable is disconnected, program execution must go to C) ?
> If there is no cable connected to the board (thus no DHCP server), NutDhcpIfConfig() must not return 0 and then program execution go to C) ?
>
>
>
> Where is the probleme ?
>
> Thank
>
> Benoît Smeysters
> Student
> Rue des Meuniers 17
> 4470 Dommartin
> Belgium
>
>
> _________________________________________________________________
> Perdu dans tous vos carnets d'adresses ? Rassemblez vos contacts Windows Live, Facebook, LinkedIn...
> http://profile.live.com/connect
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>
>
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
More information about the En-Nut-Discussion
mailing list