Page 1 of 1

DHCP lease configuration

Posted: Wed Jun 05, 2019 10:59 am
by TexasUK
Hi, first post here and I couldn't find anything using a quick search on the subject relating to this question.

My problem is with the 2 hour lease currently configured in your DHCP code.
Is there a way of extending the lease time to 5 hours, and if there is, how please?

Appreciate any help,

Re: DHCP lease configuration

Posted: Wed Jun 05, 2019 12:21 pm
by ESP_Sprite
Do you mean in AP mode or in STA mode?

Re: DHCP lease configuration

Posted: Wed Jun 05, 2019 12:25 pm
by TexasUK
Sorry should have said, AP mode.

Basically software running on the device doesn't like the drop at 2 hours.

Re: DHCP lease configuration

Posted: Wed Jun 05, 2019 12:26 pm
by TexasUK
This is the specific bit I am referring to:

https://github.com/espressif/esp-idf/bl ... cpserver.h

Re: DHCP lease configuration

Posted: Thu Jun 06, 2019 12:25 am
by ESP_Sprite
I think calling tcpip_adapter_dhcps_option with opt_id IP_ADDRESS_LEASE_TIME and opt_val (a pointer to an integer containing) the lease time in minutes should do the trick.

Re: DHCP lease configuration

Posted: Mon Jun 10, 2019 9:21 am
by TexasUK
Sorry for the delay, but thank you for the information and I shall pass on to the developer and see what they come back with.