[En-Nut-Discussion] NutDhcpIfConfig causes reboot

Gerd Müller gmueller at netways.de
Fri Oct 1 10:50:22 CEST 2004


Hi all, 

my Ethernut 1.3 always  reboots during NutDhcpIfConfig. What could be the reason?

Thank you

Gerd   

    if (NutRegisterDevice(&DEV_ETHER, 0x8300, 5))
       fputs("Registering ethernet device failed\r\n",uart);
    fputs("Configuring eth0 ...\r\n",uart);
        
     /*
     * LAN configuration using EEPROM values or DHCP/ARP method.
     * If it fails, use fixed values.
     */

   if (NutDhcpIfConfig("eth0", 0, 60000)) {
        /* No valid EEPROM contents, use hard coded MAC. */
        u_char my_mac[] = { MY_MAC };

        fputs("DHCP/eeprom config failed\r\n",uart);
        if (NutDhcpIfConfig("eth0", my_mac, 60000)) {
        	/* No DHCP server found, use hard coded IP address. */
       	 	u_long ip_addr = inet_addr("192.168.192.100");
        	u_long ip_mask = inet_addr("255.255.255.0");

        	fputs("DHCP config failed\r\n",uart);
    		NutNetIfConfig("eth0", my_mac, ip_addr, ip_mask);
        }
    
    }

    printf("%s ready\r\n", inet_ntoa(confnet.cdn_ip_addr));

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20041001/d94470e5/attachment-0001.pgp>


More information about the En-Nut-Discussion mailing list