Imp running stored code from a cold boot and no wifi connection

Greetings imp team.

My question is in regards to the imp being able to start from a cold boot and run code.

According to this comment from Hugo it seems in the next release it will be possible to start the imp without wifi and run the current code base that resides on the imp:

http://forums.electricimp.com/discussion/comment/6420#Comment_6420

If the imp is not attached to wifi, will it have access to any permanent values stored on the imp itself? We are building a device which has a schedule which is pushed to it from our cloud server, upon imp wakeup.

When we push the schedule to the imp, will there be any storage we can use in case the imp is started up without wifi? (allowing the imp to use the last permanently stored schedule).

Thanks in advance!

Franz Garsombke

There’s currently no permanent storage on the imp that will survive power off (the nv table survives deep sleep, but that requires 6uA to preserve).

Providing squirrel access to some local storage is something that has been asked for, and it’s technically possible, but no promises as to when it might appear. Until then, an I2C EEPROM may be the best solution.

Thanks Hugo. Do you happen to have any squirrel examples of interfacing with an I2C EEPROM?

I don’t, no, but i2c eeproms are pretty easy to talk to…

Thanks Hugo. When we get something working I will post it up to the forums.

Hi Guys! I’d also like to put in a vote of support for a no-wifi, cold boot, some memory ability.

For example a user preferred time, color, TV channel, or password. Reduced feature set no issue.

I understand this will take time. I’m just one more person who will be all smiles when the feature comes!

One challenge is for example:

  1. Power off device
  2. Power off wifi (simulating power loss)
  3. Power on device first
  4. Wait for Imp to timeout on WiFi connection (Imp blinking slow red, wait for lights to go dark)
  5. Power on wifi

At this point, the imp has already given up connecting to the server and have no program.

So even if I added an i2c eeprom, the eeprom data could never be used (since no program exists to use it).

Anyways, perhaps a simple watchdog reboot, thus forcing a network retry every few minutes would be a workaround.

Peter has created a wunderfull watchdog. Maybe this is what you want:
http://forums.electricimp.com/discussion/1317/hardware-watchdog#Item_15

That watchdog looks great for a warm boot, or a server disconnect.

At first glance though it wouldn’t work for my situation above where there was a loss of power leading to a cold boot, and the Imp wasn’t able to download the watchdog code yet. This could be due to the internet becoming available later than the imp boot.

Thanks for the tip!

@pctj101 in all releases up to now, the imp will be sleeping for 9 minutes after the failed join in step 4, and will wake up and try again for a minute later. It will connect, it may just take some time to get there.

Running of squirrel on cold boot will be in release 26.

I’ve been having problems with my Router, not Imps fault, it’s a vacation house. But when I get it fixed, Imp does not connect! I’ve waited hours.

@sbright33 that could well be release 25’s known issue, especially if the wifi is flaky on the router. If you want to test the fix release, PM me with a mac address.

@Hugo - Thanks for the note about the 9 minute sleep. Of course, it would be great to be able to adjust the exact retry time down the line. Also great to hear your release 26 plans!

Thanks!