使用 AT 命令发送短信时绕过消息存储
Bypass message storage when sending SMS with AT commands
我有一组 Motorola Razar v3m,现在包含大约 26 phones。我有一个我构建的多线程软件平台,它管理每个 phone 和消息 routing/timed-wait 任务以及所有这些。
当我发出:
AT+CMGW="1234567890"message<26><27>
将消息写入 phone 内存需要将近 30 秒,然后我使用以下方式发送消息:
AT+CMSS=messageIndex
这又需要 30 秒。
我尝试过使用 AT+CMGS,但根本无法获得成功发送消息的功能。
我需要它是可靠的,但有了这个 method/phone 组合,我什至不会依赖它每年告诉我一次生日快乐。
有没有另一种发送短信而不先存储到内存的方法?它不仅慢; 但最终导致phone根本不再发送消息,即使它们被AT+CMGD删除
听起来你正在写入 sim 内存,因为它太慢了。
来自27.005中AT+CMGW
的描述:
Execution command stores message (either SMS-DELIVER or SMS-SUBMIT) to memory storage <mem2>
.
及前面的“3.1 参数定义”:
<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
<mem1>
和<mem2>
的值配置为AT+CPMS
,首选消息存储(注意你应该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 与标准相比))这将是很多比 sim 存储更快。
使用 AT+CMGS
应该是可能的,但请注意在发送有效负载之前您确实需要 wait for "\r\n> "
。当你说你没有让那个工作时,我假设你在正确解析响应和适当等待方面遇到了一些麻烦。
我有一组 Motorola Razar v3m,现在包含大约 26 phones。我有一个我构建的多线程软件平台,它管理每个 phone 和消息 routing/timed-wait 任务以及所有这些。
当我发出:
AT+CMGW="1234567890"message<26><27>
将消息写入 phone 内存需要将近 30 秒,然后我使用以下方式发送消息:
AT+CMSS=
messageIndex
这又需要 30 秒。
我尝试过使用 AT+CMGS,但根本无法获得成功发送消息的功能。
我需要它是可靠的,但有了这个 method/phone 组合,我什至不会依赖它每年告诉我一次生日快乐。
有没有另一种发送短信而不先存储到内存的方法?它不仅慢; 但最终导致phone根本不再发送消息,即使它们被AT+CMGD删除
听起来你正在写入 sim 内存,因为它太慢了。
来自27.005中AT+CMGW
的描述:
Execution command stores message (either SMS-DELIVER or SMS-SUBMIT) to memory storage
<mem2>
.
及前面的“3.1 参数定义”:
<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
<mem1>
和<mem2>
的值配置为AT+CPMS
,首选消息存储(注意你应该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
使用 AT+CMGS
应该是可能的,但请注意在发送有效负载之前您确实需要 wait for "\r\n> "
。当你说你没有让那个工作时,我假设你在正确解析响应和适当等待方面遇到了一些麻烦。