Skip to end of metadata
Go to start of metadata

Scenario

  1. "ThermometerDevice" thing on GadgetKeeper has been updated to version "2"
  2. "ThermometerDevice" device is still working with the old "v.1" firmware
  3. The device owner needs to update the firmware on the device to version "2"
  4. Keeping the device updated with the latest working firmware version improves performance and adds any new features

Prerequisites

  1. "ThermometerDevice" thing created in  Create Thing from Serial Number or Activate Device scenario
  2. The Model Thing used for "Thermometer" template versions is changed and a new version "2" is added as shown in Create New Template Version
  3. The "ThermometerDevice" thing on GadgetKeeper must be updated to this new version "2" as shown in Update Thing To New Version
  4. The firmware on the "ThermometerDevice" device can now be updated from version "1" to version "2"

Steps

 For more details, check the Firmware Update By GadgetKeeper interaction diagram.

1. Read persisted information


This step can be skipped if the device automatically looks up the Id information stored in its non-volatile memory when checking version information in step 2.

  1. In order to proceed, the following Id information must be looked up:
    • "thingId" obtained during activation: "9735a7c021b511e395016c626dd90e00"
    • "apiKey" obtained during activation: "31370dd83fa249529722bd86dddb1bf6"
    • last installed firmware version id obtained during last firmware update: "d5673e80218f11e3a1c46c626dd90e00"

2. Get expected version information


  1. The owner must periodically check if the current firmware version installed on his device corresponds to latest "target" version on the server side
  2. Device calls Get Target Version method in Provision API with the thing Id found in step 1:

  3. Device receives a response as follows:

This target version Id is now compared with the Id of the installed version obtained in step 1

If the firmware version Ids match, then step 3 and 4 can be skipped. Otherwise, the version 2 ("29cee0a0219e11e3a1c46c626dd90e00") firmware should be downloaded and installed on the device as follows:

3. Download version "2" firmware


  1. This procedure is followed only if the local version is out of sync with target version on the server
  2. Device calls Get version firmware method in Provision API with the thing Id obtained in step 1 and the target version Id returned in step 2:

  3. Device receives a response with the firmware code:

  4. Device decodes response string and runs through the installation process for the new firmware

The device has now been updated with the latest target version firmware on GadgetKeeper

The last step confirms the installed firmware version on GadgetKeeper which indicates that the device is fully operational

4. Confirm firmware update


  1. Device receives the following response:

The device will automatically store the Id information for the installed firmware version in its internal non-volatile memory for future API calls.

The "Thermometer" device has now been completely updated, and is ready to use.

 

 

  • No labels