I have an array of Motorola Razar v3m's containg about 26 phones now. I have a multi-threaded software platform I built which manages each phone and message routing/timed-wait tasks and all of that.
When I issue:
AT+CMGW="1234567890"message<26><27>
It takes nearly 30 seconds to write the message to the phone memory, I then get send the message using:
AT+CMSS=
messageIndex
and that takes another 30 seconds.
I have tried using AT+CMGS but can't get that functionality to send a message successfully at all.
I need this to be reliable, but with this method/phone combination, I wouldn't even depend on it to tell me Happy Birthday once a year.
Is there another way to send an SMS without storing it to memory first? Not only is it slow; but eventually causes the phone to no longer send messages at all, even if they are deleted after by AT+CMGD.
It sounds like the you are writing to the sim memory since it is so slow.
From the description of AT+CMGW
in 27.005:
Execution command stores message (either SMS-DELIVER or SMS-SUBMIT) to memory storage
<mem2>
.
and earlier in "3.1 Parameter definitions":
<mem1>
string type; memory from which messages are read and deleted (commands List Messages +CMGL, Read Message +CMGR and Delete Message +CMGD); defined values (others are manufacturer specific):
"BM" broadcast message storage
"ME" ME message storage
"MT" any of the storages associated with ME
"SM" (U)SIM message storage
"TA" TA message storage
"SR" status report storage
<mem2>
string type; memory to which writing and sending operations are made (commands Send Message from Storage +CMSS and Write Message to Memory +CMGW) ); refer for defined values
The value of <mem1>
and <mem2>
is configured with AT+CPMS
, preferred message storage (notice you should set both to the same value). So my guess is that if you run AT+CPMS?
it will return +CPMS: "SM", ..., ..., "SM", ...
. If my guess is correct you should just switch to another storage on the phone ("ME", "MT" or "TA" - check with AT+CPMG=?
what it supports (and it might support additional storages compared to the standard)) which will be much faster that the sim storage.
Using AT+CMGS
should be possible, but notice that you do need to wait for "\r\n> "
before sending the payload. When you say you did not get that one to work I assume you had some trouble with regards to proper parsing of the responses and proper waiting.