Create Firmware

The Create Firmware element is a task used to upload a firmware to EnOS by sending a HTTP request. It is the prerequisite to the lifecycle management of a device firmware in EnOS.

As the task would need information about the firmware to be created, you can create a form through a preceding task to gather the required information from users.

Properties

The following table describes the properties of the task.

Property Description
Name Specify a name for your own reference.
Product Specify the product key to be associated with the firmware. You can use a UEL expression to extract the information from the variable of the Product Dropdown form element.
Firmware Name Specify the name of the firmware. You can use a UEL expression to extract the information from a form.
Firmware Version Specify the version of the firmware. You can use a UEL expression to extract the information from a form.
Signature Algorithm Specify the signature algorithm (md5, sha256). You can use a UEL expression to extract the information from the variable of the Static Dropdown form element.
Firmware File Specify the firmware file to be uploaded. You can use a UEL expression to extract the file from a form.
Firmware Description Specify a description for the firmware. You can use a UEL expression to extract the information from a form.
Result Variable Name Specify a unique name for identifying the JSON variable that is used to store the response parameters. The ID of the created firmware is stored in the data.firmwareId parameter.
Status Code Variable Name Specify a unique name for identifying the variable that is used to store the response status code. Status code 0 indicates that the task is successful.


Note

You need to specify the variable names if you want to display or process the task result in a later process element.

Results

The following code shows an example of the result returned when the task is successful.

{
   "code":0,
   "msg":"OK",
   "requestId":"97e02352-c549-401f-b32e-647843d5d6fd",
   "data":{
      "firmwareId":"5f18fae74f051a001b222f5c"
   }
}

If you specified variable names, all parameters will be stored in the result variable and the code parameter will be stored in the status code variable. You can obtain the parameter values by using the dot notation. For example, if the result variable name is “result”, use ${result.data.firmwareId} to extract the ID of the created firmware.


For more information about creating firmware in EnOS and the details of each property, see: