Skip to content

WiFiClient.read in 3.2.0 is very slow #11294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
kungfupizza opened this issue Apr 24, 2025 · 4 comments
Open
1 task done

WiFiClient.read in 3.2.0 is very slow #11294

kungfupizza opened this issue Apr 24, 2025 · 4 comments
Assignees
Labels
Area: WiFi Issue related to WiFi

Comments

@kungfupizza
Copy link

Board

ESP32S3

Device Description

ESP32S3 board wifi connected

Hardware Configuration

Nothing connected.

Version

v3.2.0

IDE Name

VSCode

Operating System

Windows 11

Flash frequency

80M

PSRAM enabled

yes

Upload speed

115200

Description

When using WiFiClient* _client; to read from a server, _client->read(InBuff.getWritePtr(), availableBytes); I see difference in speed in 3.0.7 vs 3.2.0

in 3.0.7(IDF version 5.1.4 I can see

I (403056) content-length: 2335192
I (403264) stream ready, buffer filled in 193 ms

in 3.2.0
stream ready, buffer filled in 4054 ms for same length of content.

Sketch

WiFiClient _client;
void setup()
{
 // setup the client
 // call a GET
 // read from server
 // check time taken to fill the entire buffer
}

void loop()
{
 // do nothing
}

Debug Message

N/A

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@kungfupizza kungfupizza added the Status: Awaiting triage Issue is waiting for triage label Apr 24, 2025
@lbernstone
Copy link
Contributor

Do you see the same issue with the example?

@kungfupizza
Copy link
Author

Similar results @lbernstone

@lucasssvaz lucasssvaz added Area: WiFi Issue related to WiFi and removed Status: Awaiting triage Issue is waiting for triage labels Apr 25, 2025
@TD-er
Copy link
Contributor

TD-er commented Apr 25, 2025

Can you also try this with a fully wiped ESP?
I did notice the RF-calibration between ESP-IDF 5.3 and ESP-IDF 5.4 is incompatible.

When switching to a build based on IDF5.4 (or 5.5) from a build based on an older IDF I had to wipe the RF calibration to get a stable WiFi connection.
Also the other way around, when moving from a build using IDF 5.4 to one based on older IDF.

N.B. this is not required on all nodes, so I guess it is only affecting those boards which already needed some extra antenna matching options (as in, boards with already poor antenna design)

Some example code to wipe the RF calibration data:
Make sure WiFi is turned off.

  delay(100);
  esp_phy_erase_cal_data_in_nvs();
  delay(100);
  esp_phy_load_cal_and_init();
  delay(100);  

@kungfupizza
Copy link
Author

esp_phy_load_cal_and_init does not return. Raised a bug on ESP-IDF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: WiFi Issue related to WiFi
Projects
None yet
Development

No branches or pull requests

5 participants