Dear all,

Has Anyone test get dynamic ip on lwip-1.4.0.rc1? I try to do it with this
code:

    {
        /* Configure dynamic IP */
        vhPrintf("Configure dynamic IP...\n");
        netif_add(pEMAC_if, NULL, NULL, NULL, NULL, ethernetif_init,
tcpip_input);
        /* make it the default interface */
        netif_set_default(pEMAC_if);
        dhcp_start(pEMAC_if);

        while (pEMAC_if->ip_addr.addr==0) {
            PSA_Services_WaitMs(DHCP_FINE_TIMER_MSECS);
            dhcp_fine_tmr();
            mscnt += DHCP_FINE_TIMER_MSECS;
            if (mscnt >= DHCP_COARSE_TIMER_SECS*1000) {
                dhcp_coarse_tmr();
                mscnt = 0;
            }
        }

        vhPrintf("\nDone with DHCP");
        vhPrintf("\nAccquired IP = %d.%d.%d.%d\n",
                                0xff & (pEMAC_if->ip_addr.addr),
                                0xff & (pEMAC_if->ip_addr.addr >>8),
                                0xff & (pEMAC_if->ip_addr.addr >> 16),

                                 0xff & (pEMAC_if->ip_addr.addr >>24)
                                );
    }

but it could not work, the attached file is log message i got, it hang at
there! I notice that the same above code i used i can get dynamic ip with
lwip version 1.3.1.rc1.

Thanks in advance!
Thien

Attachment: get
Description: Binary data

_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to