{"id":63687,"date":"2026-01-22T08:05:21","date_gmt":"2026-01-22T00:05:21","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/63687.html"},"modified":"2026-01-22T08:05:21","modified_gmt":"2026-01-22T00:05:21","slug":"%e8%bf%9c%e7%a8%8b%e5%9b%ba%e4%bb%b6%e5%8d%87%e7%ba%a7%e6%9c%8d%e5%8a%a1%e8%87%aa%e6%9c%89%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%8c%e4%bd%bf%e7%94%a8libfota2%e6%89%a9%e5%b1%95%e5%ba%93","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/63687.html","title":{"rendered":"\u8fdc\u7a0b\u56fa\u4ef6\u5347\u7ea7\u670d\u52a1(\u81ea\u6709\u670d\u52a1\u5668\uff0c\u4f7f\u7528libfota2\u6269\u5c55\u5e93)"},"content":{"rendered":"<h3 id=\"fota\" style=\"background-color:transparent\">\u4e00\u3001FOTA \u6982\u8ff0<\/h3>\n<p>FOTA \u5373\u8fdc\u7a0b\u5347\u7ea7\u529f\u80fd&#xff0c;\u6b64\u529f\u80fd\u53ef\u4ee5\u8ba9\u5ba2\u6237\u5728\u4e0d\u65b9\u4fbf\u5927\u91cf\u7ebf\u5237\u5347\u7ea7(\u8bbe\u5907\u4e0d\u5728\u8eab\u8fb9\/\u91cf\u4ea7 PCB \u6ca1\u5f15\u51fa USB\/\u9700\u8981\u5927\u6279\u91cf\u8fdb\u884c\u529f\u80fd\u5347\u7ea7)\u7684\u60c5\u51b5\u4e0b&#xff0c;\u5feb\u901f\u8fdb\u884c\u5e95\u5c42\u56fa\u4ef6\/\u811a\u672c\/\u811a\u672c &#043; \u5e95\u5c42\u56fa\u4ef6\u7684\u8fdc\u7a0b\u66f4\u65b0\u3002<\/p>\n<p>LuatOS \u5f00\u53d1\u6a21\u5f0f\u4e0b&#xff0c;\u56fa\u4ef6\u5206\u4e3a\u4e24\u90e8\u5206&#xff1a;core \u548c script<\/p>\n<p>\u8fdc\u7a0b\u5347\u7ea7\u65f6&#xff1a;\u5347\u7ea7 script \u548c core&#043;script &#xff0c;\u4ec5 script \u811a\u672c\u5347\u7ea7\u65f6\u4e3a\u5168\u91cf\u5347\u7ea7&#xff0c;core&#043;script \u90fd\u5347\u7ea7\u65f6\u4e3a\u5dee\u5206\u5347\u7ea7<\/p>\n<p>\u8fdc\u7a0b\u5347\u7ea7\u65f6&#xff1a;\u53ef\u4ee5\u4ec5\u5347\u7ea7 script&#xff1b;\u4e5f\u53ef\u4ee5\u540c\u65f6\u5347\u7ea7 core&#043;script<\/p>\n<p>\u652f\u6301\u5408\u5b99 iot \u5e73\u53f0\u5347\u7ea7\u548c\u81ea\u5efa\u7b2c\u4e09\u65b9\u670d\u52a1\u5668(HTTP)\u5347\u7ea7<\/p>\n<h3 id=\"_1\">\u4e8c\u3001\u6f14\u793a\u529f\u80fd\u6982\u8ff0<\/h3>\n<p>\u672c\u6587\u5c06\u8be6\u7ec6\u8bb2\u8ff0\u5982\u4f55\u4f7f\u7528\u5408\u5b99 iot \u670d\u52a1\u5668\u8fdb\u884c\u8fdc\u7a0b\u5347\u7ea7\u3002\u53e6\u5916\u6b64\u6559\u7a0b\u6f14\u793a\u4e86\u4e09\u79cd\u5347\u7ea7\u76f8\u5173\u573a\u666f&#xff1a;<\/p>\n<p>(1) fota \u5347\u7ea7\u7b80\u5355\u6f14\u793a&#xff1a;\u4f7f\u7528\u5408\u5b99 iot \u670d\u52a1\u5668\u8fdb\u884c\u8fdc\u7a0b\u5347\u7ea7\u529f\u80fd\u6a21\u5757&#xff0c;\u7b80\u5355\u5347\u7ea7\u6f14\u793a&#xff1b;<\/p>\n<p>(2) tcp \u670d\u52a1\u5668\u4e0b\u53d1\u5347\u7ea7\u6307\u4ee4&#xff1a;\u901a\u8fc7 tcp \u670d\u52a1\u5668\u4e0b\u53d1\u5347\u7ea7\u6307\u4ee4&#xff08;\u6307\u4ee4\u683c\u5f0f\u4f7f\u7528 json \u5b57\u7b26\u4e32&#xff0c;\u5305\u542b\u662f\u5426\u5347\u7ea7\u53c2\u6570&#xff09;&#xff0c;\u63a7\u5236\u8bbe\u5907\u4f7f\u7528 fota \u529f\u80fd\u6a21\u5757&#xff1b;<\/p>\n<p>(3) psm \u4f4e\u529f\u8017 fota&#xff1a;\u4f4e\u529f\u8017 fota \u529f\u80fd\u6a21\u5757&#xff0c;\u6b64\u573a\u666f\u662f\u9488\u5bf9 psm \u72b6\u6001\u4e0b\u5347\u7ea7\u6ca1\u5b8c\u6210\u5c31\u8fdb\u5165\u4f11\u7720\u5bfc\u81f4\u5347\u7ea7\u5931\u8d25\u7684\u60c5\u51b5\u5199\u7684\u4e00\u4e2a\u793a\u4f8b\u3002<\/p>\n<h3 id=\"_2\">\u4e09\u3001\u6f14\u793a\u786c\u4ef6\u73af\u5883<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"831\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000510-697169b6e40cd.png\" width=\"1391\" \/><\/p>\n<p>1\u3001Air780EPM V1.3 \u7248\u672c\u5f00\u53d1\u677f\u4e00\u5757 &#043; \u53ef\u4e0a\u7f51\u7684 sim \u5361\u4e00\u5f20 &#043;4g \u5929\u7ebf\u4e00\u6839 &#043; \u7f51\u7ebf\u4e00\u6839&#xff1a;<\/p>\n<ul>\n<li>sim \u5361\u63d2\u5165\u5f00\u53d1\u677f\u7684 sim \u5361\u69fd<\/li>\n<li>\u5929\u7ebf\u88c5\u5230\u5f00\u53d1\u677f\u4e0a<\/li>\n<li>\u7f51\u7ebf\u4e00\u7aef\u63d2\u5165\u5f00\u53d1\u677f\u7f51\u53e3&#xff0c;\u53e6\u5916\u4e00\u7aef\u8fde\u63a5\u53ef\u4ee5\u4e0a\u5916\u7f51\u7684\u8def\u7531\u5668\u7f51\u53e3<\/li>\n<\/ul>\n<p>2\u3001TYPE-C USB \u6570\u636e\u7ebf\u4e00\u6839 &#xff0c;Air780EPM V1.3 \u7248\u672c\u5f00\u53d1\u677f\u548c\u6570\u636e\u7ebf\u7684\u786c\u4ef6\u63a5\u7ebf\u65b9\u5f0f\u4e3a&#xff1a;<\/p>\n<ul>\n<li>Air780EPM V1.3 \u7248\u672c\u5f00\u53d1\u677f\u901a\u8fc7 TYPE-C USB \u53e3\u4f9b\u7535&#xff1b;&#xff08;\u5916\u90e8\u4f9b\u7535\/USB \u4f9b\u7535 \u62e8\u52a8\u5f00\u5173 \u62e8\u5230 USB \u4f9b\u7535\u4e00\u7aef&#xff09;<\/li>\n<li>TYPE-C USB \u6570\u636e\u7ebf\u76f4\u63a5\u63d2\u5230\u6838\u5fc3\u677f\u7684 TYPE-C USB \u5ea7\u5b50&#xff0c;\u53e6\u5916\u4e00\u7aef\u8fde\u63a5\u7535\u8111 USB \u53e3&#xff1b;<\/li>\n<\/ul>\n<h3 id=\"_3\">\u56db\u3001\u8f6f\u4ef6\u73af\u5883<\/h3>\n<p>\u5728\u5f00\u59cb\u5b9e\u8df5\u672c\u793a\u4f8b\u4e4b\u524d&#xff0c;\u5148\u7b79\u5907\u4e00\u4e0b\u8f6f\u4ef6\u73af\u5883&#xff1a;<\/p>\n<li>\u70e7\u5f55\u5de5\u5177&#xff1a;\u00a0Luatools \u5de5\u5177&#xff1b;<\/li>\n<li>\u5185\u6838\u56fa\u4ef6&#xff1a;Air780EPM V2012 \u7248\u672c\u56fa\u4ef6&#xff08;\u7406\u8bba\u4e0a&#xff0c;2025 \u5e74 8 \u6708 10 \u65e5\u4e4b\u540e\u53d1\u5e03\u7684\u56fa\u4ef6\u90fd\u53ef\u4ee5&#xff09;<\/li>\n<p>3.LuatOS \u9700\u8981\u7684\u811a\u672c\u548c\u8d44\u6e90\u6587\u4ef6<\/p>\n<p>\u811a\u672c\u548c\u8d44\u6e90\u6587\u4ef6&#xff1a;https:\/\/gitee.com\/openLuat\/LuatOS\/tree\/master\/module\/Air780EPM\/demo\/fota\/fota2(%E4%BD%BF%E7%94%A8libfota2%E6%89%A9%E5%B1%95%E5%BA%93)\/iot_server<\/p>\n<p>\u51c6\u5907\u597d\u8f6f\u4ef6\u73af\u5883\u4e4b\u540e&#xff0c;\u63a5\u4e0b\u6765\u67e5\u770b\u5982\u4f55\u70e7\u5f55\u9879\u76ee\u6587\u4ef6\u5230 Air780EPM \u5f00\u53d1\u677f&#xff0c;\u5c06\u672c\u7bc7\u6587\u7ae0\u4e2d\u6f14\u793a\u4f7f\u7528\u7684\u9879\u76ee\u6587\u4ef6\u70e7\u5f55\u5230 Air780EPM \u5f00\u53d1\u677f\u4e2d\u3002<\/p>\n<p>4.\u4e3a\u4e86\u65b9\u4fbf\u6d4b\u8bd5&#xff0c;\u5408\u5b99\u63d0\u4f9b\u4e86\u514d\u8d39\u7684\u4e0d\u53ef\u5546\u7528\u7684 TCP\/UDP web \u6d4b\u8bd5\u5de5\u5177&#xff1a;\u5408\u5b99 TCP\/UDP web \u5de5\u5177 (luatos.com)<\/p>\n<h3 id=\"api\">\u4e94\u3001API \u63a5\u53e3\u8bf4\u660e<\/h3>\n<p>libfota2 &#8211; fota \u5347\u7ea7 v2<\/p>\n<h3 id=\"fota_1\" style=\"background-color:transparent\">\u516d\u3001\u81ea\u6709\u670d\u52a1\u5668 FOTA<\/h3>\n<p>FOTA \u6709\u591a\u79cd\u65b9\u5f0f&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u5408\u5b99\u7684 iot \u5e73\u53f0\u8fdb\u884c\u5347\u7ea7&#xff0c;\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7528\u6237\u81ea\u5efa\u5e73\u53f0\u5347\u7ea7&#xff0c;\u53ef\u4ee5\u53ea\u5347\u7ea7 core&#xff0c;\u53ef\u4ee5\u53ea\u5347\u7ea7\u7528\u6237\u811a\u672c&#xff0c;\u4e5f\u53ef\u4ee5 core&#043; \u811a\u672c\u4e00\u8d77\u5347\u7ea7&#xff0c;\u63a5\u4e0b\u6765\u5148\u4ecb\u7ecd\u5408\u5b99\u81ea\u6709\u670d\u52a1\u5668\u5347\u7ea7&#xff0c;\u7b2c\u4e09\u65b9\u5347\u7ea7\u5728\u4e0b\u4e00\u7bc7\u6587\u7ae0\u4e2d\u4ecb\u7ecd\u3002<\/p>\n<h4 id=\"61\">6.1 \u7f51\u5361\u5207\u6362<\/h4>\n<p>fota \u529f\u80fd\u9700\u8981\u8054\u7f51\u53bb\u4e0b\u8f7d\u5347\u7ea7\u5305&#xff0c;\u6240\u4ee5\u9700\u8981\u9009\u62e9\u4e00\u79cd\u8054\u7f51\u65b9\u5f0f&#xff1a;<\/p>\n<p>netdrv_device&#xff1a;\u914d\u7f6e\u8fde\u63a5\u5916\u7f51\u4f7f\u7528\u7684\u7f51\u5361&#xff0c;\u76ee\u524d\u652f\u6301\u4ee5\u4e0b\u56db\u79cd\u9009\u62e9&#xff08;\u4e09\u9009\u4e00&#xff09;<\/p>\n<p>(1) netdrv_4g&#xff1a;4G \u7f51\u5361<\/p>\n<p>(2) netdrv_eth_spi&#xff1a;\u901a\u8fc7 SPI \u5916\u6302 CH390H \u82af\u7247\u7684\u4ee5\u592a\u7f51\u5361<\/p>\n<p>(3) netdrv_multiple&#xff1a;\u652f\u6301\u4ee5\u4e0a\u4e09\u79cd\u7f51\u5361&#xff0c;\u53ef\u4ee5\u914d\u7f6e\u4e09\u79cd\u7f51\u5361\u7684\u4f18\u5148\u7ea7<\/p>\n<p>\u5728 netdrv_device.lua \u6587\u4ef6\u4e2d\u9009\u62e9\u4e00\u79cd\u4f7f\u7528\u5373\u53ef\u3002<\/p>\n<h4 id=\"62\">6.2 \u4e91\u5e73\u53f0\u914d\u7f6e<\/h4>\n<p>\u4f7f\u7528\u5408iot\u670d\u52a1\u5668\u7684\u8bdd&#xff0c;\u9700\u8981\u5148\u767b\u5f55\u5408\u5b99 IOT \u5e73\u53f0&#xff0c;\u5982\u4e0b\u56fe\u6240\u793a&#xff0c;\u6ca1\u6709\u8d26\u53f7\u7684&#xff0c;\u53ef\u4ee5\u5148\u6ce8\u518c\u4e00\u4e2a \u5ba2\u6237\u5411\u5408\u5b99\u91c7\u8d2d 4G \u6a21\u5757\u65f6&#xff0c;\u5982\u679c\u91c7\u8d2d\u4eba\u5458\u6ca1\u6709\u544a\u77e5\u5408\u5b99\u8fd9\u6279\u6a21\u5757\u653e\u5728 iot.openluat.com \u4e0a\u7684\u54ea\u4e2a\u4ea7\u54c1\u4e0b&#xff0c;\u5219\u5408\u5b99\u4f1a\u4ee5\u91c7\u8d2d\u4eba\u7684\u624b\u673a\u53f7\u4e3a\u8d26\u53f7&#xff0c;\u9ed8\u8ba4\u5bc6\u7801 888888&#xff0c;\u521b\u5efa\u4e00\u4e2a\u201c\u5408\u5b99\u6807\u51c6\u6a21\u5757\u201d\u7684\u9879\u76ee&#xff0c;\u6b64\u6b21\u91c7\u8d2d\u7684\u6240\u6709\u6a21\u5757\u90fd\u4f1a\u653e\u5728\u8fd9\u4e2a\u9879\u76ee\u4e0b&#xff0c;\u5982\u679c\u4f60\u7684\u8d26\u53f7\u4e0b\u6ca1\u6709\u5bf9\u5e94 imei&#xff0c;\u53ef\u4ee5\u8054\u7cfb\u5408\u5b99\u9500\u552e\u5e2e\u5fd9\u6dfb\u52a0\u6a21\u5757\u8fdb\u5bf9\u5e94\u9879\u76ee\u4e0b(\u6700\u597d\u8fd8\u662f\u4ece\u54ea\u91cc\u4e70\u7684\u6a21\u5757&#xff0c;\u5c31\u8ba9\u4ed6\u7ed9\u4f60\u8f6c\u79fb\u5230\u4f60\u81ea\u5df1\u540d\u4e0b)<\/p>\n<p>\u5982\u679c\u4e0d\u5728\u81ea\u5df1\u8d26\u53f7\u4e0b&#xff0c;\u4e5f\u53ef\u4ee5\u901a\u8fc7\u70e7\u5f55\u4e13\u5c5e\u56fa\u4ef6\u7684\u65b9\u6cd5&#xff0c;\u628a\u6a21\u5757\u5f52\u5c5e\u5230\u60a8\u6307\u5b9a\u7684\u9879\u76ee\u4e0b&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u70b9\u51fb\u5e2e\u52a9\u4e2d\u5fc3&#xff0c;\u67e5\u770b\u8be6\u7ec6\u8bf4\u660e\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"681\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000511-697169b7b6982.png\" width=\"1639\" \/><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"965\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000512-697169b85f97e.png\" width=\"1109\" \/><\/p>\n<p>\u767b\u5f55\u4ee5\u540e\u70b9\u51fb\u7ea2\u6846\u6240\u793a\u4f4d\u7f6e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"557\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000512-697169b8d2834.png\" width=\"1631\" \/><\/p>\n<p>\u7136\u540e\u4f9d\u6b21\u70b9\u51fb\u5982\u4e0b\u56fe\u6240\u793a\u7ea2\u6846\u6240\u793a\u7684\u5730\u65b9&#xff0c;\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"773\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000513-697169b973bf8.png\" width=\"1589\" \/><\/p>\n<p>\u5728\u6240\u6709\u9879\u76ee\u7684\u6700\u540e&#xff0c;\u627e\u5230\u81ea\u5df1\u521a\u521a\u65b0\u5efa\u7684\u9879\u76ee&#xff0c;\u5e76\u4e14\u70b9\u51fb\u7ea2\u6846\u5185\u7684&#034;\u67e5\u770b\/\u70b9\u51fb\u590d\u5236&#034;\u590d\u5236\u540e\u9762\u5347\u7ea7\u6240\u9700\u8981\u7684\u6821\u9a8c\u7801&#xff0c;\u590d\u5236\u5230\u81ea\u5df1\u526a\u5207\u677f\u4e2d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"753\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000514-697169ba3141c.png\" width=\"1571\" \/><\/p>\n<p>\u81f3\u6b64&#xff0c;\u4e91\u5e73\u53f0\u4e0a\u7684\u9884\u5907\u52a8\u4f5c\u5c31\u505a\u5b8c\u4e86<\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f&#xff0c;iot\u5e73\u53f0\u4e0a\u4f20\u56fa\u4ef6\u4ee5\u540e&#xff0c;\u53ef\u4ee5\u5728\u5bf9\u5e94\u7684\u56fa\u4ef6\u4e2d\u914d\u7f6e\u5347\u7ea7\u6307\u5b9a\u8bbe\u5907\u6216\u8005\u5168\u90e8\u5347\u7ea7&#xff0c;\u5177\u4f53\u64cd\u4f5c\u5982\u4e0b&#xff1a;<\/p>\n<p>\u521b\u5efa\u56fa\u4ef6\u7684\u65f6\u5019\u52fe\u9009&#034;\u5347\u7ea7\u5168\u90e8\u8bbe\u5907&#034;&#xff0c;\u5219\u8fd9\u4e2a\u9879\u76ee\u4e0b\u7684\u6240\u6709\u8bbe\u5907\u90fd\u4f1a\u5347\u7ea7\u6b64\u56fa\u4ef6\u3002<\/p>\n<p>\u5982\u679c\u4e0d\u60f3\u5347\u7ea7\u5168\u90e8\u8bbe\u5907&#xff0c;\u53ef\u4ee5\u521b\u5efa\u56fa\u4ef6\u4ee5\u540e&#xff0c;\u9009\u62e9\u201c\u6307\u5b9a\u8bbe\u5907\u201d&#xff0c;\u7136\u540e\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u4e2d\u914d\u7f6e\u9700\u8981\u5347\u7ea7\u7684\u8bbe\u5907imei&#xff0c;\u70b9\u51fb\u786e\u5b9a\u5373\u53ef\u3002<\/p>\n<p>\u5982\u679c\u6ca1\u6709\u9009\u62e9\u5347\u7ea7\u5168\u90e8\u8bbe\u5907\u5e76\u4e14\u6ca1\u6709\u914d\u7f6e\u6307\u5b9a\u8bbe\u5907&#xff0c;\u90a3\u4e48\u8fd9\u4e2a\u9879\u76ee\u4e0b\u7684\u6240\u6709\u8bbe\u5907\u90fd\u4e0d\u4f1a\u5347\u7ea7\u6b64\u56fa\u4ef6\u3002<\/p>\n<p>\u5177\u4f53\u64cd\u4f5c\u53ef\u67e5\u770b\u4e0b\u9762\u8be6\u7ec6\u64cd\u4f5c\u6b65\u9aa4\u3002<\/p>\n<h4 id=\"63\">6.3 \u5347\u7ea7\u5305\u5236\u4f5c\u5e76\u4e0a\u4f20<\/h4>\n<h5 id=\"631\">6.3.1 \u5355\u811a\u672c\u5347\u7ea7<\/h5>\n<h6 id=\"6311\">6.3.1.1 \u65e7\u7248\u672c\u8f6f\u4ef6\u672c\u5730\u70e7\u5f55<\/h6>\n<p>\u5982\u679c\u7528\u6237\u53ea\u662f\u65b0\u589e\u4e00\u4e9b\u81ea\u5df1\u7684\u811a\u672c\u903b\u8f91&#xff0c;\u6ca1\u6709\u66f4\u65b0\u5e95\u5c42&#xff0c;\u53ef\u4ee5\u9009\u62e9\u4ec5\u811a\u672c\u5347\u7ea7<\/p>\n<p>1.\u9996\u5148\u5c06\u4ee3\u7801\u4e2d\u7684 PRODUCT_KEY \u6539\u4e3a\u4e0a\u9762\u590d\u5236\u7684\u9879\u76ee key,\u7136\u540e\u6253\u5f00 luatools \u7684\u9879\u76ee\u7ba1\u7406\u754c\u9762&#xff0c;\u70b9\u51fb\u751f\u6210\u91cf\u4ea7\u6587\u4ef6&#xff0c;Air780EPM \u7684\u7eaf\u811a\u672c\u5347\u7ea7\u6587\u4ef6\u653e\u5728 luatools \u6839\u76ee\u5f55\u4e0b\u7684&#034;SOC \u91cf\u4ea7\u53ca\u8fdc\u7a0b\u5347\u7ea7\u6587\u4ef6\\\\Air780EPM&#034;\u76ee\u5f55\u4e0b&#xff0c;\u4e5f\u53ef\u4ee5\u81ea\u5df1\u9009\u62e9\u6587\u4ef6\u5939&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"483\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000514-697169bac9add.png\" width=\"1549\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1177\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000515-697169bb5b830.png\" width=\"1625\" \/><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"655\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000516-697169bc6b26f.png\" width=\"1615\" \/><\/p>\n<p>2.\u5c06\u5bf9\u5e94\u751f\u6210\u7684 2010 \u7248\u672c&#xff0c;001.000.000 \u7684 SOC \u7684\u56fa\u4ef6\u70e7\u5f55\u5230\u6a21\u7ec4\u4e2d\u3002<\/p>\n<h6 id=\"6312\">6.3.1.2 \u65b0\u7248\u672c\u8f6f\u4ef6\u7ea7\u5305\u5236\u4f5c\u5e76\u4e0a\u4f20<\/h6>\n<p>1.\u56e0\u4e3a\u6a21\u5757\u70e7\u5f55\u7684\u662f 001.000.000 \u7248\u672c&#xff0c;\u6240\u4ee5\u6211\u4eec\u9700\u8981\u7ed9\u811a\u672c\u91cc\u7684\u7248\u672c\u53f7\u6539\u4e00\u4e0b&#xff0c;\u6539\u4e3a 001.000.001 \u7248\u672c \u7248\u672c\u53f7\u5347\u7ea7\u89c4\u5219\u5982\u4e0b&#xff1a;<\/p>\n<p>\u811a\u672c\u7248\u672c\u53f7\u5206\u4e3a A.B.C \u4e09\u6bb5&#xff1b;<\/p>\n<p>\u56e0\u4e3a\u5386\u53f2\u539f\u56e0&#xff0c;\u4e2d\u95f4\u8fd9\u4e00\u6bb5 B \u6ca1\u6709\u4efb\u4f55\u610f\u4e49&#xff0c;\u4f46\u662f\u5fc5\u987b\u5b58\u5728&#xff1b;<\/p>\n<p>\u5047\u8bbe\u65e7\u7684\u811a\u672c\u7248\u672c\u53f7\u4e3a A1.B1.C1&#xff0c;\u65b0\u7684\u811a\u672c\u7248\u672c\u53f7\u4e3a A2.B2.C2&#xff1b;<\/p>\n<p>\u5f53\u65b0\u65e7\u811a\u672c\u7248\u672c\u53f7\u6ee1\u8db3\u4ee5\u4e0b\u4efb\u4f55\u4e00\u79cd\u6761\u4ef6\u65f6&#xff0c;\u7248\u672c\u53f7\u5141\u8bb8\u5347\u7ea7&#xff1a;<\/p>\n<p>&#xff08;1&#xff09;A2 \u7b49\u4e8e A1&#xff0c;\u540c\u65f6 C2 \u5927\u4e8e C1&#xff1b;<\/p>\n<p>&#xff08;2&#xff09;A2 \u5927\u4e8e A1&#xff0c;\u540c\u65f6 C2 \u5927\u4e8e\u6216\u8005\u7b49\u4e8e C1&#xff1b;<\/p>\n<p>&#xff08;3&#xff09;B1 B2 \u65e0\u610f\u4e49<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"365\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000517-697169bd0e47d.png\" width=\"1423\" \/><\/p>\n<p>2.\u518d\u5c06\u811a\u672c\u4e2d\u589e\u52a0\u51e0\u884c\u6253\u5370(\u4e3a\u4e86\u6a21\u62df\u7528\u6237\u4fee\u6539\u811a\u672c\u7684\u52a8\u4f5c)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"635\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000517-697169bd7af8e.png\" width=\"1605\" \/><\/p>\n<p>3.\u7136\u540e\u91cd\u65b0\u751f\u6210\u4e00\u6b21\u91cf\u4ea7\u56fa\u4ef6&#xff0c;\u6ce8\u610f&#xff1a;\u5982\u679c\u662f\u4ec5\u811a\u672c\u5347\u7ea7\u7684\u8bdd&#xff0c;\u751f\u6210\u91cf\u4ea7\u56fa\u4ef6\u7684\u65f6\u5019\u8981\u548c\u539f\u6765\u4fdd\u6301\u4e0d\u53d8\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"677\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000518-697169be056f4.png\" width=\"1587\" \/><\/p>\n<p>4.\u6253\u5f00\u521a\u521a\u7684\u5408\u5b99 iot \u5e73\u53f0\u70b9\u51fb\u6211\u7684\u9879\u76ee&#8211;\u56fa\u4ef6\u5217\u8868&#8211;\u521b\u5efa\u56fa\u4ef6<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"517\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000518-697169be94369.png\" width=\"1515\" \/><\/p>\n<p>5.\u70b9\u51fb\u9009\u62e9\u6587\u4ef6&#xff0c;\u628a\u521a\u521a\u7684 bin \u540e\u7f00\u6587\u4ef6\u4e0a\u4f20\u5230 iot \u5e73\u53f0\u3002\u6587\u4ef6\u540d\u3001\u56fa\u4ef6\u540d\u3001\u7248\u672c\u53f7\u90fd\u662f\u81ea\u52a8\u8bc6\u522b\u7684&#xff0c;\u7528\u6237\u65e0\u9700\u4fee\u6539\u3002\u70b9\u51fb\u63d0\u4ea4&#xff0c;\u7b49\u5f85\u4e0a\u4f20\u6210\u529f\u7684\u52a8\u753b\u63d0\u793a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"817\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000518-697169bed6d91.png\" width=\"1647\" \/><\/p>\n<p>6.\u6a21\u5757\u521a\u5f00\u673a&#xff0c;luatools \u4f1a\u6253\u5370\u6a21\u5757\u7684 imei \u53f7&#xff0c;\u5f53\u7136\u4e5f\u53ef\u4ee5\u4f7f\u7528\u624b\u673a\u626b\u63cf\u6a21\u5757\u4e0a\u7684\u4e8c\u7ef4\u7801\u83b7\u5f97\u6a21\u5757 imei \u53f7&#xff0c;\u6216\u8005\u5c06\u6a21\u5757\u5c4f\u853d\u76d6\u4e0a\u4e8c\u7ef4\u7801\u7684\u4e0b\u65b9\u7b2c\u4e00\u6392\u6a21\u5757\u7684 imei \u53f7&#xff0c;\u8bb0\u5f55\u4e0b\u6765\u3002\u5728\u521a\u521a\u521b\u5efa\u56fa\u4ef6\u7684\u5730\u65b9&#xff0c;\u4e0b\u62c9&#xff0c;\u627e\u5230\u521a\u521a\u521b\u5efa\u7684\u5347\u7ea7\u4efb\u52a1&#xff0c;\u7136\u540e\u6309\u4e0b\u56fe\u6240\u793a&#xff0c;\u6dfb\u52a0\u6a21\u5757\u7684 imei<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"641\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000519-697169bf6bb6e.png\" width=\"1647\" \/><\/p>\n<p>7.\u5c06\u5bf9\u5e94\u751f\u6210\u7684 2010 \u7248\u672c&#xff0c;001.000.000 \u7684 SOC \u7684\u91cf\u4ea7\u56fa\u4ef6\u70e7\u5f55\u5230\u6a21\u7ec4\u4e2d\u3002<\/p>\n<h5 id=\"632-core\">6.3.2 \u542b core \u5347\u7ea7<\/h5>\n<p>\u6ce8\u610f&#xff1a;\u5bf9\u4e8e\u4e0d\u540c\u540e\u7f00\u7684\u56fa\u4ef6&#xff0c;\u4e0d\u80fd\u76f4\u63a5\u5347\u7ea7&#xff0c;\u5206\u533a\u6709\u5dee\u5f02&#xff0c;\u5f3a\u884c\u5347\u7ea7\u53ef\u80fd\u65e0\u6cd5\u542f\u52a8\u3002\u00a0\u6bd4\u5982&#xff1a;LuatOS-SoC_V2012_Air780EPM_1.soc \u53ea\u80fd\u5347\u7ea7LuatOS-SoC_V2014_Air780EPM_1.soc \u540e\u7f00\u7684\u56fa\u4ef6&#xff0c;\u4e0d\u80fd\u5347\u7ea7 LuatOS-SoC_V2014_Air780EPM_2.soc \u540e\u7f00\u7684\u56fa\u4ef6\u3002<\/p>\n<h6 id=\"6321\">6.3.2.1 \u65e7\u7248\u672c\u8f6f\u4ef6\u672c\u5730\u70e7\u5f55<\/h6>\n<p>\u6bcf\u4e00\u6b21 core \u7684\u5347\u7ea7\u90fd\u4f1a\u5e26\u6765\u4e00\u4e9b\u7f51\u7edc\u4e0a\u7684\u4f18\u5316(\u4f8b\u5982\u4fe1\u53f7\u5dee\u65f6\u7684\u7f51\u7edc\u7a33\u5b9a\u6027)\u4ee5\u53ca\u4e00\u4e9b bug \u4fee\u590d&#xff0c;\u6240\u4ee5\u5728\u53d1\u5e03\u65b0\u7248\u672c\u4ee5\u540e&#xff0c;\u7528\u6237\u53ef\u4ee5\u5148\u6d4b\u8bd5\u4e0b core \u5bf9\u81ea\u5df1\u811a\u672c\u6709\u65e0\u660e\u663e\u5f71\u54cd\u6216\u6027\u80fd\u63d0\u5347&#xff0c;\u7136\u540e\u8fdb\u884c\u8fdc\u7a0b FOTA<\/p>\n<p>1.\u8fd9\u91cc\u9009\u62e9\u5347\u7ea7\u5230 2012 \u7684 core \u7248\u672c\u8fdb\u884c\u6f14\u793a&#xff0c;001.000.000 \u811a\u672c\u9009\u62e9\u642d\u914d\u7684 core \u4e3a V2010 \u7248\u672c&#xff0c;\u518d\u6b21\u70b9\u51fb&#034;\u751f\u6210\u91cf\u4ea7\u6587\u4ef6&#034;&#xff0c;\u7a0d\u7b49\u5373\u53ef\u5728 luatools \u6839\u76ee\u5f55\u4e0b\u7684&#034;SOC \u91cf\u4ea7\u53ca\u8fdc\u7a0b\u5347\u7ea7\u6587\u4ef6\\\\Air780EPM&#034;\u76ee\u5f55\u4e0b&#xff0c;\u627e\u5230 core \u7248\u672c\u53f7\u4e3a V2010 \u4e14\u811a\u672c\u7248\u672c\u53f7\u4e3a 001.000.000 \u7684 soc \u540e\u7f00\u6587\u4ef6<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"135\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000519-697169bfd3657.png\" width=\"1205\" \/><\/p>\n<p>2.\u5c06\u5bf9\u5e94\u751f\u6210\u7684 2010 \u7248\u672c&#xff0c;001.000.000 \u7684 SOC \u7684\u56fa\u4ef6\u70e7\u5f55\u5230\u6a21\u7ec4\u4e2d\u3002<\/p>\n<h6 id=\"6322\">6.3.2.2 \u65b0\u7248\u672c\u8f6f\u4ef6\u7ea7\u5305\u5236\u4f5c\u5e76\u4e0a\u4f20<\/h6>\n<p>1.\u751f\u6210\u4e86\u8fd9\u4e2a\u7248\u672c\u4ee5\u540e&#xff0c;\u518d\u53bb\u811a\u672c\u4e2d\u6539\u52a8\u811a\u672c\u7248\u672c\u53f7\u4e3a 001.000.002(\u53ea\u8981\u524d\u540e\u4e24\u4f4d\u6709\u4e00\u4f4d\u5927\u4e8e 1 \u5373\u53ef(\u5f53\u7136\u7b2c\u4e00\u4f4d\u5927\u4e8e 1 \u7684\u65f6\u5019&#xff0c;\u6574\u4e2a\u7248\u672c\u53f7\u81ea\u7136\u5927\u4e8e 001.000.001)&#xff0c;\u5982 002.000.200,001.000.002,030.000.311 \u7b49)<\/p>\n<p>\u7248\u672c\u53f7\u5347\u7ea7\u89c4\u5219\u5982\u4e0b&#xff1a;<\/p>\n<p>\u811a\u672c\u7248\u672c\u53f7\u5206\u4e3a A.B.C \u4e09\u6bb5&#xff1b;<\/p>\n<p>\u56e0\u4e3a\u5386\u53f2\u539f\u56e0&#xff0c;\u4e2d\u95f4\u8fd9\u4e00\u6bb5 B \u6ca1\u6709\u4efb\u4f55\u610f\u4e49&#xff0c;\u4f46\u662f\u5fc5\u987b\u5b58\u5728&#xff1b;<\/p>\n<p>\u5047\u8bbe\u65e7\u7684\u811a\u672c\u7248\u672c\u53f7\u4e3a A1.B1.C1&#xff0c;\u65b0\u7684\u811a\u672c\u7248\u672c\u53f7\u4e3a A2.B2.C2&#xff1b;<\/p>\n<p>\u5f53\u65b0\u65e7\u811a\u672c\u7248\u672c\u53f7\u6ee1\u8db3\u4ee5\u4e0b\u4efb\u4f55\u4e00\u79cd\u6761\u4ef6\u65f6&#xff0c;\u7248\u672c\u53f7\u5141\u8bb8\u5347\u7ea7&#xff1a;<\/p>\n<p>&#xff08;1&#xff09;A2 \u7b49\u4e8e A1&#xff0c;\u540c\u65f6 C2 \u5927\u4e8e C1&#xff1b;<\/p>\n<p>&#xff08;2&#xff09;A2 \u5927\u4e8e A1&#xff0c;\u540c\u65f6 C2 \u5927\u4e8e\u6216\u8005\u7b49\u4e8e C1&#xff1b;<\/p>\n<p>&#xff08;3&#xff09;B1 B2 \u65e0\u610f\u4e49<\/p>\n<p>2.\u7136\u540e\u5728 luatools \u91cc\u91cd\u65b0\u9009\u62e9 core \u4e3a V2012 \u7248\u672c&#xff0c;\u540c\u6837\u70b9\u51fb\u751f\u6210\u56fa\u4ef6&#xff0c;\u7a0d\u7b49\u5373\u53ef\u5728 luatools \u6839\u76ee\u5f55\u4e0b\u7684&#034;SOC \u91cf\u4ea7\u53ca\u8fdc\u7a0b\u5347\u7ea7\u6587\u4ef6\\\\Air780EPM&#034;\u76ee\u5f55\u4e0b&#xff0c;\u627e\u5230 core \u7248\u672c\u53f7\u4e3a V2012 \u4e14\u811a\u672c\u7248\u672c\u53f7\u4e3a 001.000.002 \u7684 soc \u540e\u7f00\u6587\u4ef6<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"151\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000519-697169bfed356.png\" width=\"1245\" \/><\/p>\n<p>3.\u63a5\u4e0b\u6765\u5c31\u662f\u9488\u5bf9\u8fd9\u4e24\u4e2a\u91cf\u4ea7\u6587\u4ef6&#xff0c;\u5236\u4f5c\u4e00\u4e2a\u5dee\u5206\u6587\u4ef6&#xff0c;\u7528\u6765\u8fdc\u7a0b\u5347\u7ea7(\u6ce8&#xff1a;\u8fdc\u7a0b\u5347\u7ea7\u4e2d core \u4e3a\u5dee\u5206&#xff0c;\u811a\u672c\u4e3a\u5168\u91cf\u5347\u7ea7)<\/p>\n<p>\u70b9\u51fb\u5230 luatools \u7684\u4e3b\u754c\u9762&#xff0c;\u4f9d\u6b21\u70b9\u51fb\u56fe\u4e2d\u84dd\u6846\u6240\u793a\u610f\u7684\u5730\u65b9(\u6ce8&#xff1a;\u5fc5\u987b\u4f7f\u7528 luatools_3.0.9 \u53ca\u5176\u4ee5\u4e0a\u7248\u672c&#xff0c;\u8981\u4e0d\u5dee\u5206\u5305\u5347\u7ea7\u7684\u65f6\u5019\u53ef\u80fd\u4f1a\u51fa\u95ee\u9898)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"317\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000520-697169c015831.png\" width=\"1151\" \/><\/p>\n<p>4.\u6309\u4e0b\u56fe\u6240\u793a\u9009\u62e9\u4f4e\u7248\u672c\u4ee5\u53ca\u9ad8\u7248\u672c\u7684\u56fa\u4ef6&#xff0c;\u7136\u540e\u70b9\u51fb\u5f00\u59cb\u6267\u884c\u5373\u53ef&#xff0c;\u5982\u679c\u4e0d\u60f3\u8f93\u51fa\u7684\u5dee\u5206\u5305\u5728 luatools \u6839\u76ee\u5f55\u4e0b&#xff0c;\u53ef\u4ee5\u81ea\u884c\u9009\u62e9\u4e00\u4e2a\u8f93\u51fa\u8def\u5f84<\/p>\n<p>\u56e0\u4e3a\u5305\u542b\u4e86 core \u4e2d\u7684\u6539\u52a8&#xff0c;\u6240\u4ee5\u65f6\u95f4\u4f1a\u7a0d\u957f\u4e00\u4e9b&#xff0c;luatools \u53ef\u80fd\u4f1a\u51fa\u73b0&#034;\u5047\u6b7b&#034;\u60c5\u51b5&#xff0c;\u4e0d\u8981\u5173\u95ed\u5b83&#xff0c;\u7a0d\u7b49\u4e00\u4f1a\u5373\u53ef\u770b\u5230<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"663\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000520-697169c044b35.png\" width=\"1099\" \/><\/p>\n<p>5.\u540c\u6837&#xff0c;\u5728\u4f60\u9009\u62e9\u7684\u76ee\u5f55\u4e0b\u770b\u5230\u5982\u4e0b\u6240\u793a&#xff0c;\u5e26\u7740\u811a\u672c\u7684 PROJECT core \u7248\u672c\u53f7 \u811a\u672c\u7248\u672c\u53f7\u7684 bin \u540e\u7f00\u7684\u5dee\u5206\u6587\u4ef6\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"89\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000520-697169c09592e.png\" width=\"1335\" \/><\/p>\n<p>6.\u81f3\u4e8e iot \u5e73\u53f0\u7684\u914d\u7f6e\u8fd8\u662f\u548c\u4e0a\u6587\u4e00\u6837\u7684\u6b65\u9aa4&#xff0c;\u5148\u5728\u9879\u76ee\u5e95\u4e0b\u521b\u5efa\u56fa\u4ef6-&gt; \u4e0a\u4f20\u5dee\u5206\u5305-&gt; \u914d\u7f6e\u8981\u5347\u7ea7\u8bbe\u5907\u7684 imei<\/p>\n<p>7.\u5c06\u5bf9\u5e94\u751f\u6210\u7684 2010 \u7248\u672c&#xff0c;001.000.000 \u7684 SOC \u7684\u91cf\u4ea7\u56fa\u4ef6\u70e7\u5f55\u5230\u6a21\u7ec4\u4e2d\u3002<\/p>\n<h4 id=\"64\">6.4 \u793a\u4f8b\u7ed3\u679c\u5c55\u793a<\/h4>\n<p>\u672c demo \u5c06\u4f1a\u6f14\u793a\u4e09\u79cd\u573a\u666f\u4e0b\u7684 fota \u5347\u7ea7&#xff0c;\u573a\u666f\u5728 main.lua \u4e2d\u5207\u6362\u3002<\/p>\n<h5><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"405\" src=\"2026-01-22d3vadkhjvb1.png\" width=\"1609\" \/><\/h5>\n<h5 id=\"641-fota\">6.4.1 \u573a\u666f\u4e00&#xff1a;fota \u5347\u7ea7\u7b80\u5355\u6f14\u793a<\/h5>\n<p>\u5173\u952e\u4ee3\u7801&#xff1a;<\/p>\n<p>&#8212; \u5347\u7ea7\u7ed3\u679c\u7684\u56de\u8c03\u51fd\u6570<br \/>\n&#8212; \u529f\u80fd:\u83b7\u53d6fota\u7684\u56de\u8c03\u51fd\u6570<br \/>\n&#8212; \u53c2\u6570:<br \/>\n&#8212; result:number\u7c7b\u578b<br \/>\n&#8212;   0\u8868\u793a\u6210\u529f<br \/>\n&#8212;   1\u8868\u793a\u8fde\u63a5\u5931\u8d25<br \/>\n&#8212;   2\u8868\u793aurl\u9519\u8bef<br \/>\n&#8212;   3\u8868\u793a\u670d\u52a1\u5668\u65ad\u5f00<br \/>\n&#8212;   4\u8868\u793a\u63a5\u6536\u62a5\u6587\u9519\u8bef<br \/>\n&#8212;   5\u8868\u793a\u4f7f\u7528iot\u5e73\u53f0VERSION\u9700\u8981\u4f7f\u7528 xxx.yyy.zzz\u5f62\u5f0f<br \/>\nlocal function fota_cb(ret)<br \/>\n    log.info(&#034;fota&#034;, ret)<br \/>\n    if ret &#061;&#061; 0 then<br \/>\n        log.info(&#034;\u5347\u7ea7\u5305\u4e0b\u8f7d\u6210\u529f,\u91cd\u542f\u6a21\u5757&#034;)<br \/>\n        rtos.reboot()<br \/>\n    elseif ret &#061;&#061; 1 then<br \/>\n        log.info(&#034;\u8fde\u63a5\u5931\u8d25&#034;, &#034;\u8bf7\u68c0\u67e5url\u62fc\u5199\u6216\u670d\u52a1\u5668\u914d\u7f6e(\u662f\u5426\u4e3a\u5185\u7f51)&#034;)<br \/>\n    elseif ret &#061;&#061; 2 then<br \/>\n        log.info(&#034;url\u9519\u8bef&#034;, &#034;\u68c0\u67e5url\u62fc\u5199&#034;)<br \/>\n    elseif ret &#061;&#061; 3 then<br \/>\n        log.info(&#034;\u670d\u52a1\u5668\u65ad\u5f00&#034;, &#034;\u68c0\u67e5\u670d\u52a1\u5668\u767d\u540d\u5355\u914d\u7f6e&#034;)<br \/>\n    elseif ret &#061;&#061; 4 then<br \/>\n        log.error(&#034;FOTA \u5931\u8d25&#034;,<br \/>\n            &#034;\u539f\u56e0\u53ef\u80fd\u6709&#xff1a;\\\\n&#034; ..<br \/>\n            &#034;1) \u670d\u52a1\u5668\u8fd4\u56de 200\/206 \u4f46\u62a5\u6587\u4f53\u4e3a\u7a7a(0 \u5b57\u8282&#xff09;\u2014\u2014 \u901a\u5e38\u662f\u5347\u7ea7\u5305\u6587\u4ef6\u7f3a\u5931\u6216 URL \u6307\u5411\u7a7a\u6587\u4ef6&#xff1b;\\\\n&#034; ..<br \/>\n            &#034;2) \u670d\u52a1\u5668\u8fd4\u56de 4xx\/5xx \u7b49\u5f02\u5e38\u72b6\u6001\u7801 \u2014\u2014 \u8bf7\u786e\u8ba4\u5347\u7ea7\u5305\u5df2\u4e0a\u4f20\u3001URL \u6b63\u786e\u3001\u9274\u6743\u4fe1\u606f\u6709\u6548&#xff1b;\\\\n&#034;..<br \/>\n            &#034;3) \u5df2\u7ecf\u662f\u6700\u65b0\u7248\u672c&#xff0c;\u65e0\u9700\u5347\u7ea7&#034; )<br \/>\n    elseif ret &#061;&#061; 5 then<br \/>\n        log.info(&#034;\u7248\u672c\u53f7\u4e66\u5199\u9519\u8bef&#034;, &#034;iot\u5e73\u53f0\u7248\u672c\u53f7\u9700\u8981\u4f7f\u7528xxx.yyy.zzz\u5f62\u5f0f&#034;)<br \/>\n    else<br \/>\n        log.info(&#034;\u4e0d\u662f\u4e0a\u9762\u51e0\u79cd\u60c5\u51b5 ret\u4e3a&#034;, ret)<br \/>\n    end<br \/>\nend<\/p>\n<p>&#8212; \u4f7f\u7528\u5408\u5b99iot\u5e73\u53f0\u8fdb\u884c\u5347\u7ea7, \u652f\u6301\u81ea\u5b9a\u4e49\u53c2\u6570, \u4e5f\u53ef\u4ee5\u4e0d\u914d\u7f6e&#xff0c;\u5982\u679c\u8981\u914d\u7f6e\u53c2\u6570\u53ef\u4ee5\u53c2\u8003\u6b64\u94fe\u63a5https:\/\/docs.openluat.com\/osapi\/ext\/libfota2\/<br \/>\nlocal ota_opts &#061; {}<\/p>\n<p>function fota_task_func()<br \/>\n    &#8212; \u5982\u679c\u5f53\u524d\u65f6\u95f4\u70b9\u8bbe\u7f6e\u7684\u9ed8\u8ba4\u7f51\u5361\u8fd8\u6ca1\u6709\u8fde\u63a5\u6210\u529f&#xff0c;\u4e00\u76f4\u5728\u8fd9\u91cc\u5faa\u73af\u7b49\u5f85<br \/>\n    while not socket.adapter(socket.dft()) do<br \/>\n        log.warn(&#034;fota_task_func&#034;, &#034;wait IP_READY&#034;, socket.dft())<br \/>\n        &#8212; \u5728\u6b64\u5904\u963b\u585e\u7b49\u5f85\u9ed8\u8ba4\u7f51\u5361\u8fde\u63a5\u6210\u529f\u7684\u6d88\u606f&#034;IP_READY&#034;<br \/>\n        &#8212; \u6216\u8005\u7b49\u5f851\u79d2\u8d85\u65f6\u9000\u51fa\u963b\u585e\u7b49\u5f85\u72b6\u6001;<br \/>\n        &#8212; \u6ce8\u610f&#xff1a;\u6b64\u5904\u76841000\u6beb\u79d2\u8d85\u65f6\u4e0d\u8981\u4fee\u6539\u7684\u66f4\u957f&#xff1b;<br \/>\n        &#8212; \u56e0\u4e3a\u5f53\u4f7f\u7528libnetif.set_priority_order\u914d\u7f6e\u591a\u4e2a\u7f51\u5361\u8fde\u63a5\u5916\u7f51\u7684\u4f18\u5148\u7ea7\u65f6&#xff0c;\u4f1a\u9690\u5f0f\u7684\u4fee\u6539\u9ed8\u8ba4\u4f7f\u7528\u7684\u7f51\u5361<br \/>\n        &#8212; \u5f53libnetif.set_priority_order\u7684\u8c03\u7528\u65f6\u5e8f\u548c\u6b64\u5904\u7684socket.adapter(socket.dft())\u5224\u65ad\u65f6\u5e8f\u6709\u53ef\u80fd\u4e0d\u5339\u914d<br \/>\n        &#8212; \u6b64\u5904\u76841\u79d2&#xff0c;\u80fd\u591f\u4fdd\u8bc1&#xff0c;\u5373\u4f7f\u65f6\u5e8f\u4e0d\u5339\u914d&#xff0c;\u4e5f\u80fd1\u79d2\u949f\u9000\u51fa\u963b\u585e\u72b6\u6001&#xff0c;\u518d\u53bb\u5224\u65adsocket.adapter(socket.dft())<br \/>\n        sys.waitUntil(&#034;IP_READY&#034;, 1000)<br \/>\n    end<\/p>\n<p>    &#8212; \u68c0\u6d4b\u5230\u4e86IP_READY\u6d88\u606f<br \/>\n    log.info(&#034;fota_task_func&#034;, &#034;recv IP_READY&#034;, socket.dft())<\/p>\n<p>    &#8212; \u8fd9\u4e2a\u5224\u65ad\u662f\u63d0\u9192\u8981\u8bbe\u7f6ePRODUCT_KEY\u7684,\u5b9e\u9645\u751f\u4ea7\u8bf7\u5220\u9664<br \/>\n    if &#034;123&#034; &#061;&#061; _G.PRODUCT_KEY  then<br \/>\n        while 1 do<br \/>\n            sys.wait(1000)<br \/>\n            log.info(&#034;fota&#034;, &#034;\u8bf7\u4fee\u6539\u6b63\u786e\u7684PRODUCT_KEY&#034;)<br \/>\n        end<br \/>\n    end<\/p>\n<p>    log.info(&#034;\u5f00\u59cb\u68c0\u67e5\u5347\u7ea7&#034;)<br \/>\n    libfota2.request(fota_cb, ota_opts)<br \/>\nend<\/p>\n<p>&#8211;\u521b\u5efa\u5e76\u4e14\u542f\u52a8\u4e00\u4e2atask<br \/>\n&#8211;\u8fd0\u884c\u8fd9\u4e2atask\u7684\u4e3b\u51fd\u6570fota_task_func<br \/>\nsys.taskInit(fota_task_func)<\/p>\n<p>\u5347\u7ea7\u524d&#xff1a;\u56e0\u4e3a iot \u5e73\u53f0\u6ca1\u6709\u5347\u7ea7\u56fa\u4ef6&#xff0c;\u6240\u4ee5\u8bf7\u6c42\u5347\u7ea7\u7684\u7ed3\u679c\u4e3a&#034;\u5df2\u662f\u6700\u65b0\u7248\u672c&#034;&#xff0c;\u6bcf\u9694 3S \u4f1a\u6253\u5370\u5f53\u524d\u7248\u672c\u4fe1\u606f&#xff0c;\u7136\u540e\u4f1a\u6709\u5982\u4e0b\u65e5\u5fd7&#xff1a;<\/p>\n<p>I\/user.\u5df2\u662f\u6700\u65b0\u7248\u672c 1.\u8bbe\u5907\u7684\u56fa\u4ef6\/\u811a\u672c\u7248\u672c\u9ad8\u4e8e\u6216\u7b49\u4e8e\u4e91\u5e73\u53f0\u4e0a\u7684\u7248\u672c\u53f7 2.\u7528\u6237\u9879\u76ee\u5347\u7ea7\u914d\u7f6e\u4e2d\u672a\u6dfb\u52a0\u8be5\u8bbe\u5907 3.\u4e91\u5e73\u53f0\u5347\u7ea7\u914d\u7f6e\u4e2d&#xff0c;\u662f\u5426\u5347\u7ea7\u914d\u7f6e\u4e3a\u5426<br \/>\nI\/user.fota 4<br \/>\nE\/user.FOTA \u5931\u8d25 \u539f\u56e0\u53ef\u80fd\u6709&#xff1a;<br \/>\n1) \u670d\u52a1\u5668\u8fd4\u56de 200\/206 \u4f46\u62a5\u6587\u4f53\u4e3a\u7a7a(0 \u5b57\u8282&#xff09;\u2014\u2014 \u901a\u5e38\u662f\u5347\u7ea7\u5305\u6587\u4ef6\u7f3a\u5931\u6216 URL \u6307\u5411\u7a7a\u6587\u4ef6&#xff1b;<br \/>\n2) \u670d\u52a1\u5668\u8fd4\u56de 4xx\/5xx \u7b49\u5f02\u5e38\u72b6\u6001\u7801 \u2014\u2014 \u8bf7\u786e\u8ba4\u5347\u7ea7\u5305\u5df2\u4e0a\u4f20\u3001URL \u6b63\u786e\u3001\u9274\u6743\u4fe1\u606f\u6709\u6548&#xff1b;<br \/>\n3) \u5df2\u7ecf\u662f\u6700\u65b0\u7248\u672c&#xff0c;\u65e0\u9700\u5347\u7ea7<\/p>\n<p>\u5347\u7ea7\u4e2d&#xff1a;\u6a21\u5757\u8bf7\u6c42\u5347\u7ea7&#xff0c;\u4e0b\u8f7d\u5b8c\u5347\u7ea7\u5305\u4ee5\u540e\u4f1a\u8fdb\u884c MD5 \u9a8c\u8bc1\u5347\u7ea7\u5305\u6709\u65e0\u95ee\u9898&#xff0c;\u5982\u679c\u6ca1\u95ee\u9898&#xff0c;\u5c31\u4f1a\u542f\u52a8\u91cd\u542f\u7a0b\u5e8f&#xff0c;\u7136\u540e\u8fdb\u884c\u5347\u7ea7\u5de5\u4f5c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"645\" src=\"2026-01-22jszcqm4yq52.png\" width=\"1645\" \/><\/p>\n<p>\u5347\u7ea7\u540e&#xff1a;\u5347\u7ea7\u6210\u529f\u540e\u53ef\u4ee5\u770b\u5230\u5f53\u524d\u811a\u672c\u7248\u672c\u53f7&#xff0c;\u5df2\u7ecf\u7531\u539f\u6765\u7684 001.000.000 \u53d8\u4e3a\u4e86 001.000.001\u3002\u5e95\u5c42 core \u7248\u672c\u53f7\u4ece 2010 \u53d8\u4e3a\u4e86 2012<\/p>\n<p>\u6ce8\u610f&#xff1a;\u5347\u7ea7\u5b8c\u6210\u4ee5\u540e&#xff0c;\u56e0\u4e3a\u811a\u672c\u4e2d\u5f00\u673a\u6709\u8054\u7f51\u5c31\u53bb\u8bf7\u6c42\u4e00\u6b21\u5347\u7ea7\u7684\u4ee3\u7801&#xff0c;\u6240\u4ee5&#xff0c;\u4f1a\u518d\u53bb\u8bf7\u6c42\u4e00\u6b21\u5347\u7ea7&#xff0c;\u56e0\u4e3a\u6ca1\u6709\u66f4\u9ad8\u7684\u7248\u672c\u4e86&#xff0c;\u6240\u4ee5\u4f1a\u4e0a\u62a5&#034;\u5df2\u662f\u6700\u65b0\u7248\u672c&#034;<\/p>\n<h5><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"647\" src=\"2026-01-22eettr1nhq0n.png\" width=\"1391\" \/><\/h5>\n<h5 id=\"642-tcp\">6.4.2 \u573a\u666f\u4e8c&#xff1a;tcp \u670d\u52a1\u5668\u4e0b\u53d1\u5347\u7ea7\u6307\u4ee4<\/h5>\n<p>\u901a\u8fc7 tcp \u670d\u52a1\u5668\u4e0b\u53d1\u5347\u7ea7\u6307\u4ee4&#xff08;\u6307\u4ee4\u683c\u5f0f\u4f7f\u7528 json \u5b57\u7b26\u4e32&#xff0c;\u5305\u542b\u662f\u5426\u5347\u7ea7\u53c2\u6570&#xff09;&#xff0c;\u63a7\u5236\u8bbe\u5907\u4f7f\u7528 fota \u529f\u80fd\u6a21\u5757\u3002\u6b64\u573a\u666f\u4e0b&#xff0c;\u8bbe\u5907\u4f1a\u5148\u8fde\u63a5\u5230 TCP \u670d\u52a1\u5668&#xff0c;\u7b49\u5f85\u670d\u52a1\u5668\u4e0b\u53d1\u5347\u7ea7\u6307\u4ee4\u3002\u5728 air_srv_fota.lua \u4e2d\u4f1a\u6709\u4e00\u4e2a\u53c2\u6570\u63a7\u5236&#xff0c;\u9632\u6b62\u5347\u7ea7\u8fc7\u7a0b\u4e2d\u91cd\u590d\u4e0b\u8f7d\u5347\u7ea7\u5305\u3002<\/p>\n<p>\u6d4b\u8bd5\u670d\u52a1\u5668&#xff0c;\u6253\u5f00\u4e00\u4e2a tcp \u670d\u52a1\u5668&#xff0c;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"789\" src=\"2026-01-224usmyit4jeb.png\" width=\"1645\" \/><\/p>\n<p>\u5728 tcp_iot_main.lua \u4e2d\u914d\u7f6e tcp \u670d\u52a1\u5668\u4fe1\u606f&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"763\" src=\"2026-01-22rfaqn1vcrrz.png\" width=\"1311\" \/><\/p>\n<p>\u5347\u7ea7\u524d&#xff1a;\u8bbe\u5907\u8fde\u63a5\u5230 TCP \u670d\u52a1\u5668&#xff0c;\u7b49\u5f85\u6307\u4ee4\u4e0b\u53d1&#xff1a;{&#034;fota&#034;: &#034;true&#034;}<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"339\" src=\"2026-01-22kzxd5022zqe.png\" width=\"1649\" \/><\/p>\n<p>\u5347\u7ea7\u4e2d&#xff1a;\u6a21\u7ec4\u6536\u5230\u670d\u52a1\u5668\u4e0b\u53d1\u7684\u5347\u7ea7\u6307\u4ee4\u540e&#xff0c;\u8bbe\u5907\u5f00\u59cb\u4e0b\u8f7d\u5347\u7ea7\u5305\u5e76\u8fdb\u884c\u9a8c\u8bc1<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"631\" src=\"2026-01-22fy5xvqp1s1u.png\" width=\"1633\" \/><\/p>\n<p>\u5347\u7ea7\u540e&#xff1a;\u5347\u7ea7\u5305\u4e0b\u8f7d\u5b8c\u6210\u540e\u8bbe\u5907\u91cd\u542f\u5347\u7ea7&#xff0c;\u5e76\u5faa\u73af\u6253\u5370\u65b0\u7684\u7248\u672c\u53f7\u4fe1\u606f<\/p>\n<h5><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"823\" src=\"2026-01-2221os2iddadg.png\" width=\"1645\" \/><\/h5>\n<h5 id=\"643-psm-fota\">6.4.3 \u573a\u666f\u4e09&#xff1a;psm \u4f4e\u529f\u8017 fota<\/h5>\n<p>\u6b64\u573a\u666f\u662f\u9632\u6b62 psm \u72b6\u6001\u4e0b\u5347\u7ea7\u6ca1\u5b8c\u6210\u5c31\u8fdb\u5165\u4f11\u7720\u5bfc\u81f4\u5347\u7ea7\u5931\u8d25\u7684\u60c5\u51b5\u5199\u7684\u4e00\u4e2a\u4f8b\u5b50\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\u8981\u7b49\u5f85\u5347\u7ea7\u6210\u529f\u540e\u518d\u53bb\u8fdb\u5165\u4f11\u7720\u3002<\/p>\n<p>\u4e3b\u8981\u4ee3\u7801&#xff1a;<\/p>\n<p>&#8212; \u5347\u7ea7\u7ed3\u679c\u7684\u56de\u8c03\u51fd\u6570<br \/>\n&#8212; \u529f\u80fd:\u83b7\u53d6fota\u7684\u56de\u8c03\u51fd\u6570<br \/>\n&#8212; \u53c2\u6570:<br \/>\n&#8212; result:number\u7c7b\u578b<br \/>\n&#8212;   0\u8868\u793a\u6210\u529f<br \/>\n&#8212;   1\u8868\u793a\u8fde\u63a5\u5931\u8d25<br \/>\n&#8212;   2\u8868\u793aurl\u9519\u8bef<br \/>\n&#8212;   3\u8868\u793a\u670d\u52a1\u5668\u65ad\u5f00<br \/>\n&#8212;   4\u8868\u793a\u63a5\u6536\u62a5\u6587\u9519\u8bef<br \/>\n&#8212;   5\u8868\u793a\u4f7f\u7528iot\u5e73\u53f0VERSION\u9700\u8981\u4f7f\u7528 xxx.yyy.zzz\u5f62\u5f0f<br \/>\nlocal function fota_cb(ret)<br \/>\n    log.info(&#034;fota&#034;, ret)<br \/>\n    &#8211;\u5347\u7ea7\u7ed3\u675f&#xff0c;\u89e6\u53d1\u5347\u7ea7\u56de\u8c03&#xff0c;\u53d1\u5e03\u6d88\u606f\u5347\u7ea7\u7ed3\u675f&#xff0c;\u53ef\u4ee5\u8fdb\u5165\u4f11\u7720\u6a21\u5f0f<br \/>\n    sys.publish(&#034;FOTA_END&#034;)<br \/>\n    if ret &#061;&#061; 0 then<br \/>\n        log.info(&#034;\u5347\u7ea7\u5305\u4e0b\u8f7d\u6210\u529f,\u91cd\u542f\u6a21\u5757&#034;)<br \/>\n        rtos.reboot()<br \/>\n    elseif ret &#061;&#061; 1 then<br \/>\n        log.info(&#034;\u8fde\u63a5\u5931\u8d25&#034;, &#034;\u8bf7\u68c0\u67e5url\u62fc\u5199\u6216\u670d\u52a1\u5668\u914d\u7f6e(\u662f\u5426\u4e3a\u5185\u7f51)&#034;)<br \/>\n    elseif ret &#061;&#061; 2 then<br \/>\n        log.info(&#034;url\u9519\u8bef&#034;, &#034;\u68c0\u67e5url\u62fc\u5199&#034;)<br \/>\n    elseif ret &#061;&#061; 3 then<br \/>\n        log.info(&#034;\u670d\u52a1\u5668\u65ad\u5f00&#034;, &#034;\u68c0\u67e5\u670d\u52a1\u5668\u767d\u540d\u5355\u914d\u7f6e&#034;)<br \/>\n    elseif ret &#061;&#061; 4 then<br \/>\n        log.error(&#034;FOTA \u5931\u8d25&#034;,<br \/>\n            &#034;\u539f\u56e0\u53ef\u80fd\u6709&#xff1a;\\\\n&#034; ..<br \/>\n            &#034;1) \u670d\u52a1\u5668\u8fd4\u56de 200\/206 \u4f46\u62a5\u6587\u4f53\u4e3a\u7a7a(0 \u5b57\u8282&#xff09;\u2014\u2014 \u901a\u5e38\u662f\u5347\u7ea7\u5305\u6587\u4ef6\u7f3a\u5931\u6216 URL \u6307\u5411\u7a7a\u6587\u4ef6&#xff1b;\\\\n&#034; ..<br \/>\n            &#034;2) \u670d\u52a1\u5668\u8fd4\u56de 4xx\/5xx \u7b49\u5f02\u5e38\u72b6\u6001\u7801 \u2014\u2014 \u8bf7\u786e\u8ba4\u5347\u7ea7\u5305\u5df2\u4e0a\u4f20\u3001URL \u6b63\u786e\u3001\u9274\u6743\u4fe1\u606f\u6709\u6548&#xff1b;\\\\n&#034;..<br \/>\n            &#034;3) \u5df2\u7ecf\u662f\u6700\u65b0\u7248\u672c&#xff0c;\u65e0\u9700\u5347\u7ea7&#034; )<br \/>\n    elseif ret &#061;&#061; 5 then<br \/>\n        log.info(&#034;\u7248\u672c\u53f7\u4e66\u5199\u9519\u8bef&#034;, &#034;iot\u5e73\u53f0\u7248\u672c\u53f7\u9700\u8981\u4f7f\u7528xxx.yyy.zzz\u5f62\u5f0f&#034;)<br \/>\n    else<br \/>\n        log.info(&#034;\u4e0d\u662f\u4e0a\u9762\u51e0\u79cd\u60c5\u51b5 ret\u4e3a&#034;, ret)<br \/>\n    end<br \/>\nend<\/p>\n<p>&#8212; \u4f7f\u7528\u5408\u5b99iot\u5e73\u53f0\u8fdb\u884c\u5347\u7ea7, \u652f\u6301\u81ea\u5b9a\u4e49\u53c2\u6570, \u4e5f\u53ef\u4ee5\u4e0d\u914d\u7f6e&#xff0c;\u5982\u679c\u8981\u914d\u7f6e\u53c2\u6570\u53ef\u4ee5\u53c2\u8003\u6b64\u94fe\u63a5https:\/\/docs.openluat.com\/osapi\/ext\/libfota2\/<br \/>\nlocal ota_opts &#061; {}<\/p>\n<p>function psm_fota_task_func()<br \/>\n    &#8212; \u5982\u679c\u662f\u88ab\u5b9a\u65f6\u5668\u5524\u9192&#xff0c;\u56e0\u4e3a\u4e0a\u6b21\u8fdb\u5165PSM&#043;\u65f6\u662f\u5f00\u542f\u4e86\u98de\u884c\u6a21\u5f0f&#xff0c;\u6240\u4ee5\u5728\u5524\u9192\u540e\u7b2c\u4e00\u65f6\u95f4\u5173\u95ed\u98de\u884c\u6a21\u5f0f\u3002<br \/>\n    mobile.flymode(0, false)<br \/>\n    log.info(&#034;\u5f00\u59cb\u6d4b\u8bd5PSM&#043;\u6a21\u5f0f\u529f\u8017\u3002&#034;)<\/p>\n<p>    &#8212; \u5982\u679c\u5f53\u524d\u65f6\u95f4\u70b9\u8bbe\u7f6e\u7684\u9ed8\u8ba4\u7f51\u5361\u8fd8\u6ca1\u6709\u8fde\u63a5\u6210\u529f&#xff0c;\u4e00\u76f4\u5728\u8fd9\u91cc\u5faa\u73af\u7b49\u5f85<br \/>\n    while not socket.adapter(socket.dft()) do<br \/>\n        log.warn(&#034;fota_task_func&#034;, &#034;wait IP_READY&#034;, socket.dft())<br \/>\n        &#8212; \u5728\u6b64\u5904\u963b\u585e\u7b49\u5f85\u9ed8\u8ba4\u7f51\u5361\u8fde\u63a5\u6210\u529f\u7684\u6d88\u606f&#034;IP_READY&#034;<br \/>\n        &#8212; \u6216\u8005\u7b49\u5f851\u79d2\u8d85\u65f6\u9000\u51fa\u963b\u585e\u7b49\u5f85\u72b6\u6001;<br \/>\n        &#8212; \u6ce8\u610f&#xff1a;\u6b64\u5904\u76841000\u6beb\u79d2\u8d85\u65f6\u4e0d\u8981\u4fee\u6539\u7684\u66f4\u957f&#xff1b;<br \/>\n        &#8212; \u56e0\u4e3a\u5f53\u4f7f\u7528libnetif.set_priority_order\u914d\u7f6e\u591a\u4e2a\u7f51\u5361\u8fde\u63a5\u5916\u7f51\u7684\u4f18\u5148\u7ea7\u65f6&#xff0c;\u4f1a\u9690\u5f0f\u7684\u4fee\u6539\u9ed8\u8ba4\u4f7f\u7528\u7684\u7f51\u5361<br \/>\n        &#8212; \u5f53libnetif.set_priority_order\u7684\u8c03\u7528\u65f6\u5e8f\u548c\u6b64\u5904\u7684socket.adapter(socket.dft())\u5224\u65ad\u65f6\u5e8f\u6709\u53ef\u80fd\u4e0d\u5339\u914d<br \/>\n        &#8212; \u6b64\u5904\u76841\u79d2&#xff0c;\u80fd\u591f\u4fdd\u8bc1&#xff0c;\u5373\u4f7f\u65f6\u5e8f\u4e0d\u5339\u914d&#xff0c;\u4e5f\u80fd1\u79d2\u949f\u9000\u51fa\u963b\u585e\u72b6\u6001&#xff0c;\u518d\u53bb\u5224\u65adsocket.adapter(socket.dft())<br \/>\n        sys.waitUntil(&#034;IP_READY&#034;, 1000)<br \/>\n    end<\/p>\n<p>    &#8212; \u68c0\u6d4b\u5230\u4e86IP_READY\u6d88\u606f<br \/>\n    log.info(&#034;fota_task_func&#034;, &#034;recv IP_READY&#034;, socket.dft())<\/p>\n<p>    log.info(&#034;\u5f00\u59cb\u68c0\u67e5\u5347\u7ea7&#034;)<br \/>\n    libfota2.request(fota_cb, ota_opts)<\/p>\n<p>    &#8212; \u7b49\u5f85\u4e0b\u8f7d\u5347\u7ea7\u5305\u7ed3\u675f, \u53d1\u5e03\u6d88\u606f&#034;FOTA_END&#034;,<br \/>\n    &#8212; \u5982\u679c15\u79d2\u5185\u6ca1\u6709\u6536\u5230\u6d88\u606f&#xff0c;\u521915\u79d2\u7684\u65f6\u957f\u5230\u8fbe\u540e\u8fdb\u5165PSM&#043;\u6a21\u5f0f\u3002<br \/>\n    &#8212; \u9700\u8981\u6ce8\u610f\u7684\u662f\u5728fota_cb\u56de\u8c03\u51fd\u6570\u4e2d&#xff0c;\u5347\u7ea7\u5305\u4e0b\u8f7d\u6210\u529f\u540e&#xff0c;\u4f1a\u7acb\u9a6c\u91cd\u542f\u5e76\u5347\u7ea7\u6a21\u7ec4\u3002\u5982\u679c\u8fd8\u6709\u5176\u4ed6\u4e8b\u60c5\u8981\u505a\u4e0d\u60f3\u7acb\u9a6c\u91cd\u542f\u5347\u7ea7,\u9700\u81ea\u884c\u51b3\u5b9areboot\u7684\u65f6\u673a<br \/>\n    &#8212; \u5347\u7ea7\u5305\u4e0b\u8f7d\u6210\u529f\u540e&#xff0c;\u672cdemo\u9ed8\u8ba4\u662f\u7acb\u5373\u81ea\u52a8\u91cd\u542f\u5e76\u4e14\u5c06\u5347\u7ea7\u5305\u66f4\u65b0\u5230\u6a21\u7ec4\u4e2d&#xff0c;\u66f4\u65b0\u6210\u529f\u540e&#xff0c;\u4f1a\u518d\u6b21\u8d70\u5230\u8fd9\u91cc<br \/>\n    &#8212; \u518d\u6b21\u8d70\u5230\u8fd9\u91cc\u540e&#xff0c;\u5408\u5b99iot\u5e73\u53f0\u4f1a\u8fd4\u56de\u201c\u5df2\u7ecf\u662f\u6700\u65b0\u7248\u672c&#xff0c;\u4e0d\u9700\u8981\u5347\u7ea7\u201d&#xff0c;fota_cb\u56de\u8c03\u51fd\u6570\u4e2d\u4f1a\u53d1\u5e03\u6d88\u606f&#034;FOTA_END&#034;<br \/>\n    &#8212; \u81f3\u6b64&#xff0c;\u624d\u4f1a\u7ee7\u7eed\u5411\u4e0b\u6267\u884c\u4ee3\u7801&#xff0c;\u8fdb\u5165PSM&#043;\u6a21\u5f0f<br \/>\n    sys.waitUntil(&#034;FOTA_END&#034;, 15000)<\/p>\n<p>    log.info(&#034;\u5347\u7ea7\u7ed3\u675f,\u8fdb\u5165PSM\u6a21\u5f0f&#034;)<\/p>\n<p>    &#8212; \u5173\u95edgps\u5907\u7535\u4ee5\u53cagsensor\u4f9b\u7535\u4f7f\u80fd&#xff0c;\u9632\u6b62\u4f11\u7720\u6a21\u5f0f\u4e0b\u6f0f\u7535\u5bfc\u81f4\u529f\u8017\u589e\u52a0<br \/>\n    gpio.close(24)<\/p>\n<p>    &#8212; \u5b9a\u65f6\u68c0\u67e5\u5347\u7ea7 (\u6bcf4\u5c0f\u65f6\u5524\u9192\u4e00\u6b21)<br \/>\n    pm.dtimerStart(2, 4 * 3600000)<br \/>\n    &#8212; \u542f\u52a8\u98de\u884c\u6a21\u5f0f&#xff0c;\u89c4\u907f\u53ef\u80fd\u4f1a\u51fa\u73b0\u7684\u7f51\u7edc\u95ee\u9898<br \/>\n    mobile.flymode(0, true)<br \/>\n    &#8212; \u8fdb\u5165PSM\u6a21\u5f0f<br \/>\n    pm.power(pm.WORK_MODE, 3)<br \/>\n    &#8212; \u9632\u5fa1\u673a\u5236&#xff1a;15\u79d2\u540e\u5982\u679c\u672a\u8fdb\u5165PSM\u5219\u91cd\u542f<br \/>\n    sys.wait(15000)<br \/>\n    log.info(&#034;\u8fdb\u5165PSM&#043;\u5931\u8d25,\u91cd\u542f&#034;)<br \/>\n    rtos.reboot()<br \/>\nend<\/p>\n<p>sys.taskInit(psm_fota_task_func)<\/p>\n<p>\u5347\u7ea7\u524d&#xff1a;\u8bbe\u5907\u4f1a\u5728\u5f00\u673a\u7684\u65f6\u5019\u53bb\u8bf7\u6c42\u4e0b\u670d\u52a1\u5668\u6709\u6ca1\u6709\u5347\u7ea7\u5305&#xff0c;\u5b9a\u671f\u5524\u9192\u68c0\u67e5\u662f\u5426\u6709\u5347\u7ea7\u4efb\u52a1<\/p>\n<p>\u5982\u679c\u6709\u5347\u7ea7\u5305\u5c31\u4f1a\u53bb\u5347\u7ea7\u3002\u6ca1\u6709\u5347\u7ea7\u5305\u7684\u8bdd\u5c31\u4f1a\u663e\u793a\u5982\u4e0b\u65e5\u5fd7&#xff1a;<\/p>\n<p>I\/user.\u5df2\u662f\u6700\u65b0\u7248\u672c 1.\u8bbe\u5907\u7684\u56fa\u4ef6\/\u811a\u672c\u7248\u672c\u9ad8\u4e8e\u6216\u7b49\u4e8e\u4e91\u5e73\u53f0\u4e0a\u7684\u7248\u672c\u53f7 2.\u7528\u6237\u9879\u76ee\u5347\u7ea7\u914d\u7f6e\u4e2d\u672a\u6dfb\u52a0\u8be5\u8bbe\u5907 3.\u4e91\u5e73\u53f0\u5347\u7ea7\u914d\u7f6e\u4e2d&#xff0c;\u662f\u5426\u5347\u7ea7\u914d\u7f6e\u4e3a\u5426<br \/>\nI\/user.fota 4<br \/>\nE\/user.FOTA \u5931\u8d25 \u539f\u56e0\u53ef\u80fd\u6709&#xff1a;<br \/>\n1) \u670d\u52a1\u5668\u8fd4\u56de 200\/206 \u4f46\u62a5\u6587\u4f53\u4e3a\u7a7a(0 \u5b57\u8282&#xff09;\u2014\u2014 \u901a\u5e38\u662f\u5347\u7ea7\u5305\u6587\u4ef6\u7f3a\u5931\u6216 URL \u6307\u5411\u7a7a\u6587\u4ef6&#xff1b;<br \/>\n2) \u670d\u52a1\u5668\u8fd4\u56de 4xx\/5xx \u7b49\u5f02\u5e38\u72b6\u6001\u7801 \u2014\u2014 \u8bf7\u786e\u8ba4\u5347\u7ea7\u5305\u5df2\u4e0a\u4f20\u3001URL \u6b63\u786e\u3001\u9274\u6743\u4fe1\u606f\u6709\u6548&#xff1b;<br \/>\n3) \u5df2\u7ecf\u662f\u6700\u65b0\u7248\u672c&#xff0c;\u65e0\u9700\u5347\u7ea7<\/p>\n<p>\u5347\u7ea7\u4e2d&#xff1a;\u5982\u679c\u68c0\u6d4b\u5230\u670d\u52a1\u5668\u6709\u65b0\u7684\u7248\u672c&#xff0c;\u8bbe\u5907\u4f1a\u4fdd\u6301\u5524\u9192\u72b6\u6001\u76f4\u5230\u5347\u7ea7\u5347\u7ea7\u5305\u4e0b\u8f7d\u6210\u529f&#xff0c;\u5347\u7ea7\u5305\u4e0b\u8f7d\u6210\u529f\u540e\u4f1a\u91cd\u542f\u5e76\u5347\u7ea7&#xff0c;\u5347\u7ea7\u6d41\u7a0b\u5982\u4e0b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"635\" src=\"2026-01-22ucxqtns4iyx.png\" width=\"1615\" \/><\/p>\n<p>\u5347\u7ea7\u540e&#xff1a;\u5347\u7ea7\u5b8c\u6210\u540e\u8bbe\u5907\u663e\u793a\u65b0\u7684\u7248\u672c\u53f7&#xff0c;\u5e76\u91cd\u65b0\u53bb\u8bf7\u6c42\u5347\u7ea7\u5305&#xff0c;\u6ca1\u6709\u65b0\u7684\u5347\u7ea7\u5305\u5219\u4f1a\u8fdb\u5165 PSM \u72b6\u6001<\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"633\" src=\"2026-01-22dmsyewnzfmc.png\" width=\"1625\" \/><\/h3>\n<h3 id=\"_4\">\u4e03\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u6ce8\u610f\u4e8b\u9879<\/h3>\n<h4 id=\"71\">7.1 \u6ce8\u610f\u4e8b\u9879&#xff1a;<\/h4>\n<p>1\u3001\u00a0\u7248\u672c\u53f7\u683c\u5f0f&#xff1a;\u4f7f\u7528\u00a0IoT \u5e73\u53f0\u65f6&#xff0c;\u9879\u76ee\u7684 VERSION \u5fc5\u987b\u4e3a xxx.yyy.zzz \u7684\u4e09\u6bb5\u6570\u5b57\u683c\u5f0f&#xff08;\u5982 &#034;001.000.001&#034;&#xff09;&#xff0c;\u5426\u5219\u5e73\u53f0\u7248\u672c\u6bd4\u5bf9\u53ef\u80fd\u51fa\u9519\u3002<\/p>\n<p>2\u3001PRODUCT_KEY&#xff1a;\u4f7f\u7528\u00a0IoT \u5e73\u53f0\u65f6&#xff0c;\u5fc5\u987b\u5728 main.lua \u4e2d\u6b63\u786e\u5b9a\u4e49\u5168\u5c40\u53d8\u91cf PRODUCT_KEY&#xff0c;\u5176\u503c\u9700\u4ece IoT \u5e73\u53f0\u7684\u9879\u76ee\u4e2d\u83b7\u53d6\u3002<\/p>\n<p>3\u3001\u91cd\u542f\u65f6\u673a&#xff1a;\u4e0b\u8f7d\u5347\u7ea7\u5305\u6210\u529f&#xff08;result \u4e3a 0&#xff09;\u540e&#xff0c;\u901a\u5e38\u9700\u8981\u8c03\u7528 rtos.reboot() \u91cd\u542f\u8bbe\u5907\u4ee5\u66f4\u65b0\u3002\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\u5ef6\u8fdf\u91cd\u542f\u3002<\/p>\n<p>4\u3001\u81ea\u5efa\u670d\u52a1\u5668\u89c4\u5219&#xff1a;<\/p>\n<p>\u9700\u8981\u5347\u7ea7\u65f6&#xff0c;\u670d\u52a1\u5668\u5e94\u8fd4\u56de HTTP 200&#xff0c;\u6d88\u606f\u4f53\u4e3a\u5347\u7ea7\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n<p>\u65e0\u9700\u5347\u7ea7\u65f6&#xff0c;\u670d\u52a1\u5668\u5e94\u8fd4\u56de HTTP 300 \u6216\u4ee5\u4e0a\u7684\u72b6\u6001\u7801\u3002<\/p>\n<p>5\u3001\u56fa\u4ef6\u7c7b\u578b&#xff1a;\u4f7f\u7528\u00a0IoT \u5e73\u53f0\u8fdb\u884c\u811a\u672c\u5347\u7ea7\u65f6&#xff0c;\u4f7f\u7528 Luatools \u751f\u6210\u7684 .bin \u91cf\u4ea7\u6587\u4ef6\u3002<\/p>\n<h4 id=\"72\">7.2 \u4e3a\u4ec0\u4e48\u5347\u7ea7\u540e\u6211\u7684\u6a21\u5757\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\u4e86&#xff0c;\u50cf\u662f\u53d8\u7816\u4e00\u6837<\/h4>\n<p>\u6709\u591a\u79cd\u53ef\u80fd&#xff0c;<\/p>\n<h5 id=\"721\">7.2.1 \u68c0\u67e5\u811a\u672c<\/h5>\n<p>\u9996\u5148\u5148\u68c0\u67e5\u4e0b\u7528\u6237\u81ea\u5df1\u7684\u811a\u672c&#xff0c;\u6709\u53ef\u80fd\u662f\u5f15\u8d77\u91cd\u542f\/\u6b7b\u673a\u7684\u4ee3\u7801\u5199\u5728\u4e86\u6700\u524d\u9762&#xff0c;\u4f8b\u5982\u65b0\u52a0\u7684\u67d0\u4e2a\u503c\u6216\u8005\u51fd\u6570\u4e3a nil \u4f46\u662f\u8fd8\u662f\u53bb\u505a\u4e86\u4e9b\u52a0\u51cf\u4e58\u9664\u6216\u8005\u5224\u65ad\u5927\u5c0f\u7684\u903b\u8f91\u3002\u53ef\u4ee5\u76f4\u63a5\u672c\u5730\u70e7\u5f55\u4e0b\u65b0\u7248\u672c\u7684 core&#043; \u811a\u672c\u9a8c\u8bc1&#xff0c;\u5982\u679c\u6709 fskv \u7b49\u7528\u5230 flash \u7684\u4ee3\u7801&#xff0c;\u53ef\u80fd\u9700\u8981\u4ed4\u7ec6\u68c0\u67e5\u624d\u80fd\u6392\u9664\u95ee\u9898&#xff0c;\u6bd4\u5982\u4e0b\u8f7d\u7684\u65f6\u5019\u52fe\u9009\u5982\u4e0b\u56fe\u6240\u793a\u7684\u4e24\u4e2a\u9009\u9879\u3002<\/p>\n<h5 id=\"722-core\">7.2.2 \u68c0\u67e5 core<\/h5>\n<p>\u5982\u679c\u662f\u4ec5\u811a\u672c\u5347\u7ea7&#xff0c;\u4f46\u662f\u6ca1\u6ce8\u610f\u4f7f\u7528\u4e86\u65b0 core \u4e2d\u624d\u6709\u7684\u63a5\u53e3&#xff0c;\u5c31\u6709\u53ef\u80fd\u5f15\u8d77\u5faa\u73af\u91cd\u542f&#xff0c;\u5982\u679c\u91cd\u542f\u5728\u4ee3\u7801\u6700\u5f00\u5934&#xff0c;\u6a21\u5757\u53ef\u80fd\u6765\u4e0d\u53ca\u6253\u5370\u4efb\u4f55\u65e5\u5fd7\u5c31\u91cd\u542f\u4e86&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u672c\u5730\u70e7\u5f55\u4e0b\u65b0\u7248\u672c\u7684 core&#043; \u811a\u672c\u9a8c\u8bc1&#xff0c;\u5982\u679c\u6709 fskv \u7b49\u7528\u5230 flash \u7684\u4ee3\u7801&#xff0c;\u53ef\u80fd\u9700\u8981\u4ed4\u7ec6\u68c0\u67e5\u3002<\/p>\n<h4 id=\"73-core-6\">7.3 \u68c0\u67e5\u8fc7\u811a\u672c\u548c core&#xff0c;\u6ca1\u95ee\u9898&#xff0c;\u4e3a\u4ec0\u4e48\u4f1a\u5faa\u73af\u5347\u7ea7 6 \u6b21\u4ee5\u540e\u7981\u6b62\u5347\u7ea7<\/h4>\n<p>\u68c0\u67e5\u4e0b\u5347\u7ea7\u5305\u662f\u5426\u6b63\u5e38&#xff0c;\u6709\u65f6\u5019\u56e0\u4e3a\u4eba\u5458\u8bef\u64cd\u4f5c&#xff0c;\u7ecf\u5e38\u4f1a\u51fa\u73b0\u65e7\u811a\u672c &#043; \u65b0 core \u6216\u8005\u65b0\u811a\u672c &#043; \u65e7 core \u7684\u610f\u5916\u7ec4\u5408&#xff0c;<\/p>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>\u672c\u6765\u5e94\u8be5\u5982\u4e0b\u8868\u63cf\u8ff0\u7684\u4e00\u6837<\/p>\n<p>\u64cd\u4f5c\u4eba\u5458\u5931\u8bef\u540e\u53d8\u6210\u4e86\u5982\u4e0b<\/p>\n<p>\u7136\u540e\u8bef\u64cd\u4f5c\u65e7\u7248\u672c(1) \u548c\u8bef\u64cd\u4f5c\u65b0\u7248\u672c(1)\u8fdb\u884c\u5dee\u5206&#xff0c;\u8fd9\u6837\u867d\u7136\u811a\u672c\u7248\u672c\u53f7\u65e7\u7248\u672c\u5927\u4e8e\u4e86\u65b0\u7248\u672c&#xff0c;\u4f46\u662f core \u7684\u65e7\u7248\u672c\u5c0f\u4e8e\u65b0\u7248\u672c&#xff0c;\u6240\u4ee5\u5347\u7ea7\u5e73\u53f0\u4f9d\u65e7\u8ba4\u4e3a\u662f\u4f9d\u6b21\u6709\u6548\u7684\u5347\u7ea7&#xff0c;\u4e0b\u53d1\u4e86\u5347\u7ea7\u5305\u3002<\/p>\n<p>\u5347\u7ea7\u5b8c\u6210\u540e&#xff0c;\u6a21\u5757\u5185\u90e8\u811a\u672c\u7248\u672c\u53f7\u53d8\u6210\u4e86 001.000.000 core \u7248\u672c\u53f7\u4e3a V2008&#xff0c;\u4e0b\u6b21\u6a21\u5757\u8bf7\u6c42\u5347\u7ea7\u7684\u65f6\u5019&#xff0c;\u5f53\u524d\u56fa\u4ef6\u4e0a\u62a5\u7684\u811a\u672c\u7248\u672c\u53f7(001.000.000)\u4f9d\u65e7\u5c0f\u4e8e\u4e91\u5e73\u53f0\u5b58\u50a8\u7684\u811a\u672c\u7248\u672c\u53f7(001.000.001)&#xff0c;\u7136\u540e\u7ee7\u7eed\u4e0b\u53d1\u5347\u7ea7\u5305&#xff0c;\u5c31\u8fd9\u4e48\u5faa\u73af 6 \u6b21&#xff0c;\u7136\u540e\u89e6\u53d1\u5408\u5b99 iot \u5e73\u53f0\u7684\u7981\u6b62\u5347\u7ea7\u89c4\u5219<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"201\" src=\"2026-01-22w5jort5w0u2.png\" width=\"1477\" \/><\/p>\n<p>\u5728\u6b63\u786e\u751f\u6210\u5dee\u5206\u5305&#xff0c;\u5e76\u4e14\u4e0a\u4f20\u6210\u529f\u540e&#xff0c;\u53ef\u4ee5\u5728 iot \u5e73\u53f0\u91cc\u89e3\u9664\u7981\u6b62\u5347\u7ea7\u7684\u9650\u5236<\/p>\n<p>\u5728&#034;\u6211\u7684\u8bbe\u5907&#034;\u4e2d\u9009\u62e9\u5347\u7ea7 imei \u6240\u5728\u7684\u9879\u76ee&#xff0c;\u7136\u540e\u70b9\u51fb\u53f3\u8fb9\u7684&#034;\u89e3\u9664\u7981\u6b62\u5347\u7ea7&#034;&#xff0c;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"357\" src=\"2026-01-22zqfqhhsmltn.png\" width=\"1645\" \/><\/p>\n<p>\u786e\u5b9a\u201c\u5bfc\u81f4\u8bbe\u5907\u5faa\u73af\u5347\u7ea7\u7684\u5f02\u5e38\u201d\u5df2\u7ecf\u5904\u7406\u5b8c\u6210\u540e&#xff0c;\u70b9\u51fb\u786e\u5b9a\u89e3\u9664&#xff0c;\u5373\u53ef\u89e3\u9664\u9650\u5236\u5347\u7ea7<\/p>\n<h4><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"689\" src=\"2026-01-22saqgsd4luwv.png\" width=\"1643\" \/><\/h4>\n<h4 id=\"74-update\">7.4 \u6211\u60f3\u5728\u670d\u52a1\u5668\u53d1\u9001\u7279\u5b9a\u7684\u5b57\u7b26\u4e32\u5982&#034;update&#034;\u65f6\u518d\u89e6\u53d1\u5347\u7ea7&#xff0c;\u5e94\u8be5\u600e\u4e48\u505a<\/h4>\n<p>\u53ea\u9700\u8981\u5728\u4f60\u5e0c\u671b\u7684\u5347\u7ea7\u5347\u7ea7\u903b\u8f91\u540e\u9762\u52a0\u4e0a\u5347\u7ea7\u8bed\u53e5\u5373\u53ef&#xff0c;\u4f8b\u5982\u00a0mqtt \u7684 demo\u00a0\u91cc\u589e\u52a0\u51e0\u53e5\u8bdd<\/p>\n<p>elseif event &#061;&#061; &#034;recv&#034; then<br \/>\n    libfota2 &#061; require &#034;libfota2&#034;<br \/>\n    log.info(&#034;mqtt&#034;, &#034;downlink&#034;, &#034;topic&#034;, data, &#034;payload&#034;, payload)<br \/>\n    &#8211;\u5047\u5b9amqtt\u53d1\u8fc7\u6765\u7684\u5b57\u7b26\u4e32\u4e3a&#034;update&#034;\u5c31\u542f\u52a8\u5347\u7ea7<br \/>\n    if payload &#061;&#061;&#034;update&#034; then<br \/>\n        libfota2.request(fota_cb, ota_opts)<br \/>\n    end<br \/>\n    sys.publish(&#034;mqtt_payload&#034;, data, payload)<\/p>\n<p>\u53c8\u6216\u8005\u5e0c\u671b\u6309\u952e\u5347\u7ea7&#xff1a;<\/p>\n<p>&#8211;\u8fd9\u91cc\u5047\u5b9a\u4f7f\u7528GPIO0\u8fdb\u884c\u6309\u952e\u5347\u7ea7<br \/>\n   gpio.debounce(0, 3000, 1)<br \/>\n   gpio.setup(0, function()<br \/>\n   libfota2.request(fota_cb, ota_opts)<br \/>\n   end, gpio.PULLUP)<\/p>\n<h4 id=\"75\">7.5 \u5982\u4f55\u5904\u7406\u540c\u4e2a\u9879\u76ee\u5916\u9762\u6709\u591a\u4e2a\u7248\u672c\u8bbe\u5907\u7684\u5347\u7ea7\u60c5\u51b5<\/h4>\n<h5 id=\"751-1\">7.5.1 \u573a\u666f1&#xff1a;\u591a\u79cd\u4e0d\u540c\u5185\u6838\u56fa\u4ef6\u7248\u672c\u90fd\u8981\u5347\u7ea7\u4e3a\u6700\u65b0\u7248\u672c\u5185\u6838\u56fa\u4ef6&#043;\u6700\u65b0\u811a\u672c<\/h5>\n<p>\u9700\u8981\u5bf9\u6bcf\u4e2a\u7248\u672c\u90fd\u751f\u6210\u5bf9\u5e94\u7684\u5dee\u5206\u5305\u00a0\u64cd\u4f5c\u6b65\u9aa4&#xff1a; \u73b0\u6709A1\u3001A2\u3001A3\u4e09\u79cd\u5185\u6838\u56fa\u4ef6\u9700\u5347\u7ea7\u4e3aB&#043;\u65b0\u811a\u672c&#xff1a; &#8211; \u751f\u62103\u4e2a\u5347\u7ea7\u5305&#xff1a;A1\u2192B\u5dee\u5206\u5305&#043;\u65b0\u811a\u672c\u3001A2\u2192B\u5dee\u5206\u5305&#043;\u65b0\u811a\u672c\u3001A3\u2192B\u5dee\u5206\u5305&#043;\u65b0\u811a\u672c\u00a0&#8211; \u5728\u5408\u5b99IoT\u5e73\u53f0\u521b\u5efa3\u4e2a\u5347\u7ea7\u914d\u7f6e&#xff0c;\u5206\u522b\u5bf9\u5e94\u4e09\u7c7b\u8bbe\u5907IMEI<\/p>\n<h5 id=\"752-2\">7.5.2 \u573a\u666f2&#xff1a;\u591a\u79cd\u4e0d\u540c\u5185\u6838\u56fa\u4ef6\u7248\u672c&#043;\u4e0d\u540c\u7248\u672c\u811a\u672c\u90fd\u8981\u5347\u7ea7\u4e3a\u6700\u65b0\u7248\u672c\u811a\u672c&#xff0c;\u65e2\u53ea\u5347\u7ea7\u811a\u672c\u3002<\/h5>\n<p>\u64cd\u4f5c\u6b65\u9aa4&#xff1a; 1. \u51c6\u5907\u5b8c\u6574\u7684\u6700\u65b0\u811a\u672c&#xff08;\u65e0\u9700\u5185\u6838\u5dee\u5206\u5305&#xff09; 2. \u5728IoT\u5e73\u53f0\u521b\u5efa\u4e00\u4e2a\u5347\u7ea7\u914d\u7f6e&#xff0c;\u6307\u5b9a\u6240\u6709\u9700\u5347\u7ea7\u8bbe\u5907IMEI\u5217\u8868<\/p>\n<h5 id=\"753\">7.5.3 \u5347\u7ea7\u89c4\u5219\u8bf4\u660e<\/h5>\n<ul>\n<li>\u5185\u6838\u56fa\u4ef6&#xff1a;\u4ec5\u652f\u6301\u5dee\u5206\u5347\u7ea7<\/li>\n<li>\u811a\u672c&#xff1a;\u652f\u6301\u5168\u91cf\u5347\u7ea7&#xff0c;\u53ef\u4e00\u6b21\u6027\u5b8c\u6210<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001FOTA \u6982\u8ff0<br \/>\nFOTA \u5373\u8fdc\u7a0b\u5347\u7ea7\u529f\u80fd&#xff0c;\u6b64\u529f\u80fd\u53ef\u4ee5\u8ba9\u5ba2\u6237\u5728\u4e0d\u65b9\u4fbf\u5927\u91cf\u7ebf\u5237\u5347\u7ea7(\u8bbe\u5907\u4e0d\u5728\u8eab\u8fb9\/\u91cf\u4ea7 PCB \u6ca1\u5f15\u51fa USB\/\u9700\u8981\u5927\u6279\u91cf\u8fdb\u884c\u529f\u80fd\u5347\u7ea7)\u7684\u60c5\u51b5\u4e0b&#xff0c;\u5feb\u901f\u8fdb\u884c\u5e95\u5c42\u56fa\u4ef6\/\u811a\u672c\/\u811a\u672c  \u5e95\u5c42\u56fa\u4ef6\u7684\u8fdc\u7a0b\u66f4\u65b0\u3002<br \/>\nLuatOS \u5f00\u53d1\u6a21\u5f0f\u4e0b&#xff0c;\u56fa\u4ef6\u5206\u4e3a\u4e24\u90e8\u5206&#xff1a;core \u548c script<br \/>\n\u8fdc\u7a0b\u5347\u7ea7\u65f6&#xff1a;\u5347\u7ea7 script \u548c corescript &#xff0c;\u4ec5 script \u811a\u672c\u5347\u7ea7\u65f6\u4e3a\u5168\u91cf\u5347\u7ea7&amp;#x<\/p>\n","protected":false},"author":2,"featured_media":63667,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1463,269,220,977],"topic":[],"class_list":["post-63687","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-lua","tag-269","tag-220","tag-977"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u8fdc\u7a0b\u56fa\u4ef6\u5347\u7ea7\u670d\u52a1(\u81ea\u6709\u670d\u52a1\u5668\uff0c\u4f7f\u7528libfota2\u6269\u5c55\u5e93) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/63687.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u8fdc\u7a0b\u56fa\u4ef6\u5347\u7ea7\u670d\u52a1(\u81ea\u6709\u670d\u52a1\u5668\uff0c\u4f7f\u7528libfota2\u6269\u5c55\u5e93) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001FOTA \u6982\u8ff0 FOTA \u5373\u8fdc\u7a0b\u5347\u7ea7\u529f\u80fd&#xff0c;\u6b64\u529f\u80fd\u53ef\u4ee5\u8ba9\u5ba2\u6237\u5728\u4e0d\u65b9\u4fbf\u5927\u91cf\u7ebf\u5237\u5347\u7ea7(\u8bbe\u5907\u4e0d\u5728\u8eab\u8fb9\/\u91cf\u4ea7 PCB \u6ca1\u5f15\u51fa USB\/\u9700\u8981\u5927\u6279\u91cf\u8fdb\u884c\u529f\u80fd\u5347\u7ea7)\u7684\u60c5\u51b5\u4e0b&#xff0c;\u5feb\u901f\u8fdb\u884c\u5e95\u5c42\u56fa\u4ef6\/\u811a\u672c\/\u811a\u672c \u5e95\u5c42\u56fa\u4ef6\u7684\u8fdc\u7a0b\u66f4\u65b0\u3002 LuatOS \u5f00\u53d1\u6a21\u5f0f\u4e0b&#xff0c;\u56fa\u4ef6\u5206\u4e3a\u4e24\u90e8\u5206&#xff1a;core \u548c script \u8fdc\u7a0b\u5347\u7ea7\u65f6&#xff1a;\u5347\u7ea7 script \u548c corescript &#xff0c;\u4ec5 script \u811a\u672c\u5347\u7ea7\u65f6\u4e3a\u5168\u91cf\u5347\u7ea7&amp;#x\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/63687.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-22T00:05:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000510-697169b6e40cd.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/63687.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/63687.html\",\"name\":\"\u8fdc\u7a0b\u56fa\u4ef6\u5347\u7ea7\u670d\u52a1(\u81ea\u6709\u670d\u52a1\u5668\uff0c\u4f7f\u7528libfota2\u6269\u5c55\u5e93) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-22T00:05:21+00:00\",\"dateModified\":\"2026-01-22T00:05:21+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/63687.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/63687.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/63687.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u8fdc\u7a0b\u56fa\u4ef6\u5347\u7ea7\u670d\u52a1(\u81ea\u6709\u670d\u52a1\u5668\uff0c\u4f7f\u7528libfota2\u6269\u5c55\u5e93)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u8fdc\u7a0b\u56fa\u4ef6\u5347\u7ea7\u670d\u52a1(\u81ea\u6709\u670d\u52a1\u5668\uff0c\u4f7f\u7528libfota2\u6269\u5c55\u5e93) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/63687.html","og_locale":"zh_CN","og_type":"article","og_title":"\u8fdc\u7a0b\u56fa\u4ef6\u5347\u7ea7\u670d\u52a1(\u81ea\u6709\u670d\u52a1\u5668\uff0c\u4f7f\u7528libfota2\u6269\u5c55\u5e93) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001FOTA \u6982\u8ff0 FOTA \u5373\u8fdc\u7a0b\u5347\u7ea7\u529f\u80fd&#xff0c;\u6b64\u529f\u80fd\u53ef\u4ee5\u8ba9\u5ba2\u6237\u5728\u4e0d\u65b9\u4fbf\u5927\u91cf\u7ebf\u5237\u5347\u7ea7(\u8bbe\u5907\u4e0d\u5728\u8eab\u8fb9\/\u91cf\u4ea7 PCB \u6ca1\u5f15\u51fa USB\/\u9700\u8981\u5927\u6279\u91cf\u8fdb\u884c\u529f\u80fd\u5347\u7ea7)\u7684\u60c5\u51b5\u4e0b&#xff0c;\u5feb\u901f\u8fdb\u884c\u5e95\u5c42\u56fa\u4ef6\/\u811a\u672c\/\u811a\u672c \u5e95\u5c42\u56fa\u4ef6\u7684\u8fdc\u7a0b\u66f4\u65b0\u3002 LuatOS \u5f00\u53d1\u6a21\u5f0f\u4e0b&#xff0c;\u56fa\u4ef6\u5206\u4e3a\u4e24\u90e8\u5206&#xff1a;core \u548c script \u8fdc\u7a0b\u5347\u7ea7\u65f6&#xff1a;\u5347\u7ea7 script \u548c corescript &#xff0c;\u4ec5 script \u811a\u672c\u5347\u7ea7\u65f6\u4e3a\u5168\u91cf\u5347\u7ea7&amp;#x","og_url":"https:\/\/www.wsisp.com\/helps\/63687.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-22T00:05:21+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122000510-697169b6e40cd.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/63687.html","url":"https:\/\/www.wsisp.com\/helps\/63687.html","name":"\u8fdc\u7a0b\u56fa\u4ef6\u5347\u7ea7\u670d\u52a1(\u81ea\u6709\u670d\u52a1\u5668\uff0c\u4f7f\u7528libfota2\u6269\u5c55\u5e93) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-22T00:05:21+00:00","dateModified":"2026-01-22T00:05:21+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/63687.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/63687.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/63687.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u8fdc\u7a0b\u56fa\u4ef6\u5347\u7ea7\u670d\u52a1(\u81ea\u6709\u670d\u52a1\u5668\uff0c\u4f7f\u7528libfota2\u6269\u5c55\u5e93)"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/63687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=63687"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/63687\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/63667"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=63687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=63687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=63687"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=63687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}