Just to have it documented, if anyone else needs it:

[email protected] escreveu:

Calling netif_set_down() and dhcp_start() would work, too, but might lead to getting a different address (dhcp_renew() can re-request the old address if the server still allows it).

This how it worked for me:

        netifapi_dhcp_stop(&lwip_netif);
        netif_set_down(&lwip_netif);
        ip_addr.addr  = 0x00000000;                                             
        net_mask.addr = 0x00000000;
        gw_addr.addr  = 0x00000000;
        netif_set_addr(&lwip_netif, &ip_addr, &net_mask, &gw_addr);
        netifapi_dhcp_start(&lwip_netif);
        do{
                vTaskDelay(100);
        }while (!netif_is_up(&lwip_netif));

Alain


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

Reply via email to