Skip to content

WifiClient write is slow #1648

@HKGK

Description

@HKGK

Hardware:

Board: ESP32 Dev Module C
Core Installation/update date: 10/jul/2018
IDE name: Arduino IDE 1.8.5 IDF from 10 Jul 2018
Flash Frequency: 40Mhz
Upload Speed: 115200

I have been battling to get my WiFi write speed above 8-12KB/sec. My read speed(Seems to recently have improved from also about 10KB/sec...) on same platform is +-180KB/sec which makes me very happy.

Basically the code looks like this.

#include <WiFi.h>

void setup()
{
Serial.begin(115200);

int status = WiFi.status();

while ( status != WL_CONNECTED)
{
status = WiFi.begin("SSID", "password");
delay(10000);
}

Serial.print("WiFi Connected");
}

void loop()
{
WiFiClient dclient;

dclient.connect("server",port); //Connect to someone that will listen

dclient.setNoDelay(1);

unsigned char txBuf[1760]={ 0 };

while((WiFi.status() == WL_CONNECTED)&& (dclient.connected()) )
{
int txBytes = dclient.write(txBuf, sizeof(txBuf));
}
}

Some help/suggestions would be so much appreciated! My hair is running low :)

Regards

Gideon

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions