Add TCP/IP stack tuning for better WiFi throughput

Configure lwIP stack with larger buffers:
- TCP_MSS: 1460 (full ethernet frame)
- TCP send/receive buffers: 5744 bytes (4x MSS)
- Increased mailbox sizes for better packet queuing
- Enable out-of-order segment queuing

Note: The ~200 KB/s limit appears to be inherent to the synchronous
ESP32 WebServer library. For significantly higher speeds (500KB-1MB/s),
consider migrating to ESPAsyncWebServer or raw TCP sockets.
This commit is contained in:
Claude 2026-01-11 01:39:05 +00:00
parent 09393a34ac
commit 865ee21b64
No known key found for this signature in database

View File

@ -28,6 +28,13 @@ build_flags =
-std=c++2a
# Enable UTF-8 long file names in SdFat
-DUSE_UTF8_LONG_NAMES=1
# TCP/IP stack tuning for better WiFi upload performance
-DCONFIG_LWIP_TCP_MSS=1460
-DCONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
-DCONFIG_LWIP_TCP_WND_DEFAULT=5744
-DCONFIG_LWIP_TCP_RECVMBOX_SIZE=12
-DCONFIG_LWIP_TCP_QUEUE_OOSEQ=1
-DCONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32
; Board configuration
board_build.flash_mode = dio