Closed mmoas21 closed 2 years ago
@mmoas21 can we have a wireless capture along with the ssid and password used in this wifi connection. Pls take the capture on the httpd is slow and also when it is fast.
Using Wireshark I found that there is a lot of QoS Null function (No data)
, TCP Retransmission
and TCP Dup ACK
.
I found this @tschak909 's post on esp32.com: https://www.esp32.com/viewtopic.php?t=18483
Initial solution (CONFIG_LWIP_TCP_QUEUE_OOSEQ=n
) didn't help me there, but when I tested their whole WIFI and LWIP configuration all problems disappeared. The most important seems to be CONFIG_ESP32_WIFI_TX_BA_WIN
and CONFIG_ESP32_WIFI_RX_BA_WIN
.
I am attaching below for future FujiNetWIFI's sdkconfig.defaults:
CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=128
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=0
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=32
# CONFIG_ESP32_WIFI_CSI_ENABLED is not set
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP32_WIFI_TX_BA_WIN=32
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=32
CONFIG_ESP32_WIFI_NVS_ENABLED=y
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y
# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set
CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752
CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32
# CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set
# CONFIG_ESP32_WIFI_IRAM_OPT is not set
# CONFIG_ESP32_WIFI_RX_IRAM_OPT is not set
CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=6
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534
CONFIG_LWIP_TCP_WND_DEFAULT=65534
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
# CONFIG_LWIP_TCP_QUEUE_OOSEQ is not set
# CONFIG_LWIP_TCP_SACK_OUT is not set
# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
I am closing as issue solved
I observe that using particular android devices, in AP mode, httpd server is extremely slow.
I am testing the AP mode and the httpd server with Samsung Galaxy Tab S7 FE (SM-T733). I observe that on this particular device, opening an esp IP address is very slow and fails most times due to timeout. Different browsers (samsung browser, chrome, firefox) act the same. If instead of AP mode, I am connected in STA mode, through the router, there is no more problem on the Galaxy Tab. If I am using other device (iPhone 8, Samsung Note 9, OnePlus 3T, macbook), page loading is fast. From time to time, without any clear reason (multiple reconnections, esp restarts, maybe the amount of time) something changes and page loading starts being fast until the next dis- and re-connection.
I already applied most of advices found, but none of them helped. The most important lines of the configuration:
I tried turning on LWPI debug but the only unusual thing, that I do not observe when connected with other devices, is multiple
tcp_fasttmr: delayed ACK
:Environment