We are developing a product, of which the SparkCore firmware sometimes needs to be upgraded OTA. Off course this should be possible without pressing the reset button and mode button.
Because in the future we have thousands of these products in the field, so this is the only way to do firmware upgrades.
Is there already a method to do an firmware upgrade (flash) without pressing those two buttons?
Thanks for your information.
Iām not talking about the updating factory reset firmware. We want to flash our application firmware OTA. And that should be possible without using the mode + reset buttons.
What do you mean with ābut cannot 100% tell if it is in the mode.ā ? So there is already a workaround for it, that we can try?
I have spoken with my collegue, and he knows about this. But then you first have to install the tinker App.
But we want to flash the SparkCore with our application firmware already running on the SparkCore. So we want to use the Spark CLI and simple flash the SparkCore OTA with a newer revision of our application firmware.
And we donāt want to use the Spark IDE.
So with the SparkCore now running our application firmware, itās possible to flash a newer revision of our application firmware OTA using the Spark CLI.
It works. Great. I Ihave still one question. This yourcodefile.ino file you are talking about, what is that?
Because we do our build locally. We donāt use the SparkCloud environment. So we do the āmakeā command on our laptop locally and then flashing the created binary file to the SparkCore, over USB. But then you need to set your SparkCore in the flash mode using the reset button and mode button.
But now we can it also do via the Spark CLI and OTA. Thatās great.
One thing I might suggest doing is adding a version number variable (a la Spark.variable("version", &version, INT);). That way you can poll each to see what version number of your firmware it is running. It would be a failsafe in case a was accidentally skipped or offline during a mass push. You could build a monitoring script that polls each at a fixed interval and alerts you if one is not at the current version.
We also have capabilities for rolling out automatic firmware updates for products based on the Spark Core, if you want to do fleet updates, etc. Please feel free to email us at hello@spark.io if you have product / fleet management questions.
not sure yet how weāll be delivering features like this (i.e. fleet management); this stuff is very early in development, but it is something weāre discussing within the team.