Starting the DHCP in STM32 demo

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
tmanev
Posts: 22
Joined: Thu Oct 04, 2012 8:57 am

Starting the DHCP in STM32 demo

Postby tmanev » Wed Nov 14, 2012 11:52 am

Any idea how to start the DHCP in the lwip demo with STM32 and ChibiOS ?

I added this in lwipthread.c but the program halts somewhere in dhcp_start!

Code: Select all

  netif_set_default(&thisif);
#if LWIP_DHCP
  dhcp_start(&thisif);
#endif
  netif_set_up(&thisif);


Best regards,
Todor

User avatar
Giovanni
Site Admin
Posts: 13064
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 758 times
Been thanked: 636 times
Contact:

Re: Starting the DHCP in STM32 demo

Postby Giovanni » Fri Nov 16, 2012 10:05 pm

Hi,

I hoped someone could answer, I never did this too, you could try to look for info in the lwIP mailing list.

Giovanni

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: Starting the DHCP in STM32 demo

Postby mabl » Fri Nov 16, 2012 10:34 pm

Hmmm I also never used DHCP - but there is a note on the lwip wiki:
This example assumes static IP, but the final netif_set_up could be replace by dhcp_start or autoip_start (see Network interfaces management for more information).


Maybe you have to remove the call to netif_set_up?

Also:
When calling from other threads, use the netifapi_dhcp_*() functions defined in the api-module netifapi.c.

So dont use dhcp_start directly.

Also see:
http://lwip.wikia.com/wiki/Network_inte ... management
http://lwip.wikia.com/wiki/DHCP

tmanev
Posts: 22
Joined: Thu Oct 04, 2012 8:57 am

Re: Starting the DHCP in STM32 demo

Postby tmanev » Wed Dec 12, 2012 2:22 pm

Thank you, netifapi_dhcp_start() is working for me.

Todor


Return to “Development and Feedback”

Who is online

Users browsing this forum: Google Adsense [Bot] and 7 guests