From 199cb5d23fa3113043e2164c9305b0e0573e5859 Mon Sep 17 00:00:00 2001 From: wangfq Date: Thu, 23 Jul 2026 14:30:47 +0800 Subject: [PATCH] =?UTF-8?q?config:=20WCHNET=5FTCP=5FMSS=20576=E2=86=92700,?= =?UTF-8?q?=20TCP=5FJSON=5FMAX=5FFRAME=204096=E2=86=92800?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - WCHNET_TCP_MSS=700: 减少 TCP 分段, 配合 iot_mqtt_send 循环重试 → RECE_BUF_LEN 自动扩至 1400 (原 1152) - TCP_JSON_MAX_FRAME=800: 匹配实际 JSON 帧大小 --- vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/net_config.h | 2 +- .../BLE/OnlyUpdateApp_Peripheral/APP/include/tcp_json_srv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/net_config.h b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/net_config.h index 0a3c173..6b64ef8 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/net_config.h +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/net_config.h @@ -36,7 +36,7 @@ extern "C" { /* The number of sockets, the maximum is 31 */ #define WCHNET_MAX_SOCKET_NUM (WCHNET_NUM_IPRAW+WCHNET_NUM_UDP+WCHNET_NUM_TCP+WCHNET_NUM_TCP_LISTEN) -#define WCHNET_TCP_MSS 576 //1024 //1460 /* Size of TCP MSS*/ +#define WCHNET_TCP_MSS 700 //576 //1024 //1460 /* Size of TCP MSS*/ #define WCHNET_NUM_POOL_BUF (WCHNET_NUM_TCP*2+2) /* The number of POOL BUFs, the number of receive queues */ diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/tcp_json_srv.h b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/tcp_json_srv.h index 6e7c718..007ba48 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/tcp_json_srv.h +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/tcp_json_srv.h @@ -17,7 +17,7 @@ * Protocol Constants *===========================================================================*/ #define TCP_JSON_PORT 5960 // TCP JSON protocol default port -#define TCP_JSON_MAX_FRAME 4096 // Max JSON frame length +#define TCP_JSON_MAX_FRAME 800 //4096 // Max JSON frame length #define TCP_JSON_AUTH_TIMEOUT_MS 60000 // 60s auth timeout (ms) #define TCP_JSON_RECV_BUF_LEN (TCP_JSON_MAX_FRAME * 2) #define TCP_JSON_MAX_PWD_RETRY 3 // Max password retries before lockout