I am using the below code to send date-time stamped SMS from SIM800L.
SoftwareSerial SIM800L(3, 2);
String adminNumber="+91xxxxxxxxxx";
void setup(){
SIM800L.begin(9600);
SIM800L.print(“AT+CMGF=1\r”); //SIM800L:SMS Text Mode.
clrSIM800L();
delay(250);
}
void funSMS(String MSG){
delay(250);
clrSIM800L(); // CLEAR BUFFER FOR SAFETY
delay(1000);
MSG=(MSG+"\n@"+net_CLK());
delay(250);
SIM800L.print(“AT+CMGS=”"+adminNumber+""\r");
delay(250);
SIM800L.print(MSG);
delay(250);
SIM800L.write((char)26);
delay(250);
MSG = “”;
delay(1000);
}
void clrSIM800L(){ // function to clear buffer
char clrSim800Lvar;
while (SIM800L.available()){
clrSim800Lvar=SIM800L.read();
delay(50);
}
}
String net_CLK(){ // function to return date and time
char netwCLK[40];
char newCLK[18];
clrSIM800L();
delay(250);
SIM800L.print(“AT+CCLK?\r”);
delay(250);
for(int i = 0; i <= 39; i++){
delay(10);
netwCLK[i]=SIM800L.read();
}
for(int j = 0; j <= 16; j++){
newCLK[j]=netwCLK[j+19];
}
newCLK[17]=0;
String strCLK((char*)newCLK);
return strCLK;
}
The problem is when I am using Airtel SIM in SIM800L, I receive “content not supported”.
This problem does not occur with Vodafone, Idea, Tata
From some research i guess the problem is text mode setting.