Skip to content

Wifi upload speed #1841

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

Closed
raduprv opened this issue Mar 31, 2016 · 3 comments
Closed

Wifi upload speed #1841

raduprv opened this issue Mar 31, 2016 · 3 comments

Comments

@raduprv
Copy link

raduprv commented Mar 31, 2016

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()

@raduprv
Copy link
Author

raduprv commented Apr 2, 2016

Ok, I tried it on Linux, which has a different ACK behavior than Windows, and the upload speed was much better, at 30KBps. Still not really great, but that's about 0.24mbps.
Is there anything that can be done to improve this further?

@igrr
Copy link
Member

igrr commented Apr 4, 2016

Can this be closed since you have opened #1853 on the same topic?

@raduprv
Copy link
Author

raduprv commented Apr 4, 2016

Yes, it can be closed now. If someone googles it, please refer to #1853 for the solution.

@igrr igrr closed this as completed Apr 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants