2025-11-28 1:05 AM - last edited on 2025-11-28 1:51 AM by mƎALLEm
Hello everyone,
I am trying to get an IP for my controller using the DHCP i can able to detect the Link up and link down but i can't able to get the IP. I had refered the example code for the ethernet(lwip https server netconn rtos) But i can't able to integrate with my main code can someone please help to either identify the issue or help me to integrate the example code with the main file.
Thank you.
Output Of my code
LWIP Stack Initialized
DHCP Started...
DHCP Task Started
Link Task Started
DHCP State Changed: 255 -> 6
DHCP State: UNKNOWN (6)
Ethernet Cable: CONNECTED DHCP Restarted
2025-12-01 7:10 AM
Hello,
Start by following this knowledge base article: How to create a project for STM32H7 with Ethernet and LwIP stack working
2025-12-04 3:23 AM
I had made the code in which is had done by static IP but i need to implement the Dynamic IP using the DHCP can you guide me to use the DHCP
2025-12-04 9:03 AM
Hello @JhonVijay,
After reviewing your project, I noticed several misconfigurations, missing elements, and unnecessary changes that complicate the project.
Here are my observations based on your CubeMX configuration:
Regarding your project:
In summary, I recommend generating a new project following the knowledge base article mentioned by @mƎALLEm, enabling DHCP instead of using a static IP, and adapting the configuration to your NUCLEO board. Then, include the Segger driver as you did in your attached project. This approach will save you hours of debugging.
If you get stuck at any step, please reply to this thread with the issue you encounter, and I’ll be glad to help.
Best regards,