Comparing Deep Sleep with 7ma idle - Breakeven point

For my specific setup, router, circuit. It takes about 200ma while booting for 15 seconds. (3 secs the first time)

If you boot and wake from deep sleep more often than every 5 mins to send a sample of data…
You should use 7ma idle and not deep sleep at all.

If you boot and wake from deep sleep LESS often than every 5 mins to send a sample of data…
You should use deep sleep and wake every 6-999 mins.

15 seconds sounds rather strange. What’s your router? There is a known bug in the current release which means DHCP takes 2 seconds longer than required, but we average maybe 1.2s from cold boot to connected to the server with that bug fixed.

I’d be interested to work out what’s contributing to your very slow boot time.

I’d like to figure it out too! It only takes a few seconds after power up. It consistently takes much longer after deep sleep. Tomorrow will try a different router and simple code. And let you know.

This code works. 3-5 secs.
imp.configure(“t”, [], []);
imp.onidle(function(){server.sleepfor(60);});

This does not take 3-5. It takes 5-10 secs of red,orange,off. Was longer?

if ((“nv” in getroottable()) && (“count” in nv)) {
server.log(format("%d %d",time()-nv.count,(imp.rssi()+95)/5));
nv.count=time();
}
else nv <- {count = time()};

imp.wakeup(4, function(){server.sleepfor(30)});
//imp.onidle(function(){server.sleepfor(30);}); a little better sometimes?

Ideas? Try it?

You haven’t replied about what router you have?

We’ll take a look, but the connection phase (red/orange etc) happens before any code is run so it’s code-independent.

Cisco E1200
DD-WRT v24-sp2 (06/08/12) mini
Repeater Bridge - Not a common setup!

The problem only occurs with the above configuration
AND the 6 lines of code above.
It does not fail with a different router.
It does not fail with the 2 lines of code on E1200.

Confused? Me too!

Revised:

If you boot and wake from deep sleep more often than every 1 mins to send a sample of data…
You should use 7ma idle and not deep sleep at all.

If you boot and wake from deep sleep LESS often than every 1 mins to send a sample of data…
You should use deep sleep and wake every 2-999 mins.

@sbright33: can you take wireshark logs? When it takes a while to connect, is it going red/orange/off or orange/red/off?

I don’t even have the router password. R/O/O.

All better, problem fixed with new Router. 3 seconds.

It should be 2 seconds less with release23 :slight_smile: