lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: DCHP Client(Urgent)


From: Christiaan Simons
Subject: [lwip-users] Re: DCHP Client(Urgent)
Date: Tue, 1 Nov 2005 13:00:36 +0100

"Robson" <address@hidden> wrote on 01-11-2005 13:11:22:

> Hi,
> I´m using LWIP with an ARM Microcontroler in a specific application,
> and I want to use this in my common network. So, I want to establish
> a DHCP client. But I don´t know how to set DCHP and how to call the
> correct functions.

As I said before on the lwip-users list the contrib/ports/unix/proj/unixsim
example and the src/core/dhcp.c are some sort of a reference. Also lwip/doc
should explain the important concepts.

If something is missing there I'll try to document/fix that later.

> My question is: in a simple application, what is the configurations
> and the exactly sequence of call functions should we use?

What is simple? We get these questions all the time,
and it's getting a bit boring. Read the code please.

> I try to use dchp_start(), dchp_discover()…but no results.

You shouldn't be calling dhcp_discover() yourself.

Please note you should have created and initialised a netif,
and enabe it with netif_set_default() and netif_set_up()!

Furter documentation is from the dhcp source:

Integration with your code:
Use from lwip/dhcp.h
#define DHCP_COARSE_TIMER_SECS (recommended 60 which is a minute)
#define DHCP_FINE_TIMER_MSECS (recommended 500 which equals TCP coarse
timer)

Then have your application call dhcp_coarse_tmr() and
dhcp_fine_tmr() on the defined intervals.

Call dhcp_start(struct netif *netif);
starts a DHCP client instance which configures the interface by
obtaining an IP address lease and maintaining it.

Use dhcp_release(netif) to end the lease and use dhcp_stop(netif)
to remove the DHCP client.

> Please, help more urgent than possible!

Please do not push me for answers or support, I'm not getting paid for this
work.
Post future questions to the list please.

Regards,

Christiaan Simons

Hardware / Software Engineer
Axon Digital Design

+31 (0)13 511 66 66
+31 (0)13 511 41 51

http://www.axon.tv



This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
This message contains confidential information and is intended only for the
individual named.  If you are not the named addressee you should not
disseminate, distribute or copy this e-mail.

reply via email to

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