The firmware update behavior of simulated devices is defined in the corresponding simulation profile inside the fw_update object. However, the Digi IoT Device Simulator application allows you to modify the result of the next firmware updates executed on a specific device to make it fail or succeed. For that purpose, you must use the fw_update feature of the set command.

The full syntax of the command looks as follows:

simulator> set devices <device> fw_update <value_parameter>

Where:

  • <device> corresponds to the ID or name of the device to modify its next firmware update processes

  • <value_parameter> is the way the next firmware updates for the device will behave:

    • ok. Makes the firmware updates succeed.

    • not_allow. Makes the next firmware updates fail, indicating that the update process is not allowed.

    • error_verify. Makes the next firmware updates fail when verifying the firmware image.

    • error_download. Makes the next firmware updates fail while downloading the firmware image.

    • error_apply. Makes the next firmware updates fail while installing the downloaded firmware image.

    • restore. Makes the next firmware updates to behave as stated in the corresponding profile file. See fw-update property of a device profile.

The following example demonstrates how to configure the next firmware updates of the simulated device with ID EE0D1E60-EE0EE001 to fail during the download process:

simulator> set devices EE0D1E60-EE0EE001 fw_update error_download
Next firmware updates will fail while downloading the firmware image.

simulator> 
If you decide to use this command to modify the next firmware updates behavior of a device, remember to restore it when finished to the default behavior using the restore value parameter.