2017-07-11 09:17 AM
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 #stm32f4Solved! Go to Solution.
2017-07-12 01:11 PM
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*
-Andy2017-07-12 07:19 AM
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.-Andy2017-07-12 01:11 PM
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