问题
I can finally make a phone call, receive, and answer it. But if I try to send an SMS I receive CMS ERROR: 500. The GSM modem I am using is Telit GL865-Quad module. Since the Call function is working, what's preventing the SMS to work? please enlightenment me. The Sim Card works fine on my phone to rule out some of the problems. I am using a hyperterminal to type the commands at 19200 speed. This is the user guide with commands for your own convenience.
To send an SMS:
AT+CMGF=1 // Select Text Mode
OK
AT+CMGW=”+xxxxxxxxxxxx” // my number
> Hi
>
+CMGW: 8
OK
AT+CMSS=8
Error: +CMS ERROR: 500
Any ideas to what the error means, since its unknown error? What are some commands to type out to pinpoint the problem?
I would appreciate your help, thanks!
回答1:
+CMS ERROR: 500 is unfortunately a very generic error message.
I have a few suspicions which may solve your problem:
1) Timing problem
Writing an SMS to the SIM card will take a "significant" amount of time. Between writing the SMS to SIM and sending the SMS wait a couple of seconds.
2) Check that the SMS really did get written to SIM
Using the CMGR command you can verify if the SMS is written to SIM and it's current status.
For example:
AT+CMGR=8
Alternatives:
You can always send an SMS directly without storing on the SIM. This is generally a more favored approach for multiple reasons including SMS sending is quicker and SIM lifetime is extended due to reduced read/writes.
This can be achieved by using:
AT+CMGS=<destination address>
>Hi
You can additionally use the CNMI command to prevent incoming messages being stored on the SIM and being output directly to the console/telnet connection.
来源:https://stackoverflow.com/questions/19614635/how-to-send-sms-with-gsm-click-modem