Cannot send SMS with SIM900


I have a problem sending SMS with SIM900 i can make a call but there is an Error when i tried to send SMS.



OK AT+CMGS="+41xxxxxxxxxx"

+CME ERROR: 765 testettt


Could you test with the function written into the wiki:

void SendTextMessage()
  mySerial.print("AT+CMGF=1\r");    //Because we want to send the SMS in text mode
  mySerial.println("AT + CMGS = \"+86138xxxxx615\"");//send sms message, be careful need to add a country code before the cellphone number
  mySerial.println("A test message!");//the content of the message
  mySerial.println((char)26);//the ASCII code of the ctrl+z is 26

Hi thanks for the answers i really have the same code and still the same problem (CME ERROR code 765 )

I tried with two SIM CARD in Switzerland.

I tried ao empty the sms stored in the SIM (mySerial.println("AT+CMGD=1,4");)

I really block

Thanks for your help

I see it at the 218,it says that <code 765 > means .
you can download this PDF here,

So maybe you can change a micro-controller to have a try again, or some basic problems happened when operate the Arduino IDE.

You should paste your complete code, so we can know where and what the wrong.


Thanks for this thread. I've been active in this area lately and found that if you are in text mode and try to send more than 160 characters in a single text, you get the nasty 765 error.

I think, but don't know for sure, that there is some internal buffer limit on an outbound text, and after that is exceeded, the next thing it expects is Cntrl-Z -- so if you keep feeding it characters, it doesn't get that Cntrl-Z and claims that the input is "invalid input value."

This explanation of 765 ("invalid input value") initially sent me down the wrong path, by the way: I use all kinds of characters like !@#$% and was even using a newline in my texts -- but I tested all those including the newline: no problem.

Check for buffer overrun on your tx. Best wishes,

~~ Robert