diff --git a/.mrs/launch.json b/.mrs/launch.json index e17263f..0ad7452 100644 --- a/.mrs/launch.json +++ b/.mrs/launch.json @@ -5,7 +5,7 @@ "type": "mrs-debugger", "request": "launch", "name": "ble_bjq_ch303rct6_ml307", - "cwd": "d:\\SXDT\\Project\\CH32\\ble_bjq_ch303rct6_ml307", + "cwd": "c:\\Users\\16586\\Desktop\\ble_-tyq_-bjq_-ch32-v303", "openOCDCfg": { "useLocalOpenOCD": true, "executable": "c:/MounRiver/MounRiver_Studio2/resources/app/resources/win32/components/WCH/OpenOCD/OpenOCD/bin/openocd.exe", @@ -39,8 +39,8 @@ "additionalCommands": [] }, "loadedFiles": { - "executableFile": "d:\\SXDT\\Project\\CH32\\ble_bjq_ch303rct6_ml307\\obj\\ble_bjq_ch303rct6_ml307.elf", - "symbolFile": "d:\\SXDT\\Project\\CH32\\ble_bjq_ch303rct6_ml307\\obj\\ble_bjq_ch303rct6_ml307.elf", + "executableFile": "c:\\Users\\16586\\Desktop\\ble_-tyq_-bjq_-ch32-v303\\obj\\ble_bjq_ch303rct6_ml307.elf", + "symbolFile": "c:\\Users\\16586\\Desktop\\ble_-tyq_-bjq_-ch32-v303\\obj\\ble_bjq_ch303rct6_ml307.elf", "executableFileOffset": 0, "symbolFileOffset": 0 }, diff --git a/applications/user_sys.h b/applications/user_sys.h index 178e7be..49a11bd 100644 --- a/applications/user_sys.h +++ b/applications/user_sys.h @@ -30,16 +30,16 @@ // 正式平台链接 -// #define SYS_IOT_URL ("8.130.122.162") -// #define SYS_IOT_PORT ("7153") +#define SYS_IOT_URL ("8.130.122.162") +#define SYS_IOT_PORT ("7153") //测试平台链接1 // #define SYS_IOT_URL ("8.130.105.38") // #define SYS_IOT_PORT ("7133") //测试平台链接2 -#define SYS_IOT_URL ("8.130.105.38") -#define SYS_IOT_PORT ("7163") +// #define SYS_IOT_URL ("8.130.105.38") +// #define SYS_IOT_PORT ("7163") #define K (8 * 1000) diff --git a/bsp/inc/bsp_vin_detection.h b/bsp/inc/bsp_vin_detection.h index 740252c..66120cf 100644 --- a/bsp/inc/bsp_vin_detection.h +++ b/bsp/inc/bsp_vin_detection.h @@ -4,7 +4,7 @@ * @LastEditors : stark1898y 1658608470@qq.com * @LastEditTime : 2025-01-23 16:17:44 * @FilePath : \JT-DT-YD4N02A_4G_RTT_MRS\bsp\inc\bsp_vin_detection.h - * @Description + * @Description * * Copyright (c) 2024 by yzy, All Rights Reserved. */ diff --git a/bsp/src/at_device_ml307.c b/bsp/src/at_device_ml307.c index 875db95..6491f57 100644 --- a/bsp/src/at_device_ml307.c +++ b/bsp/src/at_device_ml307.c @@ -189,11 +189,13 @@ static void urc_tcp_connect_state (struct at_client *client, const char *data, r if (sscanf (data, "+MIPOPEN:%d,%d", &id, &err_code) == 2) { + { switch (err_code) { case 0: ml307_conncet_tcp_flag = 1; + rt_sem_release (ml307_connect_flag_sem); break; case 571: LOG_D ("PDP激活失败"); @@ -207,9 +209,13 @@ static void urc_tcp_connect_state (struct at_client *client, const char *data, r rt_sem_release (ml307_disconnect_sem); break; } - rt_sem_release (ml307_connect_flag_sem); // 用于返回连接的标志量在连接函数中 + // 用于返回连接的标志量在连接函数中 } } + else + { + LOG_E ("ml307 tcp connect error, [%d]", __LINE__); + } } static void urc_tcp_disconnect (struct at_client *client, const char *data, rt_size_t size)