Make sure that in order to perform the FOTA of a device, you need to have a Virtual machine with the “Fota Enable” feature.
The command compiles and uploads the firmware for a device into ZDM.
zdm fota prepare PROJECT-PATH DEVICEID VERSION
VERSION is a string identifying the version of the firmware (e.g., “1.0”).
Once you’ve uploaded your firmware, you can send the FOTA command to a device that will download it from the ZDM and uplink it.
If the FOTA operation is finished, you can see if the device has accepted or refused it using the zdm fota check dev-uid command.
To start a fota, type the command:
zdm fota schedule FW_VERSION DEVICE_ID
where FW_VERSION is the firmware version associated with the device’s workspace uid and DEVICE_ID is the device you want to send the command to.
To check the status of a FOTA you started, to know if the device finished the task or if an error occurred, type the following command:
zdm fota check DEVICE_UID
where DEVICE_UID is the uid of the device you want to check.