[En-Nut-Discussion] Network traffic while renewing a DHCP lease
joerg.wiegelmann at gmx.de
Thu Oct 10 13:18:41 CEST 2019
another day, another problem :-O.
In my application (Ehernut sam7x , Stable Version 5.1) nearly every
second a IP-packet is sent and in a similar frequency packets are also
For testing my application and because the problem is not really easy to
reproduce, I installed a dhcpserver (http://www.dhcpserver.de/cms/ )
with a lease time of 60 seconds. I know this is brutal but in my
application I have sometimes a network-death on ethernut, while the
software is running normally. After a few hours I had an ethernut that
doesn't want to communicate over network any more. Because I noticed
that my networktraffic is interrupted sometimes, probably when the lease
is renewed, I made a workaround in my application to send only when DHCP
is in "DHCPST_BOUND" state, like this:
if(NutDhcpStatus(NULL) == DHCPST_BOUND) // Nur senden
wenn DHCP in sicherem Zustand #wi
And also only calling a NutTcpReceive while DHCP is in Bound-State. This
is working great. I don't have this network problem any more for 15
hours until now. But I don't think that this is the right solution for
the problem. The real solution should be on a lower level of the stack
in the operating system, because probably a network ping or other
traffic makes also problems?
I heard, that other people have also network problems with Ethernut and
they installed a timer that is making a short powerdown at midnight. So
my solution could also help them?
Has anyone an idea where I could really solve the problem?
Thank you and best regards
More information about the En-Nut-Discussion