get-update-state

Use the interface to retrieve the current firmware information and update status with administrative rights.

HTTP Request

GET http://ip/mwapi?method=get-update-state
Parameter Description
method get-update-state

Response Body

Idle
{
 "status": 0,
 "state": "idle",
 "cur-ver": "1.1.72",
 "fw-valid": true
}
Updating
{
 "status": 0,
 "state": "updating",
 "cur-ver": "1.1.72",
 "update-to-ver": "1.1.72",
 "num-steps": 4,
 "step-id": 2,
 "step-name": "Erasing image",
 "step-percent": 28,
 "fw-valid": true
}
Failed
{
 "status": 0,
 "state": "failed",
 "cur-ver": "1.1.72",
 "error-status": 16,
 "fw-valid": true
}
Name Description
status 0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values.
state Shows the current update state, including idle, updating, completed, failed.
cur-ver Shows the current firmware version.
update-to-ver Shows the target firmware version to update to.
num-steps Shows the total number of steps for update, only available in the updating state.
step-id Shows the current step number, only available in the updating state.
step-name Shows the current step name, only available in the updating state.
step-percent Shows the current update process, only available in the updating state.
error-status Shows the error code, only available in the failed state.
fw-valid Shows whether the firmware is damaged. Options are
true indicates the device is normal.
false indicates the device is damaged.

results matching ""

    No results matching ""

    results matching ""

      No results matching ""