DHCP lease configuration

TexasUK
Posts: 4
Joined: Wed Jun 05, 2019 10:52 am

DHCP lease configuration

Postby TexasUK » Wed Jun 05, 2019 10:59 am

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,

ESP_Sprite
Posts: 2760
Joined: Thu Nov 26, 2015 4:08 am

Re: DHCP lease configuration

Postby ESP_Sprite » Wed Jun 05, 2019 12:21 pm

Do you mean in AP mode or in STA mode?

TexasUK
Posts: 4
Joined: Wed Jun 05, 2019 10:52 am

Re: DHCP lease configuration

Postby TexasUK » Wed Jun 05, 2019 12:25 pm

Sorry should have said, AP mode.

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

TexasUK
Posts: 4
Joined: Wed Jun 05, 2019 10:52 am

Re: DHCP lease configuration

Postby TexasUK » Wed Jun 05, 2019 12:26 pm

This is the specific bit I am referring to:

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

ESP_Sprite
Posts: 2760
Joined: Thu Nov 26, 2015 4:08 am

Re: DHCP lease configuration

Postby ESP_Sprite » Thu Jun 06, 2019 12:25 am

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.

TexasUK
Posts: 4
Joined: Wed Jun 05, 2019 10:52 am

Re: DHCP lease configuration

Postby TexasUK » Mon Jun 10, 2019 9:21 am

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.

Who is online

Users browsing this forum: Bing [Bot], dunato and 16 guests