Could enableblinkup(false) brick an Imp?

Just wondering if enableblinkup(false) and possibly some badly written Squirrel code my me could take an IMP offline and keep it offline?


What happens is this: at a cold boot, the imp will try for up to 10 seconds to validate the code it is about to run is the latest version (if it takes just a second to connect and do this, then it’ll run the code at that point). The idea here is that if you have loaded some bad code during development, you can just fix the bug and power cycle the imp to unstick it.

If the imp can’t validate the code within 10 seconds - eg the wifi network it has programmed is not available - then you can start a blinkup within this 10 second period. The imp will wait for the blinkup to complete then try to use these credentials to validate the code before running it.

That’s well thought out. Could something similar be done for starting from deep-sleep with wifi disabled (if it isn’t already).

The reasons I ask is… say an imp needs to wake once a minute, measure something and only transmit if needed, then back to sleep for another minute. Shallow sleep is very impressive (industry leading) 4ma but it still will run some AA’s flat in a few weeks.

Also with wifi off the startup duration might have less jitter (DHCP, DNS, WPA2, latency to servers, etc).

Can’t really be done for deep sleep, no, because people rely on that being low power and being able to very very short shallow wakes (without wifi - yes, wifi isn’t on at any warm wake until something tries network activity or calls server.connect).

What this really means is that devices that (eg) collect readings using shallow wakes and then sleeping need to fire up wifi once in a while - eg every day - to ensure that they have the latest code. As long as your code uses onidle() to disconnect/fire the sleep entry, then any connection will ensure that the imp has the latest code running.

Shallow sleep uses about 40 joules per hour and a couple of AA’s have around 16,000 joules, meaning the IMP will run ~400 hours in shallow sleep before the batteries are flat. That’s as amazing as the IMP is small. I was just wondering if it could go to the next level with 10x more deep-sleep wakes if the wakes were only occasionally with wifi. The IMP would have to do more safeguarding as I won’t trust myself to get to right all the time.

I’m looking at having a picopower tinyAVR do the low power work then wake the IMP if needed but it would be nicer to keep it all in the IMP.

Thanks Guys.