Why does DHCP give up?

Hello!

I’m new to FreeRTOS+TCP. I was surprised to find that the DHCP implementation stops trying to acquire an address after 30s. Is there a config option to make it keep trying forever? I want my device to be robust in real-world conditions.

I found another thread on this forum which seems to offer a fix. Was this ever implemented in the official source? (Thread subject is “DHCP Never give up”. I can’t put a link because I’m a new user)

Hi @adabee
Welcome to the FreeRTOS Community Forums !
We had a discussion on this issue in the past. You can check it out here

1 Like

Thanks for the link. It looks like user ‘kar-rahul-aws’ proposed how to implement such a feature but then the issue was closed due to inactivity.

I’m puzzled that the default behavior is to give up. My understanding is that this IP stack is designed for IoT devices, yes? IoT devices are expected to be robust and not require human intervention to recover from spurious network conditions. The current give-up strategy means that a human needs to intervene by power-cycling the device or unplugging the network cable.

User ‘kar-rahul-aws’ on GitHub is @karahulx only :slight_smile: Can you try to implement the suggested approach?

Oops, I see it’s the same user :grin: I will try to implement a solution and submit a pull-request.