How to use the wifi light sleep?

BearPeak
Posts: 1
Joined: Thu Jul 27, 2017 8:33 am

How to use the wifi light sleep?

Postby BearPeak » Thu Jul 27, 2017 8:46 am

My project use idf is ESP8266_RTOS_SDK,but i don't know how to use the wifi light sleep .
It will get in light sleep auto when run the idle task or not ?
If the chip can get in sight sleep ,what is the current of the esp8266?

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: How to use the wifi light sleep?

Postby pratik » Mon Jul 31, 2017 2:17 pm

Try this document:
http://www.espressif.com/sites/default/ ... ons_en.pdf

It will clarify on which sleep mode is best for your project.
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

gladysjenkins2019
Posts: 1
Joined: Mon Jan 14, 2019 4:35 pm
Location: https://www.achieveessays.com/essay-writer.html

Re: How to use the wifi light sleep?

Postby gladysjenkins2019 » Mon Jan 14, 2019 4:45 pm

So do I need to add code lines in my setup to make sure the ESP is in client mode and light sleeping is enabled?

StanJ
Posts: 1
Joined: Sat Feb 08, 2020 10:03 pm

Re: How to use the wifi light sleep?

Postby StanJ » Sat Feb 08, 2020 10:28 pm

gladysjenkins2019 wrote:So do I need to add code lines in my setup to make sure the ESP is in client mode and light sleeping is enabled?


Gladys, yes, Automatic Light Sleep is not enabled by default, only Automatic Modem Sleep, so you need to add the wifi_set_sleep_type(LIGHT_SLEEP_T) SDK call to enable Light Sleep. I see power drop to ~ 4mA during Light Sleep between beacons. It will go lower than 4mA, but you have to disable all timers (which loses the WiFi connection).

Depending on the DTIM listen interval Light Sleep runs at, you may miss packets in Station mode. If you can't afford to lose data, then you will want to use the default Modem Sleep instead (~15mA between TIM beacons, but no lost data). You don't have to do anything in your code to get Modem Sleep, it's running soon after you establish a connection. If you have frequent 'idle' calls in your program you'll see the power drop. For the Arduino IDE, 'idle' = delay(). Without 'idle', the modem never sleeps and substrate current is ~70mA.

AndreasSmith
Posts: 1
Joined: Sat Mar 28, 2020 8:40 pm

Re: How to use the wifi light sleep?

Postby AndreasSmith » Sat Mar 28, 2020 8:53 pm

gladysjenkins2019 wrote:So do I need to add code lines in my setup to make sure the ESP is in client mode and light sleeping is enabled
ResumeWritingServicesUS


This PDF will clear you all questions regarding the Wifi Light sleep...
https://www.espressif.com/sites/default ... ons_en.pdf

hazelmark760
Posts: 1
Joined: Thu Jul 09, 2020 1:25 pm

Re: How to use the wifi light sleep?

Postby hazelmark760 » Thu Jul 09, 2020 1:28 pm

Project completed or not?

aricwalker
Posts: 1
Joined: Mon Aug 24, 2020 9:30 am

Re: How to use the wifi light sleep?

Postby aricwalker » Mon Aug 24, 2020 9:36 am

Posts are a unique combination of content and form. The information that the article brings is very suitable for my search needs.
surviv io

dino2320
Posts: 1
Joined: Thu Sep 10, 2020 2:32 am

Re: How to use the wifi light sleep?

Postby dino2320 » Sun Sep 13, 2020 11:41 pm

gladysjenkins2019 wrote:So do I need to add code lines in my setup to make sure the ESP is in client mode and light sleeping is enabled? auto clicker

You don't have to do anything in your code to get Modem Sleep, it's running soon after you establish a connection.

Who is online

Users browsing this forum: No registered users and 1 guest