From 5cf752bb3fc28a083513e8c6d4ee97c3f3d7203a Mon Sep 17 00:00:00 2001 From: linyimin <18316471919@139.com> Date: Thu, 25 Jun 2026 12:02:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20maixcam=20wifi=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.yaml | 4 +--- network.py | 10 ++++++++++ version.md | 3 ++- version.py | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app.yaml b/app.yaml index a5ad9b0..5142eb2 100644 --- a/app.yaml +++ b/app.yaml @@ -1,6 +1,6 @@ id: t11 name: t11 -version: 2.15.16 +version: 2.15.17 author: t11 icon: '' desc: t11 @@ -18,8 +18,6 @@ files: - laser_manager.py - logger_manager.py - main.py - - model_270139.cvimodel - - model_270139.mud - network.py - ota_curl.sh - ota_manager.py diff --git a/network.py b/network.py index 3c3cfc5..676dae1 100644 --- a/network.py +++ b/network.py @@ -624,6 +624,11 @@ class NetworkManager: password = inner_data.get("password") ota_res_url = inner_data.get("url") try: + for _f in ("/etc/wpa_supplicant.conf", "/boot/wpa_supplicant.conf", "/boot/wifi.ssid", "/boot/wifi.pass"): + try: + os.remove(_f) + except OSError: + pass w = network.wifi.Wifi() e = w.connect(ssid, password, wait=True, timeout=15) err.check_raise(e, "connect wifi failed") @@ -665,6 +670,11 @@ class NetworkManager: ssid = inner_data.get("ssid") password = inner_data.get("password") try: + for _f in ("/etc/wpa_supplicant.conf", "/boot/wpa_supplicant.conf", "/boot/wifi.ssid", "/boot/wifi.pass"): + try: + os.remove(_f) + except OSError: + pass w = network.wifi.Wifi() e = w.connect(ssid, password, wait=True, timeout=15) err.check_raise(e, "connect wifi failed") diff --git a/version.md b/version.md index a1f03a7..9c51f80 100644 --- a/version.md +++ b/version.md @@ -26,4 +26,5 @@ # 2.15.13 优化算法 # 2.15.14 优化算法 # 2.15.15 优化wifi连接 -# 2.15.16 修复wifi连接问题 \ No newline at end of file +# 2.15.16 修复wifi连接问题 +# 2.15.17 修复wifi连接问题 \ No newline at end of file diff --git a/version.py b/version.py index e2a1183..4b04b6e 100644 --- a/version.py +++ b/version.py @@ -4,6 +4,6 @@ 应用版本号 每次 OTA 更新时,只需要更新这个文件中的版本号 """ -VERSION = '2.15.16' +VERSION = '2.15.17'