Chat freely about anything...

User avatar
By Jon Oivind Stenerud
#35643 Is there any way to read the IP lease time for the station IP?

I am able to reconnect to the router in just 1.1 s after deep sleep without DHCP, but average 2.4 s with DHCP, so I would like to avoid connecting with DHCP until it is time to renew the lease.

I have not been able to find any information related to this in the official documentation or in this board or others. I am sure the ESP receives the information as part of the ACK from the DHCP server on the router as specified in the RFC.
User avatar
By torntrousers
#35701 Not answering your question sorry, but as you're looking at static IP connect times with deepSleep and you say you can sometimes connect in about 1 second i wonder if this is effecting your ESP and if you'd try with no SPIFFS to see if you also can get the connect time down to a just couple of hundred milliseconds?
User avatar
By Jon Oivind Stenerud
#35796 Interesting, but I do not see any change when setting flash size to 512 (no SPIFFs).

I am using a SparkFun ESP8266 Thing. When I change board setting to Generic ESP8266 Module, everything works fine, but like I said - no change.

I am using the AVRISP mkII programmer. Could that affect the result?

Still also very interested in finding an answer to how I can access the IP Lease time as that is what would enable me to use static IP for most wake-ups. I need 12 months battery time and the unit wakes up about 60-80 times a day, so every second counts.
User avatar
By martinayotte
#35800
Jon Oivind Stenerud wrote:I am using the AVRISP mkII programmer. Could that affect the result?

You are not really using such programmer. With ArduinoIDE for ESP, as soon as Generic ESP is chosen, the Programmer menu is ignore, it is always using esptool under the hood.