I have a problem with FreeRTOS + TCP/IP stack.

Can I force somehow my MCU, to go find new DHCP server?
We had some modification on our network, and after that, I can’t reach the DHCP and DNS servers.

As you can see, I tried to debug connection of network with my pc. Those are on the same network, but I can’t see any of response from the server, what is really strange. I thought request message will be send only after get an offer from the server, what I can’t see.

After I initialised my freertos TCP/IP stack, I have got IP address of the server which was not reachable (by ping)…

Do you have any idea how could I solve my issue?

With regards,

Are you saying your PC gets an address from DHCP but your FreeRTOS device doesn’t when it is connected to the same network? Or are you saying the DHCP server replies but the FreeRTOS device is not recognising the reply? When FreeRTOS sends out a DHCP request it has no control over which DHCP servers reply. If

It sounds to me that you have a PC (, an embedded device (initially, and a DHCP server (a router ?) somewhere on the LAN, is that correct?

It is normal that you can not see the traffic between the device and the router, except when the broadcast MAC-address is used. Or when the DHCP server is running on your PC.

As Richard asked: I am also curious how your PC gets an IP-address. Is that static?

Does everything work well when you define ipconfigUSE_DHCP as 0, and the device uses a static IP-address?

What i sometimes do is run a DHCP server on my laptop. It responds much quicker than the DHCP server on my router, and so I can follow the communication by running Wireshark.

I had an issue with my MCU and Ethernet interface, so I wanted to debug and check the communication between MCU and servers. So I connected the MCU and my PC to the same hub and I recognised that, I can’t see any response from DHCP server to my MCU, but my MCU try to offer and it was strange for me… As I know, I should have seen the response of DHCP server.
The issue caused by some network problem, I had an IP address which wasn’t reachable.

Thanks your reply!

Hi @htibosch,

I’ve used FreeRTOS_IPInit function ( “ipconfigUSE_DHCP” as 1) to reach network automatically.
Firstly, it try to reach the DHCP server and I didn’t see any response from server, which was unusual. So I’ve got an IP address from the server, without any “broadcasted” message from the server.
After that it tried to connect to one unreachable server, that caused the issue.

Statically worked everything fine.
It was solved!