-
Notifications
You must be signed in to change notification settings - Fork 13.3k
LIGHT_SLEEP_T causes endless delay #4485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
it seems problem solved with last commits |
Closing as solved. |
Have seen exactly the same. Also when connected to WiFI Station mode. |
i still get this with latest git also: |
It looks like i was wrong when i had decided that last commit solves issue, sorry (i am a dumbass) Issue is not solved, and we still can't use LIGHT_SLEEP_T. |
@devyte If this has been brought up in another open issue my apologies, but I believe this issue is still present - or more specifically - it seems we don't need to set LIGHT_SLEEP any more as it is the default mode, and setting it actually causes a problem??? Maybe? Possibly? I have code for a NTP matrix display clock that worked fine with 2.4.0, but has stopped working since up I updated to 2.4.1 and now 2.4.2. The ESP8266 freezes cold turkey 5-6 seconds after connecting to the WiFi in station mode. I was using Some quick power consumption testing against my older clock (2.4.0 compiled and using |
|
You could also try the PingAlive workaround and check power consumption. |
@d-a-v Well, shucks! :( In my particular case, I want it to sleep, so it seems that the new default behaviour does exactly what I want (so it looks like instances where we'd want the old 'stay on unless you're told otherwise' behaviour will require NONE_SLEEP. Interesting). The code has been running stable for over half an hour with no lockups now, only change required was to remove the LIGHT_SLEEP command, and seems to be consuming the same amount of power as the 2.4.0 code with LIGHT_SLEEP enabled. At least I can get to work tidying up the code and figuring out how to get this accelerometer to work now! :) If it starts playing up (i.e. loses connection) I'll try the NONE_SLEEP / PingAlive workarounds... If I think of it I'll program up another ESP8266 up with PingAlive and report my luck with it. |
@pfeerick I have a stand with a current monitor, so i will confirm (or refute) this later. Anyway, thank you for your answers! |
I experiment LIGHT_SLEEP and found that 2.4.1 and 2.4.2 still has infinite delay issue. So your device simply does NOT wake up from light sleep. I use 2.4.0 code with this command: I use WIFI_NONE_SLEEP and it consumes 70mA, so @pfeerick observations can not be true on my device. PS: For light sleep, also you need to setup your router/AP properly. But If you set beacon time 1000ms, and DTIM=2, than your device probably not gonna sleep so much. Because your device waits beacon/DTIM for 900ms but it delivered each 2000ms. Depending my observation, I think device enters LIGHT_SLEEP when second DTIM frame delivered. So please open this bug again. |
@EUA this is currently considered to be an issue in the sdk and not in our core. That is why this is closed. |
I can't comment as to power consumption at present as I don't have inline power meters setup on the ESP8266/Digistump Oak boards, but as far as stability, it would appear that the 2.4.0 code with Since it needs to reguarly do NTP sync, and it is not only accurate but the two units are not drifting, I would surmise that networking is still functioning properly, and a crude power consumption check (finger to the can, it's cold, instead of the warm to hot when running without sleeping) suggests they are sleeping most of the time. I have time to start playing with this again soon, so will be able to comment further and provide data for #5210 also. It is curious to note that @EUA had different results, so I'll have to do some more testing there. We probably also need use a common test script for this, so that there is not a difference in behaviour resulting from something else our code is doing. |
@devyte , nope. I don't have any luck with v2.4.1and with 2.4.2. Light Sleep causes endless delay in this codes. PS: I understand that this bug is NOT related with |
Everyone, an SDK update has been merged, along with accompanying logic in our core, in #5210 . It addressed light sleep behavior, which changed in recent SDK updates, probably to "improve" power usage. |
Hi, anyone still having this problem with later versions? I'm having exactly the described problem with version 2.5.2. Tried 2.3.0 (Arduino Board Manager lets you choose versions easily) and didn't have the problem. For reference, I designed a custom breakout board with relay some buttons for the ESP-M2 (ESP8285) Module. I will try the same with a WEMOS D1 mini later, as it has the more common ESP-12F built in. Though I'd be surprised if that yielded different results, this shouldn't be a hardware issue. |
Hi @eikerenners, I didn't investigate this further but I've experienced some difference between version 2.5.2 installed using Boards manager on one Mac, and a version newer than 2.4.2 (using the commit right after the PR [https://github.com//pull/5210]) on other Mac. The checked out version right from the github works without any problems so far - I recommend starting there - try out that version if it works for you. I'm unable to help you more this week, but I'm happy to try boards-manager-installed newer versions later. The delay problem was bothering me as well for a long time so I can relate how painful it is to deal with. Please, do let me know if at least the checked-out version works for you. Martin |
Thanks for answering, I checked with the WEMOS and same behavior. I just found if I check out the github version and manually install the latest tool chain (using the get.py script) I get the right behavior. I'm no expert on how the board manager gets the extensa tools, but that might have been the problem. |
That sounds about right. I've installed 2.5.2 and then fetched get.py esptool, and it's working. Also, when the git-version 2.5.2 is matching "boards manager" version 2.5.2 - then even using IDE-managed board, it's working. Not sure how this works - but I see two 'groups' both with esp8266 - v 2.5.2 labels at Tools->Board. To sum it up - I think IDE is not doing it's job when it comes to hadling version of library + version of esptool. In my case - both macs - the problem was solved by git-cloning the library and (after checkout and after every different commit checkout) running all of the following:
Then, it worked as a charm. My biggest mistake was to not fetch the esptool and just checking-out different commit on the repo. And it's not always matching and compiling the code. Hope some of my notes helped. Martin |
Basic Infos
Platform
Settings in IDE
Problem Description
LIGHT_SLEEP_T wifi mode brakes sketch. After 10-15 seconds from connection it just stop's without any output (like infinite loop with yield()). No WDT reset or exception.
This bug appers in last commit (170911a) and 2.4.1. 2.4.0 works fine (SDK: 2.1.0 deb1901)
Delay before
wifi_set_sleep_type(LIGHT_SLEEP_T);
doesn't help (5-10 seconds)MCVE Sketch
It stops here. No any output
The text was updated successfully, but these errors were encountered: