From ec3e91ac6cf107d8de50e73d6cb8e28600ad48d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=A9=AC=5F666?= <13089258+pony-six-hundred-and-sixty-six@user.noreply.gitee.com> Date: Fri, 17 Jan 2025 13:40:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98=E4=B8=80=E4=B8=AA=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/src/bsp_nt26k.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bsp/src/bsp_nt26k.c b/bsp/src/bsp_nt26k.c index abe92f6..2976888 100644 --- a/bsp/src/bsp_nt26k.c +++ b/bsp/src/bsp_nt26k.c @@ -2,7 +2,7 @@ * @Author: mbw * @Date: 2024-10-09 08:42:14 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-01-17 11:22:04 + * @LastEditTime: 2025-01-17 13:30:24 * @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\bsp\src\bsp_nt26k.c * @Description: * @@ -1503,7 +1503,9 @@ static void Nt26k_Life_Thread_Entry(void *parameter) } else { + device->class->device_ops->control(device, AT_DEVICE_RF_CLOSE, RT_NULL); result = -RT_ETIMEOUT; + goto __exit; } at_delete_resp(resp); @@ -1518,10 +1520,11 @@ static void Nt26k_Life_Thread_Entry(void *parameter) __exit: if (result != RT_EOK) { - LOG_D("重连网络失败,等待10s后重连\n"); + LOG_D("重连网络失败,等待%d s后重连\n",delay_n * 5); + rt_thread_mdelay(delay_n * 5000); delay_n++; - if (delay_n >= 360) + if (delay_n >= 66)//大于3小时的重连都不行,则重启设备 { Flash_Set_WorkDuration(work_duration); delay_n = 0;