Guidance for OTA service upgrade task push use

1 Application scenarios

When using OTA value-added services, if the device is added into the upgrade package designated by OneNET platform (i.e. a new upgrade task for the device), the terminal device of the user is needed to check actively if there is an upgrade task at OneNET platform. In the case, the user’s device is required to initiate a timed task and check if there is an upgrade task at OneNET platform periodically. The working mode is extremely unfavourable for devices that are sensitive to power consumption.

2 Use process

OneNET platform provides push function of OTA upgrade task. When the user creates a new upgrade task for the terminal device on OneNET platform, the device information involved is pushed to the application platform of user side, and the application platform of the user issues the command to corresponding device, and then the device checks the upgrade task on OneNET platform and performs OTA upgrade. When OneNET upgrade task push function is used, the device will not need to check periodically the upgrade tasks on OneNET platform, which saves energy consumption.

Please refer to specific flow chart in the following.


Upgrade task push use process

Step 1: Complete application platform configuration of user side.

The application service of user side is used to receive the task information and verification information pushed by OneNET OTA. OneNET provides simpleDEMO

Please browse the website: https://github.com/cm-heclouds/ota-receive in case it fails to go to the page.

Step 2: url and token pushing is configured at OneNET OTA official website.

Token is used for verification. The verification process includes: when submitting the configuration by the user, the platform will take the value of md5 for token+uid and send it to the url configured by the user via HTTP GET request. If PASSED is returned, the configuration is successful; if FAILED is returned, meaning the configuration fails.

Step 3: Initiate push function in the OneNET OTA console and associate with the upgrade package.

After URL and token push is configured, the upgrade packages requiring pushing are associated with the URL. The user can select to push or not to push the upgrade information (by initiating and cancelling association and other operations).

Step 4: When adding devices to corresponding upgrade packages

If the user initiates push function and associates the upgrade package, OneNET-OTA will push the information of the upgraded device to the url configured by the user adopting HTTP POST method.

3 Service verification interface

HTTP方法: GET

URL: http://<API_ADDRESS>/ota/receive

HTTP parameters: signature=dfadfdafda

Successfully returned: PASSED | FAILED

Description: Signature is the value of md5 configured by the user for token+uid in OneNET-OTA.

4 Interface for receiving task information

HTTP方法: POST

URL: http://<API_ADDRESS>/ota/receive

HTTP request content:

    {
    "info":{
        "uid":1,
        "date":1573611869000
    },
    "signature":"3783bdc4ccdf08f1189d21871edd9df5",
    "msg":{
        "dids":[123,345],
        "startTime":1573611869000,
        "version":"11"
    }
}

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “