Hello,
I could able receive SMS, call and receive call without an Issue, but when I try to send a SMS, I am receiving the below error message.
CMS ERROR: 69(Requested facility not implemented)
please let me know if any one know the reason behind it and help me to resolve it.
Thanks
Complete non-working please.
Please find the code below.
#include <SoftwareSerial.h>
//Create software serial object to communicate with SIM800L
SoftwareSerial mySerial(3, 2); //SIM800L Tx & Rx is connected to Arduino #3 & #2
void setup()
{
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(9600);
//Begin serial communication with Arduino and SIM800L
mySerial.begin(9600);
Serial.println("Initializing...");
delay(1000);
mySerial.println("AT");
updateSerial();
mySerial.println("AT+CSQ");
updateSerial();
mySerial.println("AT+CCID");
updateSerial();
mySerial.println("AT+CREG?");
updateSerial();
mySerial.println("AT+CMGF=1");
updateSerial();
mySerial.println("AT+CMGS="+91**********"");
updateSerial();
mySerial.println("GSM WOKRING FINE"); //text content
updateSerial();
mySerial.println((char)26);/*
mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
updateSerial();
mySerial.println("AT+CNMI=1,2,0,0,0"); // Decides how newly arrived SMS messages should be handled
updateSerial();*/
}
void loop()
{
updateSerial();
}
void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}
Code tags would help make your post more readable... (you can add them to your original post)
The delay(500) isn’t really a good idea, and the CNMI should be up near CMGF, so that incoming messages are reported correctly.
You have placed a comment block in a strange place...
/..../
Normally these should be on their own lines to make the block more obvious.
Overall, the code looks like it should ‘kinda’ work, but it’s very linear, and the updateSerial should really be handled a bit differently.
After CMGS, you should wait for the > prompt to be received before sending your text.
I just noticed, you aren’t doing anything to ‘receive’ messages.
They come in with the +CMT prefix.
If you don’t want to handle them synchronously, your CNMI command should start with 2, 2, ... for ‘read them as they come’.
That tells the modem to deliver them to serial immediately.
You need a decent sized buffer, because the first line of text is the sender, date & time... then the second line onward is your message up to 140 chars.
Hi,
Thanks for the reply,
I written this test code to test different features. As I said before, receiving the sms, receiving call and calling some number is working but only issue is sending sms. getting CMS Error: 69.
Thanks
Sorry, I jumped tracks (!). tx/rx
Whenever I see CMS errors when sending, it’s usually an unsupported or non-printing character within the recipient number or the message body.
Don’t forget those CODE TAGS