您好!
我尝试使用本地 OTA 示例。
当我发送 Tar 文件时、我看不到任何刷新的百分比值、因为下载应该会进行。
当我查看开发人员选项时,似乎用于此的 javascript 是函数:
函数 getOtaProgress (){
if (otaProgressInvoke=1)
{
otaProgresInvoke=0;
h =新的 XMLHttpRequest();
H.onreadystatechange =函数(h){
return function(){
if ((h.readyState == 4)&&((h.status == 200)||(h.status ==204)){
clearTimeout (xmlHttpTimeout);
var data = h.response;
if (data =""){
}
otaProgresInvoke=1;
if (data ="fail"){
clearTimeout (xmlHttpTimeout);
clearTimeout (otaReportExec);
console.log ("失败");
$(".wrong").show (500);
}否则{
xmlHttpTimeout=setTimeout (ajaxTimeout,30000);
$("#Progress最近").text (数据);
$("#ProgressBar").val (data);
if (data ='100'){
clearTimeout (xmlHttpTimeout);
clearTimeout (otaReportExec);
console.log ("100%");
wait15andcheck();
//检查文件是否已成功上传
//$("#ProgressEnd ").show (500);
}
}
}
}
}(h);
h. open("get"、"https://"+deviceIpAddr+":5432"、true");
h.send();
}
}
由于安全原因、此查询似乎被阻止。 是否与正在使用自签名证书的 https 相关?
是否有其他方法可以获取更新状态?
此致、
特奥多尔