diff --git a/.vscode/settings.json b/.vscode/settings.json index 8fb96ba..13695b9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -78,6 +78,7 @@ "stddef.h": "c", "netdev_ipaddr.h": "c", "stdint.h": "c", - "stdarg.h": "c" + "stdarg.h": "c", + "math.h": "c" } } diff --git a/applications/main.c b/applications/main.c index 6a7a9df..80924b6 100644 --- a/applications/main.c +++ b/applications/main.c @@ -2,7 +2,7 @@ * @Author: mbw * @Date: 2024-10-23 17:14:16 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-06-05 09:58:33 + * @LastEditTime: 2025-06-06 08:48:12 * @FilePath: \ble_bjq_ch303rct6_ml307\applications\main.c * @Descrt_thread_ * @@ -302,7 +302,7 @@ int main(void) LOG_D("工作时长:%d", work_duration); // 读取历史记录总数 g_Calibration_status = Flash_Get_Calibration_State(); - rt_thread_mdelay(10); + rt_thread_mdelay(100); } else { diff --git a/bsp/src/at_device_ml307.c b/bsp/src/at_device_ml307.c index e05e648..c0ce568 100644 --- a/bsp/src/at_device_ml307.c +++ b/bsp/src/at_device_ml307.c @@ -952,6 +952,11 @@ static void ml307_init_thread_entry(void *parameter) result = -RT_ERROR; goto __exit; } + if (at_obj_exec_cmd(device->client, resp, "AT+CEREG=1") != RT_EOK) + { + result = -RT_ERROR; + goto __exit; + } /* Define PDP Context */ for (i = 0; i < COMMON_RETRY; i++) { diff --git a/bsp/src/bsp_ml307.c b/bsp/src/bsp_ml307.c index f6d110a..bb533de 100644 --- a/bsp/src/bsp_ml307.c +++ b/bsp/src/bsp_ml307.c @@ -2,7 +2,7 @@ * @Author: mbw * @Date: 2024-11-30 15:46:21 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-05-29 10:03:26 + * @LastEditTime: 2025-06-06 08:37:07 * @FilePath: \ble_bjq_ch303rct6_ml307\bsp\src\bsp_ml307.c * @Description: * @@ -2020,6 +2020,11 @@ static void Ml307_Life_Thread_Entry (void *parameter) result = -RT_ERROR; goto __exit; } + if (at_obj_exec_cmd(device->client, resp, "AT+CEREG=1") != RT_EOK) + { + result = -RT_ERROR; + goto __exit; + } rt_uint8_t i = 0; /* check SIM card */ for (i = 0; i < 60; i++)