Appearance
OTA Upgrade API
API Overview
Function | Description |
---|---|
Qth.otaRequest() | Requests OTA upgrade plans. |
Qth.otaAction() | Confirms OTA upgrade plans. |
API Description
Qth.otaRequest
This function requests OTA upgrade plans for the device from Developer Center.
Prototype
python
Qth.otaRequest()
Parameter
Input Parameter
- None
Output Parameter
- None
Return Value
True
: Successful executionFalse
: Failed execution
Example
python
Qth.otaRequest()
Qth.otaAction
This function confirms OTA upgrade plans, including accepting or rejecting the OTA plan, when Developer Center issues an OTA upgrade plan.
Prototype
python
Qth.otaAction(otaAction)
Parameter
Input Parameter
otaAction
: Operation on the OTA upgrade plan.Value Description 0 Reject the upgrade. 1 Accept the upgrade.
Output Parameter
None
Return Value
True
: Successful executionFalse
: Failed execution
Example
python
def App_otaPlanCb(plans):
print('otaPlan:', plans)
Qth.otaAction(1)