设备接入 IOTDA-平台下发升级通知:示例一

时间:2024-06-28 09:24:57

示例一

软固件保存在IoT平台,升级时设备会收到如下信息:
Topic: $oc/devices/{device_id}/sys/events/down  
数据格式: 
{
    "object_device_id": "{object_device_id}",
    "services": [
        {
            "service_id": "$ota",
            "event_type": "firmware_upgrade",
            "event_time": "20151212T121212Z",
            "paras": {
                "version": "v1.2",
                "url": "https://100.93.28.202:8943/iodm/dev/v2.0/upgradefile/applications/******/devices/******/packages/******",
                "file_size": 81362928,
                "file_name": "upgrade.bin",
                "access_token": "595124473f866b033dfa1f",
                "expires": 86400,
                "sign": "595124473f866b033dfa1f7e831c8c99a12f6143f392dfa996a819010842c99d",
                "custom_info": "This upgrade package adds some new features.",
                "task_id": "65d31bf2581ed33a42a58d76",
                "sub_device_count": 2,
                "task_ext_info": {
                    "device_type": "DDC"
                }
            }
        }
    ]
}
support.huaweicloud.com/api-iothub/iot_06_v5_3030.html