Need to reduce wifi startup time and power consumption

rwel59
Posts: 97
Joined: Thu Oct 12, 2017 3:32 pm

Need to reduce wifi startup time and power consumption

Postby rwel59 » Tue Jan 30, 2018 1:38 am

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?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Need to reduce wifi startup time and power consumption

Postby WiFive » Tue Jan 30, 2018 2:31 am

Are you using static IP? Are you saving AP's BSSID and channel?

rwel59
Posts: 97
Joined: Thu Oct 12, 2017 3:32 pm

Re: Need to reduce wifi startup time and power consumption

Postby rwel59 » Tue Jan 30, 2018 3:47 am

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.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Need to reduce wifi startup time and power consumption

Postby WiFive » Tue Jan 30, 2018 4:11 am

Why no static IP? Too difficult for customers? How about dns caching? UDP?

User avatar
hassan789
Posts: 156
Joined: Thu Jun 29, 2017 2:15 am

Re: Need to reduce wifi startup time and power consumption

Postby hassan789 » Tue Jan 30, 2018 4:13 am

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.

rwel59
Posts: 97
Joined: Thu Oct 12, 2017 3:32 pm

Re: Need to reduce wifi startup time and power consumption

Postby rwel59 » Tue Jan 30, 2018 4:26 am

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

ttc7152
Posts: 3
Joined: Thu Jan 18, 2018 4:50 pm

Re: Need to reduce wifi startup time and power consumption

Postby ttc7152 » Tue Jan 30, 2018 5:00 am

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

Nespressif
Posts: 76
Joined: Tue Sep 12, 2017 11:25 am

Re: Need to reduce wifi startup time and power consumption

Postby Nespressif » Wed Jan 31, 2018 12:38 pm

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,

Who is online

Users browsing this forum: Baidu [Spider] and 80 guests