Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By Pigs Fly
#23365
kenn wrote:Idea: The deep-sleep mode with the indicated mod actually tugs on the reset line, so if you call for a deep sleep every X minutes or Y requests or whatever, it will hit reset for you.


Part of the frustration here is that this SHOULD work, but in practice it will fail to boot at some point upon waking from deep sleep. That's part of the zombie-mode discussions - trying to figure out the when and why of that failure which is next to impossible to trigger for troubleshooting purposes, but will happen at random over a wide range of time periods regardless of the frequency of sleep events.

Given the tremendous variation of failures, I gave up researching it further since I have a hackish solution that works at the hardware level for a few extra pennies in parts (TLC555), or by adding an arduino-mini for <$2 which gives me a huge amount of extra i/o and enhanced functionality.
User avatar
By tytower
#23368 Hmm . I've had one loading readings to thingspeak and sparkfun reliably for more than a month now . Only problem is one sensor drops out as its not soldered yet and its in the open so needs a wiggle every so often.
I use ESP.deepSleep() to search for ,connect and disconnect to my router. It has no resistors on the ESP8266 connections at all and is powered from a 240V source so I know its power source is stable . No matter what batteries just don't seem to cut it although half of a 7.4V 5000 mAh LiPo
seems stable enough on another one .
I use a small cap between reset and GPIO16 too not a direct link.
Code is in the wiki above as is the data address if you wish to see it . It only sends data when my router is switched on
User avatar
By Frogmore
#27753 Good news, with the current stable branch (July 23, 2015), I am seeing much better results.
@tytower your solution resets the esp8266 before each transmission so it only has to be able to do one before it gets reset. I am using mine to collect readings from a gas meter so it needs to stay on all the time (because interrupts were not working correctly, both directions, before, might be okay now).

The thing I am seeing now is that it is reconnecting to Wi-Fi fairly frequently, i.e. from many hours (which is probably fine) to a few times in an hour to several times in a minute. Here is an example:

Code: Select all[Tue Sep 01 12:09:16.569 2015] rm 0
[Tue Sep 01 12:09:16.569 2015] pm close 7 0 0/1676882768
[Tue Sep 01 12:09:17.560 2015] reconnect
[Tue Sep 01 12:09:17.560 2015] f -240, scandone
[Tue Sep 01 12:09:17.690 2015] no FrogmoreN66 found, reconnect after 1s
[Tue Sep 01 12:09:17.785 2015] reconnect
[Tue Sep 01 12:09:17.785 2015] f 0, scandone
[Tue Sep 01 12:09:20.814 2015] add 0
[Tue Sep 01 12:09:20.814 2015] aid 3
[Tue Sep 01 12:09:20.814 2015] pm open phy_2,type:2 0 0
[Tue Sep 01 12:09:20.814 2015] cnt
[Tue Sep 01 12:09:20.835 2015]
[Tue Sep 01 12:09:20.835 2015] connected with FrogmoreN66, channel 6
[Tue Sep 01 12:09:20.835 2015] dhcp client start...
[Tue Sep 01 12:09:21.733 2015] ip:192.168.0.208,mask:255.255.255.0,gw:192.168.0.1


Here is another one
Code: Select all[Wed Sep 02 06:32:29.677 2015] rm 0
[Wed Sep 02 06:32:29.677 2015] pm close 7 0 0/1761546376
[Wed Sep 02 06:32:30.681 2015] reconnect
[Wed Sep 02 06:32:30.681 2015] f -240, scandone
[Wed Sep 02 06:32:32.568 2015] reconnect
[Wed Sep 02 06:32:32.568 2015] f 0, scandone
[Wed Sep 02 06:32:34.459 2015] reconnect
[Wed Sep 02 06:32:34.459 2015] f -240, scandone
[Wed Sep 02 06:32:36.343 2015] reconnect
[Wed Sep 02 06:32:36.343 2015] f 0,
[Wed Sep 02 06:32:36.851 2015] scandone
[Wed Sep 02 06:32:38.240 2015] reconnect
[Wed Sep 02 06:32:38.240 2015] f -240,
[Wed Sep 02 06:32:38.374 2015] scandone
[Wed Sep 02 06:32:39.788 2015] reconnect
[Wed Sep 02 06:32:39.788 2015] f 0, scandone
[Wed Sep 02 06:32:41.673 2015] reconnect
[Wed Sep 02 06:32:41.673 2015] f -240, scandone
[Wed Sep 02 06:32:43.564 2015] reconnect
[Wed Sep 02 06:32:43.564 2015] f 0, scandone
[Wed Sep 02 06:32:45.452 2015] reconnect
[Wed Sep 02 06:32:45.452 2015] f -240, scandone
[Wed Sep 02 06:32:47.342 2015] reconnect
[Wed Sep 02 06:32:47.342 2015] f 0,
[Wed Sep 02 06:32:47.846 2015] scandone
[Wed Sep 02 06:32:48.760 2015] add 0
[Wed Sep 02 06:32:48.760 2015] aid 3
[Wed Sep 02 06:32:48.760 2015] pm open phy_2,type:2 0 0
[Wed Sep 02 06:32:48.760 2015] cnt
[Wed Sep 02 06:32:48.777 2015]
[Wed Sep 02 06:32:48.777 2015] connected with FrogmoreN66, channel 6
[Wed Sep 02 06:32:48.777 2015] dhcp client start...
[Wed Sep 02 06:32:49.779 2015] ip:192.168.0.208,mask:255.255.255.0,gw:192.168.0.1


Any ideas if this is normal or not.

The device is about 20' from the router with a wall (drywall, and plywood) in the way. Other devices in the same location don't seem to have a problem with it.

So far it hadn't missed any updates (but it did retry about 50/14,200 that works out to 99.65% so two nines. Not great, but not bad at all.

It looks like the update to the SDK (in staging) has some fixes that might help, but also appears to be worse for OTA, which is the next thing I want to have.