Reputation: 1
I am trying to send a sms from a gsm modem using AT command.
I ve tried following command
AT
OK
AT+CMGF=1
OK
AT+CMGW="+85291234567"
A simple demo of SMS text messaging.
+CMGW: 1
OK
AT+CMSS=1
But last line at+cmss=1 command returns error, how can I solve it?
Upvotes: 0
Views: 816
Reputation: 7490
Command +CMSS=<pos>
sends a message previouly stored memory in position through +CMGW
command.
This command can fail for plenty reasons, all basically related to trasmission issues. I cannot solve your problem, but I can provide a list of things to check in order to understand the reason of any network related operation failure:
AT+CREG?
and check the returned answer. +CREG: x,1
and +CREG: x,5
mean respectively that the device is registered to the home network or in roaming. Otherwise the registration is either still in progress or failed for some reason.AT+CSCA
command?Temporary network issues for your operator (not due to your device) can also lead to a SM sending failure.
But the universal attempt to be done during development phase is the verbose response enabling. Issue 'AT+CMEE=2' before the section where you get an error, and instead a generic ERROR
response you will get something like +CMS ERROR: <err>
, where will describe the failure reason. Check the AT command user guide of the manufacturer of your modem in order to learn more about the error code you get.
Upvotes: 2