Hi!
This may be well outside of normal scope, but hopefully someone may be of assistance.
Goal: To have a CC100 on a remote network be able to safely do an automatic firmware and app update without user interaction outside of pressing “update”.
I have gotten close to this before, but I have always needed to have another machine orchestrate everything by ssh’ing into the controller and passing commands to the fwupdate script in config-tools, and then loading the new runtime app.
The problem I’m facing is that any script I call will inadvertently be stopped during the switching of rootfs, and when the controller comes back up, nothing can run to mark the update as complete/trigger the download of a new codesys application.
Cron jobs are deleted on update, so that’s off the table. Codesys applications don’t start until fwupdate finish, so that’s out of the question too.
Do I have to build a custom image to be able to do this, or are there ways I haven’t thought of?
Very simplified - Is there a way to automatically run some piece of code on an unconfirmed firmware update?