Hey guys
Must first post so be gentle
I am putting together a data logging project that consists of storing RFID tags to a text file on an SD card. Then at a certain time of the day, read the SD card contents and them as a sms message via AT commands.
I have achieved this successfully, however I hit a snag when the amount of text inside the .txt file reaches a certain length. Once this length is reached the SMS fails to send.
it doesn't seem to be an sms character limit issue as I can send over 160 characters.
Through testing the limits, it looks like issue occurs when the amount of text is longer than one line of the text editor notepad. (what's he on about you are asking...)
If I open the text file on a pc in notepad and turn off word wrap and type text until it goes all the way to the end of the first line. i can send this amount of characters successfully.
If add one more character so that it runs over to the second line, the sms fails to send.
The issue is not related to reading the text from more than one line as i can send if the text file has 10 lines of text.
This code snipped grabs the contents and puts it into a String 'Buffer'
File TagInfo = SD.open("TagInfo.txt");
 // if the file is available, read the file
 if (TagInfo)
 {
  while (TagInfo.available())
  {
   buffer = TagInfo.readStringUntil('*');
   Serial.println(buffer); //Printing for debugging purpose
   SendSMS();
  }
  TagInfo.close();
Here's the AT command Snippet that sends the content of 'buffer' (the text file contents)
GSMSerial.println("AT+CMGF=1");
  delay(200);
  // runsl();
  GSMSerial.print("AT+CMGS=\"");
  delay(200);
  // runsl();
  GSMSerial.print(phone_no);
  delay(200);
  // runsl();
  GSMSerial.write(0x22);
  GSMSerial.write(0x0D); // hex equivalent of Carraige return
  GSMSerial.write(0x0A); // hex equivalent of newline
  delay(2000);
  GSMSerial.print(buffer);
  delay(500);
  GSMSerial.println (char(26));//the ASCII code of the ctrl+z is 26
Any idea of what 'limit' i am hitting here ?
Cheers
Jonny