Hi everyone! I'm ashwin
I try to get 54KB of data using sim800l(Retrive from HTTP Server) with mega and stored to SD.Actually i got the data both softwareserial and hardwareserial but initially i got big loss of data and after i also get loss in each line per single byte data loss
i didn't know why i get this using this code
Using Serial baudrate is 9600 for both serial and myserial
if(myserial.available()){
while(true){
c = myserial.read();
Serial.print(c);
// save file byte
if (c == '}'){
break;
}
}
}
Acutal data;
actualdata.txt (54.0 KB)
while i get data;
char gsmdata.txt (48.9 KB)
here you all can see the loss of data.
Meanwhile i try to storing the char gsmdata to SD card i facing here lots of '?' marks using the code
void(){
myFile = SD.open("54kbdata.txt", FILE_WRITE);
if (myFile)
{
Serial.println("Writing to 54kbdata.txt...");
if(myserial.available()){
while(true){
c = myserial.read();
myFile.print(c);
if (c == '}'){
break;
}
}
}
myFile.close();
Serial.println("done.");
}
else
{
Serial.println("error opening 54kbdata.txt");
}
actuall data is above the code
here you all can see the difference actual data and sd file size .
question data;
chargsmdatawithsd.txt (98.6 KB)
Im stuck here please help me.
Thanks Advance everyone!
