Imp Disconnecting Every Day – Help!

My imp has been disconnecting at the rate of about once per day, then staying offline until I can power-cycle. The message written in the log is always “Power state: online=>offline”, followed by nothing.

I tried implementing the code on this wiki page but got a bunch of errors because my firmware is too old.

Has anyone else had this problem and found a solution? I don’t even know which version of the firmware I am running and can’t find a way to output that. Help?

You’re on release 17, which has a known issue whereby if no squirrel is executed, there’s a memory leak and so the imp stops processing packets.

As has been mentioned in some (very old) threads, the workaround is:

function watchdog() { imp.wakeup(5*60, watchdog); }

…which runs some code every 5 minutes and should fix the issue for you. Release 25 also had some (totally unrelated) disconnection issues, and we’re testing an update which fixes this and some other bugs in 25. This will go out after it’s had a bit more testing.

Thanks for the reply and the example code, Hugo. Looking forward to the new release!