2023-08-08 01:51 AM
Hi,
I'm playing with the LwIP stack on an STM32H723 Nucleo. I did everything regarding the variable placement, MPU config in the ram that needed to set up LwIP. With static IP it works just fine. I could ping it and I could implement an UDP server example. After it I thought I try the DHCP. The problem I do not get an IP from the DHCP server. The port on PC is set to have DHCP (tried on multiple PC) and what I see in WireShark is that the nucleo boradcasts DHCP Discover packets, but never gets DHCP Offer packets. And it is the same on multiple PCs, so I suspect something is wrong on the nulceo side. Is there any idea how to track the issue? In the "gnetif" main variable the IP, gateway, subnet is set to zero, no IP assigned to the device.
Solved! Go to Solution.
2023-08-08 02:55 AM
Do you connect the Nucleo directly to the PC's ethernet?
If yes: your PC is usually not a DHCP server, in my home setup DHCP only works if I connect the Nucleo to the network via a switch so my DSL router acts as a DHCP server.
But there's some software that let's your PC work as a DHCP server.
You could also try lwIP's AUTOIP functions for a local address assignment.
2023-08-08 02:55 AM
Do you connect the Nucleo directly to the PC's ethernet?
If yes: your PC is usually not a DHCP server, in my home setup DHCP only works if I connect the Nucleo to the network via a switch so my DSL router acts as a DHCP server.
But there's some software that let's your PC work as a DHCP server.
You could also try lwIP's AUTOIP functions for a local address assignment.
2023-08-08 04:09 AM
Yes, I do connect to the PC's ethernet port. Thank you! You have opened my eyes:) I will try it with a router or I will look for tools to create a DHCP server on local host or something...
2023-08-08 04:23 AM