Set OTA Authorization
Flutter Example:
/// OTA authorization event number
otaAuth(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.app_ota_auth),
/// OTA Authorization
libManager.send(evt: CmdEvtType.otaAuth, json: jsonEncode(json));
JSON Field Sent by App:
Field Name | Field Type | Field Description |
---|---|---|
device_id | int | Device ID |
version | int | Version 0 indicates no version check, used for constraints that cannot be downgraded, default 0 |
Example:
{
"device_id":0,
"version":0
}
JSON Field Received by App:
Field Name | Field Type | Field Description |
---|---|---|
err_code | int | Error code 0: Check passed 1: ID check failed 2: Version check failed 3: Low battery 4: Other errors |
Example:
{
"err_code":0
}