Q about "firmware"

According to the E-Imp glossary page…

Firmware - Replaceable and updatable software loaded onto an imp. Firmware is retained when the imp is powered down, and is run automatically at start-up.

Is this user replaceable? Can I flash an Imp with a new piece of firmware that has a special mode in it that (say) if there is no wifi available right now, it causes a pattern to be output via one of the UARTs?

Firmware in this context is the application code you write as a developer, @wardyprojects, so yes, you can write Squirrel code that, say, checks server.isconnected() and if the result is false then outputs data to a device on a UART bus.

Ah, I think I have been assuming that the Imps need a Wifi connection to download their firmware from the server every time it powers up. If it simply runs it’s local copy of the code at power up then that’s fine too.

I might post a quick suggestion in the Documentation category to clarify this.

Hmmm… another thought occurs.

My Imp powers up and there is no wifi available - so it runs it’s internal (out of date) version of it. An hour later wifi becomes available… what does the imp do? Does it keep running the old code without interruption (I hope so!!!) or does it immediately download the latest version of my code?

It’s actually a bit awkward to try this empirically since I don’t want to turn off my local wifi at work! :slight_smile: If it was trivial I would just try this rather than asking.

Don’t know how I managed to miss this up to now…
http://www.electricimp.com/docs/resources/wifistatediagram/

If new firmware is available, it’ll run it immediately at this point (but, you can control when you attempt connections).

For commercial devices, there will be a way to do “polite” upgrades, where the server tells the imp there’s new code available, and the device picks a convenient time to accept the update.

That sounds good to me.