cancel
Showing results for 
Search instead for 
Did you mean: 

LwIP DHCP no ip request

andy b
Senior
Posted on July 11, 2017 at 18:17

Hello fellow STM32 explorers

I am currently working on a STM32F4 TCP/IP project.I'm using LwIP's RAW api.I got a echo UDP program working but with a static IP now I'm trying to get an ip adress automatically using a DHCP.I have enabled DHCP but when pluging my board (via a PHY) to my PC I do not see any ip resquest on Wireshark.Are there any other steps that need to be made in my code for DHCP to work ?

Any help is welcommed ,Feel free to give suggestions/hints.

Have a nice day

-Andy 

#dhcp #stm32f4-discovery #lwip #stm32f4
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on July 12, 2017 at 20:11

Final update

Well after a lot of debugging it seems that my mistake was straight up stupid.When I reloaded my cube to enable DHCP I hadn't noticed that  MX_LWIP_Process(); and sys_check_timeouts(); which are in the while(1) got removed.Was so busy following the trail of the DHCP functions that I forgot to look at my main.c file. *Facepalm*

-Andy

View solution in original post

2 REPLIES 2
andy b
Senior
Posted on July 12, 2017 at 16:19

Update

I was able to get a DHCP request on Wireshark while doing the code step-by-step in the debugger but still haven't figured out which part of the code isn't executing like I want it to.I am suspecting udp_sendto_if_src function but it's only speculation for now.

-Andy
Posted on July 12, 2017 at 20:11

Final update

Well after a lot of debugging it seems that my mistake was straight up stupid.When I reloaded my cube to enable DHCP I hadn't noticed that  MX_LWIP_Process(); and sys_check_timeouts(); which are in the while(1) got removed.Was so busy following the trail of the DHCP functions that I forgot to look at my main.c file. *Facepalm*

-Andy