Skip to content

OTA Upgrade API

API Overview

FunctionDescription
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 execution
    • False: 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.

      ValueDescription
      0Reject the upgrade.
      1Accept the upgrade.
  • Output Parameter

  • None

  • Return Value

    • True: Successful execution
    • False: Failed execution

Example

python
def App_otaPlanCb(plans):
    print('otaPlan:', plans)
    Qth.otaAction(1)