I want to use SIM800L V2.0 with Arduino Nano in order to send SMS.
I use a SIM card with pin code. I would like to execute these AT commands through serial interface of the Arduino IDE :
at+cpin="xxxx"
at+cmgf=1
AT+CMGS="+33xxxxxxxxx"
my message to sent through SMS<CTRL+Z>
I'm blocked at the last command. I don't know why.
I use this code to communicate with the sim800l :
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() {
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available()) {
while(Serial.available())
mySerial.write(Serial.read());
mySerial.println();
}
}
at+cmgf=1 and AT+CMGS="..." returns "ERROR"
So, I tried to get status of my network connection :
at+cops?
+COPS: 0
And, I tried to get a list of all network available :
at+cops=?
+COPS: (1,"Orange F","Orange","20801"),(1,"BOUYGUES TELECOM","BYTEL","20820"),(2,"SFR","SFR","20810"),,(0-4),(0-2)
So, have you any ideas to solve this pb ?
AT+CMGS="+33xxxxxxxxx"
. Can you verify that you see the>
prompt from the modem after sending this command? It's important to look at theOK
and>
prompt responses from the modem. – drott