From f1c93b776124172ef9e798119de6c175df6442fd Mon Sep 17 00:00:00 2001 From: Wendal Chen Date: Thu, 7 Nov 2024 15:48:17 +0800 Subject: [PATCH] =?UTF-8?q?add:=20libfota=E9=9C=80=E8=A6=81=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E8=80=81=E7=9A=84hmeta=E5=BA=93,=20=E6=B2=A1=E6=9C=89?= =?UTF-8?q?hwver=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/libs/libfota.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/libs/libfota.lua b/script/libs/libfota.lua index cee6618c..82f15ee3 100644 --- a/script/libs/libfota.lua +++ b/script/libs/libfota.lua @@ -78,7 +78,7 @@ local function fota_task(cbFnc,storge_location, len, param1,ota_url,ota_port,lib else imei = mcu.unique_id():toHex() end - model = hmeta and ("&model=" .. hmeta.model() .. "_" .. hmeta.hwver()) or "" + model = hmeta and ("&model=" .. hmeta.model() .. "_" .. (hmeta.hwver and hmeta.hwver() or "A00")) or "" ota_url = "http://iot.openluat.com/api/site/firmware_upgrade?project_key=" .. _G.PRODUCT_KEY .. "&imei=".. imei .. "&device_key=&firmware_name=" .. _G.PROJECT.. "_LuatOS-SoC_" .. rtos.bsp() .. "&version=" .. rtos.version():sub(2) .. "." .. version .. model else log.error("fota", "_G.VERSION must be xxx.yyy.zzz!!!")