简体   繁体   English

GSM调制解调器无法接收短信

[英]GSM Modem not able to receive SMS

i doing a simple application that able to integrate with GSM Modem to send and receive the SMS. 我做了一个简单的应用程序,能够与GSM调制解调器集成以发送和接收SMS。 i had completed the send SMS part, but i not able to receive the SMS. 我已经完成了发送SMS的部分,但是我无法接收SMS。 i get error message said that my SIM card memory is full when trying to send the SMS with other mobile device to my SIM card in the GSM Modem. 我收到错误消息,表示尝试将其他移动设备的SMS发送到GSM调制解调器中的SIM卡时,我的SIM卡内存已满。 i tried to use the AT command "AT+CMGL" to remove all the messages, but still same. 我试图使用AT命令“ AT + CMGL”删除所有消息,但仍然相同。 May i know there are any method to store the message in my computer memory so that i able to receive the SMS with my GSM Modem. 我可以知道有什么方法可以将消息存储在计算机内存中,以便能够通过GSM调制解调器接收短信。 I using the sample code from here http://www.codeproject.com/Articles/38705/Send-and-Read-SMS-through-a-GSM-Modem-using-AT-Com 我从这里使用示例代码http://www.codeproject.com/Articles/38705/Send-and-Read-SMS-through-a-GSM-Modem-using-AT-Com

The AT+CMGL command is for listing messages, not deleting them. AT+CMGL命令用于列出消息,而不是删除消息。 Deleting messages is done with the AT+CMGD command. 删除消息是使用AT+CMGD命令完成的。 Do yourself a favour and download a copy of the 3GPP 27.005 standard, it defines all the standard sms AT commands (most other mobile phone AT commands are defined in 27.007 ), and by all means get a copy of the ITU standard V.250 which defines the basic command syntax, structure and behaviour for AT commands - an absolute must read for anyone that issues AT commands (read all of chapter 5 at least). 帮个忙,下载3GPP 27.005标准的副本,它定义了所有标准的sms AT命令(大多数其他移动电话AT命令在27.007中定义),并且一定获得了ITU标准V.250的副本。定义了AT命令的基本命令语法,结构和行为-发出AT命令的任何人都必须阅读绝对命令(至少阅读第5章的所有内容)。 These documents are more valuable than any random internet web site, including stackoverflow. 这些文档比任何随机Internet网站(包括stackoverflow)都更有价值。

Speaking of random websites, the web page you linked as source seems to be of dubious value. 说到随机网站,作为源链接的网页似乎具有可疑的价值。 It gives an example function DeleteMsg which issues AT+CMGF=1 but this command does in no way delete anything, it selects text or PDU mode for the various sms related commands. 它给出了一个示例函数DeleteMsg ,该函数发出AT+CMGF=1但是此命令绝不会删除任何内容,它为各种与sms相关的命令选择文本或PDU模式。

It does have response handling that is better than the horrible send-sleep-read mistake that unfortunately is not as uncommon as it ought to be, but it is only half decent and not robust at all. 它的响应处理确实比可怕的发送-读取-读取错误要好,不幸的是,该错误并没有像应该的那样普遍,但是它只有一半是体面的,而且根本没有鲁棒性。 After sending an AT command to a modem you should continuously read and parse response lines from the modem (over and over again) until you receive a final result code (and not just once). 向调制解调器发送AT命令后,您应该不断地读取和解析来自调制解调器的响应行(一遍又一遍),直到您收到最终的结果代码(而不仅仅是一次)。 See this answer for details. 有关详细信息,请参见此答案


All of the the message commands operate on the storage location set by AT+CPMS . 所有消息命令都在AT+CPMS设置的存储位置上操作。 And notice that you should always set <mem1> and <mem2> at the same time, eg 并且请注意,您应始终同时设置<mem1><mem2> ,例如

AT+CPMS="SM","SM"

It both makes little sense to only change one of mem1/mem2, and some phones do not like attempts to set only one of them. 仅更改mem1 / mem2中的一个几乎没有意义,并且某些电话不喜欢仅设置其中之一的尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM