Auto Modem-sleep

Jan Kijonka
Posts: 27
Joined: Fri Jun 09, 2017 10:17 pm

Auto Modem-sleep

Postby Jan Kijonka » Sun Jun 11, 2017 3:59 am

Hello,
I would like to use the Auto Modem-sleep (AT+SLEEP=2) on my ESP8266 E12 WiFi module. How to implement it for both - station and server sides ? I'm currently sending one data packet from ESP8266 station to AP server in 500 ms intervals. I would like to have modem-sleep state (~15 mA currents consumption) in this idle time. Unfortunately, the currents consumption is about ~70 mA all the time. How to use beacons to close the Wi-Fi module circuit within the two DTIM Beacon interval in order to the power savings, and automatically wake up before the next Beacon arrival ? Any examples of implementation ?

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

Re: Auto Modem-sleep

Postby pratik » Tue Jun 13, 2017 1:21 am

Have you tried light sleep for your purpose? The station end works best with that.
70mA is way too high, seems like no sleep policy is active at all.
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

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

Jan Kijonka
Posts: 27
Joined: Fri Jun 09, 2017 10:17 pm

Re: Auto Modem-sleep

Postby Jan Kijonka » Tue Jun 13, 2017 6:21 am

Hello,
I didn´t try the force Light-sleep or Deep-sleep, because I suppose, the Modem-sleep would be the best solution for my application. The modem-sleep features are:
- ESP keep connected with the router through the DTIM beacon mechanism
- DTIM interval from 100 ms to 1000 ms
- ESP8266 automatically waked-up before the next Beacon arrival

I read further in the ESP8266 Sleep Mode Function Description: "The sleep time is dedicted by Beacon DTIM of router. During sleep, ESP8266 can keep the Wi-Fi connection with router, and receiving the interactive information from mobile phone or server."

It is probably what I want. I would like to stay connected with minimal delay caused by wake-up or sleep process and also to interactively receive the data requests from the router. The expected time between two data requests should be 500 ms (it matches the DTIM interval requirements).

The application is to have a several ESP8266 Wi-Fi modules simultaneously connected to one AP (or soft-AP on mobile phone). Each ESP8266 module should be requested for 2 kiloBytes data packet in 500 ms intervals. Example for two ESP8266 modules: 1) AP Scans for connected ESP8266 modules. 2) AP requests data from 1st ESP8266 module. 3) The 1st ESP8266 module sends the 2kB data packet and enter the Modem-sleep for <500 ms. 4) AP requests data from 2nd ESP8266 module. 5) The 2nd ESP8266 module sends the 2kB data packet and enter the Modem-sleep for <500 ms. 6) The 1st ESP8266 is automatically waked-up waiting for new data request from the AP. 7) and so on... I would like to be able to serve as many ESP8266 modules as possible (ideally tens of modules) during the 500 ms interval.

Who is online

Users browsing this forum: No registered users and 2 guests