[En-Nut-Discussion] instability of DHCP

Darek Berezowski darek.berezowski at gmail.com
Fri Sep 22 15:35:45 CEST 2006


Hello,

Hardware: ATmega128 with RTL8019AS.
NutOS version: 4.0.2 and letter 4.0.3.

After few day of checking software I can't find solution for
instability of DHCP client.

At the beginning ethernet controller is initialized
(NutRegisterDevice(&DEV_ETHER, 0x8300, 6);. Then the code follow:

if (NutDhcpIfConfig("eth0", 0, 20000)) {
		
	if (NutDhcpIfConfig("eth0", my_mac, 20000))
	{
			NutNetIfConfig2("eth0", my_mac, inet_addr("192.168.0.36"),
inet_addr("255.255.255.0"), 0);
		}
	}

There are two LANs where I tested the application. First is described
above (IPs 192.168.0.X) when the hardware is connected to my computer.
It's possible to configure the interface almost every time the
platform is reseted but it doesn't use dhcp, configuration from EEPROM
is copied to the current settings of OS. If I'd like to use different
computer station - it won't start.

Second situation when hardware is connected to regular network
(academic LAN) with dhcp server. The addresses are changed (for
NutNetIfCongfig2, additionally gateway is set). I use software
etherdetect to watch the trafic and see the moment when the hardware
send 0.0.0.0:68 and get answer from server on 67 port. It happens very
rarely. I can see that some traffic goes in the network but no respond
form dhcp server.

What can be checked additionally? Maybe someone had similar situation...
Every help and ideas would be useful.

Regards
Dark



More information about the En-Nut-Discussion mailing list