QuestionsMy esp just can send tcp package at 5.0 kbps, how I can speed up this?
macnadbay Staff asked 5 years ago

I send files do ftp server, from esp8266, that it read from sd card. Its very fast to read the data fro sd card, but to send i realy low. The speed just go 5 kbps, how I can speed up this speed. I use arduino Ide e the library esp8266WiFi

this is my program:

maxSize = 1460;

while (file_upload_name.available() && Transfer_ftp) {

if(millis() – time_check > 2000){
Serial.println(“DOING FTP”);
Serial.print(“File % complete = “);
Serial.println(count * 100.0 / file_upload_name.size());
time_check = millis();
ESP.wdtFeed();
}

if(Serial.available()){
serial();
if(!Transfer_ftp)return false;
}

clientBuf[clientCount]= file_upload_name.read();
clientCount++;
count++;

//Here is the code to transfer bytes to ftp server, but its much low speed (5kbps)
if (clientCount > (maxSize-1)) {
FtpClient.write((const uint8_t *) &clientBuf[0], maxSize); //send package to ftp servr
clientCount = 0;
}
}

if(clientCount > 0)FtpClient.write((const uint8_t *) &clientBuf[0], clientCount);

FtpClient.stop();
if (!eRcv()) {
wifiClient.println(“QUIT”);
return false;
}
//#ifdef DEBUG_WIFI
Serial.println(“Arquivo(s) transferido(s)”);
//#endif
file_upload_name.close();
//SD.remove(file_name_char);
}

 

If somebody can help me?

my contacts:

email: macnadbay@gmail.com

whatszapp: +5582996399787