• I'm making a plan for such a scenario:

    1. Think that I developed an application, wrote it to the device, tested it, and send to the field when it's ready.
    2. It turns out, my application had a bug.
    3. I have a very very good idea(!) that the problem is just the var x = 1;, it should be var x = {1} (watch the typo)
    4. I send the code to the device, and the device is bricked now and I have no option to fix the last wrong app...

    My plan as a precaution is the following:

    1. I can send this untested code with a mark to indicate "to be tested",
    2. device would download and save it,
    3. make it loaded on next reboot, and
    4. watch for a specific "heartbeat" sign (for example, I can set a timeout for a specific FlashEEPROM location value and set the "OK" value over socket connection, which will guarantee that my second application boots and connects correctly).
    5. If no heartbeat is found within a timeout, then old code will be loaded and new code will be discarded by the device (bootloader) itself.
About

Avatar for ceremcem @ceremcem started