lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] DHCP Client (urgent)


From: Fabian Koch
Subject: Re: [lwip-users] DHCP Client (urgent)
Date: Tue, 31 Aug 2010 15:34:14 +0200


> Hello,
> Good day.
>
> I'm using lwip-1.3.1 with FreeRTOS.
> I want to establish a DHCP client. But I don’t know how to set DCHP and how
> to call the correct functions.
> Any idea on this one?

you can use netif_set_status_callback() to establish a function that will be called when the interface goes up (i.e. indicated that DHCP has finished). And then just call netifapi_dhcp_start().

I then use a task that waits for a semaphore that gets triggered in the interface-up function if dhcp was completed and times out otherwise, so I can fall-back to a fixed IP when DHCP is not reachable (AUTOIP is not feasable in my enivornment).

regards,
Fabian
reply via email to

[Prev in Thread] Current Thread [Next in Thread]