Skip to content

Wifi upload speed #1841

Closed
Closed
@raduprv

Description

@raduprv

I am having trouble uploading data from an SD card. The upload speed is about 6.6KBps, about 1 meter away from the router.
This is the code:

unsigned long start_time = millis();
unsigned long wifi_start_time = millis();
unsigned long wifi_time=0;

while (fh.available()) {
  clientBuf[clientCount] = fh.read();
  clientCount++;
  if (clientCount > (bufSizeFTP - 1)) {
    //Serial.print(".");
    wifi_start_time=millis();
    dclient.write((const uint8_t *) &clientBuf[0], bufSizeFTP);
    wifi_time += millis()-wifi_start_time;
    clientCount = 0;
    delay(1);
  }
}
if (clientCount > 0) dclient.write((const uint8_t *) &clientBuf[0], clientCount);

The buffer size is 1460

Is this the max upload speed? Is there something I can do to improve it? Almost all of the time is spent in dclient.write()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions