Go Down

Topic: Cannot send SMS with SIM900 (Read 4474 times) previous topic - next topic

garreb

Hi,

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

AT+CMGF=1

OK
AT+CMEE=1

OK
AT+CMGS="+41xxxxxxxxxx"

+CME ERROR: 765
testettt


Thanks

vlp_arduino

Could you test with the function written into the wiki:

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

garreb

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



Jackman

I see it at the SIM900_AT_Command_Manual_V1.03.pdf.page 218,it says that <code 765 > means <Invalid  input value>.
you can download this PDF here, http://www.elecrow.com/wiki/images/a/a8/SIM900_AT_Command_Manual_V1.03.pdf

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

tabies

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

RAK_SOLO

Friends,

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

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy