Page 1 of 1

Need to reduce wifi startup time and power consumption

Posted: Tue Jan 30, 2018 1:38 am
by rwel59
I realize that there are similar topics on the forum but not any real solutions that I've discovered - was really hoping the folks at espressif would chime in with guidance/direction/future capability...

My goal is straightfoward: power on, grab some data, log to cloud, go to sleep, repeat. Powered by battery that lasts awhile.

Ideally I would like to be able to interact with the esp when desired through ble or network but I am focusing on step 1 first.

Right now I'm running the loop then going into deep sleep. The loop is taking 4-6 seconds (wifi connection time seems to vary a bit) with 99% of it consumed with startup and wifi connection. The wifi code is pretty generic so I don't think it is causing the issue

Due to this extended time and the power consumption of the chip, my battery is not lasting very long. I realize that I could probably play with my AP, lower chip speed, etc and save a bit but if I can't take a significant chunk of time out of the wifi connect process, a battery powered iot device using the esp32 is going to be very difficult. Are there any areas I can focus on where I might be able to connect and get ip much faster? Is there anything in near term development that addresses this?

Re: Need to reduce wifi startup time and power consumption

Posted: Tue Jan 30, 2018 2:31 am
by WiFive
Are you using static IP? Are you saving AP's BSSID and channel?

Re: Need to reduce wifi startup time and power consumption

Posted: Tue Jan 30, 2018 3:47 am
by rwel59
I cannot use static IP. I am saving BSSID but haven't tried the channel. Thought I would try that tomorrow but reading other responses on the impact of (or lack of) saving the channel I wasn't holding out much for significant impact.

Re: Need to reduce wifi startup time and power consumption

Posted: Tue Jan 30, 2018 4:11 am
by WiFive
Why no static IP? Too difficult for customers? How about dns caching? UDP?

Re: Need to reduce wifi startup time and power consumption

Posted: Tue Jan 30, 2018 4:13 am
by hassan789
this is a common problem with ESP-IDF. I have opened an issue here:
https://github.com/espressif/esp-idf/issues/799

The problem is that the DHCP ip info is not saved in NVS, and has to be re-retrieved after reset.

Re: Need to reduce wifi startup time and power consumption

Posted: Tue Jan 30, 2018 4:26 am
by rwel59
yep, can't expect customers to mess with their wifi. I am far from a network expert but don't understand how dns caching or udp would effect this issue...

hassan789, read your posts and realize that I am not the only one being impacted.

that's why I was hoping that one of the espressif folks would provide some input on any other methods or potential modifications

Re: Need to reduce wifi startup time and power consumption

Posted: Tue Jan 30, 2018 5:00 am
by ttc7152
i think modem sleep is coming soon ... which might be a solution for what you are trying to do ...

viewtopic.php?f=2&t=4204&p=18990&hilit= ... eep#p18990

Re: Need to reduce wifi startup time and power consumption

Posted: Wed Jan 31, 2018 12:38 pm
by Nespressif
Wifi is not a technology designed to run on batteries because of its energy consumption, I guess you know that, although optimizing will have problems.

To operate with batteries without solar charger: BLE, LPWAN... etc.

Greetings,