i have esp8266 i want to send a picture that is on the SD card i convert it to base 64 esp8266 dont send all of data? i just send encoded data for test
i dont now why?
and below is serial monotor...
i dont know why encode data is half write then i use string.substring for having right part of data

and below is my function that is espsend
void espsend(String d, int connectionId) //String//byte
{
// int connectionId = esp8266.read()-48;
String cipSend = " AT+CIPSEND=";
cipSend += connectionId;
cipSend += ",";
cipSend += d.length();
cipSend += "\r\n";
sendData((cipSend), 1000, DEBUG);
sendData(d, 1000, DEBUG);
}
///////////////////////////////////////////////////////////////////////////////////////////
String sendData(String command, const int timeout, boolean debug)
{
String response = "";
esp8266.print((command)); // send the read character to the esp8266
long int time = millis();
while ( (time + timeout) > millis())
{
while (esp8266.available())
{
// The esp has data so display its output to the serial window
char c = esp8266.read(); // read the next character.
response += c;
}
}
if (debug)
{
Serial.print(response);
}
return response;
}
and below is code i use for data...sz is size of picture and q is quotient and sh is counter
hi
my project is send image from SD card with esp8266. but esp dont send all of data...i dont know why.but im sure that data is encode to base64 right.

below is my espsend functions
void espsend(String d, int connectionId) //String//byte
{
// int connectionId = esp8266.read()-48;
String cipSend = " AT+CIPSEND=";
cipSend += connectionId;
cipSend += ",";
cipSend += d.length();
cipSend += "\r\n";
sendData((cipSend), 1000, DEBUG);
sendData(d, 1000, DEBUG);
}
///////////////////////////////////////////////////////////////////////////////////////////
String sendData(String command, const int timeout, boolean debug)
{
String response = "";
esp8266.print((command)); // send the read character to the esp8266
long int time = millis();
while ( (time + timeout) > millis())
{
while (esp8266.available())
{
// The esp has data so display its output to the serial window
char c = esp8266.read(); // read the next character.
response += c;
}
}
if (debug)
{
Serial.print(response);
}
return response;
}
and below is part of code that i use this function
if (myFile)
{
Serial.println("The File is Opened, And Please Show Data On Serial Port");
// read from the file until there's nothing else in it:
while (myFile.available())
{
if (quotient >= counter) {
Serial.println("dakhele halghe quotient>counter");
limit = 3;
outFuncenc = forfuncencod(limit);
espsend(outFuncenc, connectionId);
counter++;
// Serial.println(counter);
}
if (quotient < counter)
{
if (sizeOfMyFile % 3 == 1) {
Serial.println("dakhele halghe quotient<counter va limit=1");
limit = 1;
outFuncenc = forfuncencod(limit);
outFuncenc += '=';
outFuncenc += '=';
espsend(outFuncenc, connectionId);
}
if (sizeOfMyFile % 3 == 2) {
Serial.println("dakhele halghe quotient<counter va limit=2");
limit = 2;
outFuncenc = forfuncencod(limit);
outFuncenc += '=';
espsend(outFuncenc, connectionId);
}
}
}
}
Are you asking us of your ESP8266 sends all the data? How are we supposed to know that?
if (q >= sh) {
You expect us to guess what type these variables are, and whether or not this statement will evaluate to true. I do not play guessing games.
I am also going to refrain from guessing why you are using the stupid String class when you KNOW how many characters are supposed to be in the array(s) at any given time.
PaulS:
Are you asking us of your ESP8266 sends all the data? How are we supposed to know that?
if (q >= sh) {
You expect us to guess what type these variables are, and whether or not this statement will evaluate to true. I do not play guessing games.
I am also going to refrain from guessing why you are using the stupid String class when you KNOW how many characters are supposed to be in the array(s) at any given time.
q and sh is int and they are true because i can see the result is right in serial monitor but esp dont send it and i use then for add one or to '=' for end of String encoded