I am almost ready with prototype. developed P1 based hardware, firmware and ready to do production.
I want to use OTA update of my hardware firmware at all customer location so no idea how can i do it by just one click or by entering in specific mode by pressing any switch on h/w or my mobile app so it stop regular routine code and wait for update.
What is the normal mode of operation of your product?
Is it permanently connected to the cloud?
Do you want to role out the update to a fleet or a single device?
Does the product allow for asynchronous interruption of the process or does it need to be put in a safe to interrupt mode?
Suggest you look at using the console and product if not already doing so. Thus, you upload your new release to the console and let it control OTA update process automatically.
For the device to OTA update it will need to be cloud connected - you say that it in normal mode it does not require cloud communication and may be sleeping. What you will need to do therefore is once per day (or however often you want to try updates) ensure that the device is not sleeping and connects to the cloud AND Particle.publish(“spark/device/session/end”, “”, PRIVATE); to ensure that any pending software updates are triggered.
Well we are planning to give one popup in mobile app so when customer select then after it update specific device firmware.
Sorry, I don’t understand the process - do you mean the customer can enable or disable OTA software updates?
Not added anything like that but when update popup came we can display some message like “Do not start any process while device is updating”
If I understand this correctly - it is a good idea to warn the user if an update is in progress and a reset is about to happen - you can do this by including something like this in setup();
The handler would look like this, global bool isResetPending is checked within the application code to avoid operations when the device is about to be reset. I would normally have System.disableReset(); in setup();
void handle_restart_events(system_event_t event, int data)
if (event == reset)
isResetPending = false;
else if (event == reset_pending)
else if (event == firmware_update && data == firmware_update_complete)
isResetPending = true;
else if (event == firmware_update && data == firmware_update_begin)
statusMessage("Software Update In Progress");
Yes. checked about how to create product, firmware update, team member add, automatic update… etc…
Yes If some customer want to use existing firmware version or they want to update after compeleting some test for that case we are planning to give one popup… so when he knows that system require update and once he select “YES” after that or in next hand shake it start OTA update.