Hi,
I am running gammu (1.33.0) in Windows 7 64-bit and have issue when receive messages.
But other features works well like send messages and running smsd in windows service.
Already use flag USE_SMSTEXTMODE
, change USB port but no luck
Modem : Wavecom Fasttrack M1306B
Here some few lines about the error
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: Getting SMS
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: SENDING frametype 0x00/length 0x0B/11
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 41A|54T|2B+|43C|4DM|47G|52R|3D=|322|311|0D AT+CMGR=21.
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 1 "AT+CMGR=21"
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 2 "+CMS ERROR: 321"
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: Checking line: +CMS ERROR: 321
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: AT reply state: 5
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: RECEIVED frametype 0x00/length 0x1E/30
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 41A|54T|2B+|43C|4DM|47G|52R|3D=|322|311|0D |0D |0A |2B+|43C|4DM AT+CMGR=21...+CM
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 53S|20 |45E|52R|52R|4FO|52R|3A:|20 |333|322|311|0D |0A S ERROR: 321..
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: CMS Error 321: "invalid memory index"
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: SMS folder 0 & location 22 -> ATGEN folder 1 & location 22
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: Getting SMS
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: SENDING frametype 0x00/length 0x0B/11
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 41A|54T|2B+|43C|4DM|47G|52R|3D=|322|322|0D AT+CMGR=22.
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 1 "AT+CMGR=22"
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 2 "+CMS ERROR: 321"
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: Checking line: +CMS ERROR: 321
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: AT reply state: 5
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: RECEIVED frametype 0x00/length 0x1E/30
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 41A|54T|2B+|43C|4DM|47G|52R|3D=|322|322|0D |0D |0A |2B+|43C|4DM AT+CMGR=22...+CM
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 53S|20 |45E|52R|52R|4FO|52R|3A:|20 |333|322|311|0D |0A S ERROR: 321..
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: CMS Error 321: "invalid memory index"
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 1 "+CMS ERROR: 321"
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: Checking line: +CMS ERROR: 321
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: AT reply state: 5
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: RECEIVED frametype 0x00/length 0x11/17
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 2B+|43C|4DM|53S|20 |45E|52R|52R|4FO|52R|3A:|20 |333|322|311|0D +CMS ERROR: 321.
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: 0A
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu:
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: UNKNOWN frame. If you can, please report it (see <http://wammu.eu/support/bugs/>). Thank you
Sat 2015/11/28 10:45:47 gammu-smsd[5984]: gammu: LAST SENT frame type 0x00/length 11
Full log here
smsdlog.txt
gammurc file
gammurc.txt
smsdrc file
smsdrc.txt
Thanks
April 28, 2015
10:03 am
Henk Helmantel
Admin
Forum Posts: 1396
Member Since:
May 28, 2013
Offline
Hello Paulo,
CMS ERROR 321 means that Diafaan SMS Server tries to remove a received SMS message from the modem but that the remove command fails. Sometimes this problem happens because the modem uses the wrong memory location for the remove command. If this is the case you can try to set the ‘ModemInitializationBeginning’ property in the advanced settings of the GSM Modem Gateway to
AT+CPMS=»SM»,»SM»,»SM»
(the best settings for other modem types may be different).
If that does not help, I would like to have a look at the communication log of the modem (http://www.diafaan.com/how-to/log-modem-problems/). You can send the log to dms@diafaan.com.
The disconnect and the long time to reconnect is the result of a reboot of the modem by Diafaan SMS Server. The reboot does a full restart of the modem and it generally solves all kind of network connection problems but it can also slow down the message throughput considerably. You can disable this reboot if you set the ‘RebootBeforeInitialization’ property in the advanced settings of the GSM Modem Gateway to ‘False’.
Regards, Henk
April 27, 2015
9:43 pm
Paulo
Guest
Guests
I have a q2403 wavecom chipeira with modules and searching the internet I found your management software, which is apparently very powerful, I have the trial version of the software more the same is giving this error when receiving messages The GSM Modem returned + CMS ERROR: 321 (invalid memory index) after the AT + CMGD = 2 command.
This shipping normally, without any problems, more to enable receiving messages it presents this problem impeding shipments because desconcta door and takes too long to reconnect again.
Waiting for contact because I am very interested in the tool.
Коды ошибок запуска программы и отправки СМС:
0 Сообщение отправлено, и модем/телефон подтвердил успешную отправку сообщения. 2 На компьютере нет указанного последовательного порта или не найден указанный конф. файл. 5 Не удалось открыть указанный порт COM ("нет доступа", скорее всего, порт был занят другой программой). 87 Ошибка в параметрах запуска программы или параметрах смс. 121 Нет ответа от модема. 1460 Нет ответа от модема (тайм-аут) 7012 Модем не найден 536870912 Ошибка отправки СМС. 536870929 Модем отклонил попытку отправки сообщения 536870931 Модем сообщил об ошибке отправки 536870932 Модем не сообщил результат отправки 536870933 Получен неправильный ответ модема 536870934 Ошибка ответа модема 536870935 Одна или несколько частей длинного сообщения не были отправлены из-за ошибок (этот код ошибки только для длинных сообщений) 536870936 Все части длинного сообщения не были отправлены из-за ошибок (этот код ошибки только для длинных сообщений)
Коды ошибок CME ERROR – GSM Equipment related codes
CME ERROR: 0 Phone failure CME ERROR: 1 No connection to phone CME ERROR: 2 Phone adapter link reserved CME ERROR: 3 Operation not allowed CME ERROR: 4 Operation not supported CME ERROR: 5 PH_SIM PIN required CME ERROR: 6 PH_FSIM PIN required CME ERROR: 7 PH_FSIM PUK required CME ERROR: 10 SIM not inserted CME ERROR: 11 SIM PIN required CME ERROR: 12 SIM PUK required CME ERROR: 13 SIM failure CME ERROR: 14 SIM busy CME ERROR: 15 SIM wrong CME ERROR: 16 Incorrect password CME ERROR: 17 SIM PIN2 required CME ERROR: 18 SIM PUK2 required CME ERROR: 20 Memory full CME ERROR: 21 Invalid index CME ERROR: 22 Not found CME ERROR: 23 Memory failure CME ERROR: 24 Text string too long CME ERROR: 25 Invalid characters in text string CME ERROR: 26 Dial string too long CME ERROR: 27 Invalid characters in dial string CME ERROR: 30 No network service CME ERROR: 31 Network timeout CME ERROR: 32 Network not allowed, emergency calls only CME ERROR: 40 Network personalization PIN required CME ERROR: 41 Network personalization PUK required CME ERROR: 42 Network subset personalization PIN required CME ERROR: 43 Network subset personalization PUK required CME ERROR: 44 Service provider personalization PIN required CME ERROR: 45 Service provider personalization PUK required CME ERROR: 46 Corporate personalization PIN required CME ERROR: 47 Corporate personalization PUK required CME ERROR: 48 PH-SIM PUK required CME ERROR: 100 Unknown error CME ERROR: 103 Illegal MS CME ERROR: 106 Illegal ME CME ERROR: 107 GPRS services not allowed CME ERROR: 111 PLMN not allowed CME ERROR: 112 Location area not allowed CME ERROR: 113 Roaming not allowed in this location area CME ERROR: 126 Operation temporary not allowed CME ERROR: 132 Service operation not supported CME ERROR: 133 Requested service option not subscribed CME ERROR: 134 Service option temporary out of order CME ERROR: 148 Unspecified GPRS error CME ERROR: 149 PDP authentication failure CME ERROR: 150 Invalid mobile class CME ERROR: 256 Operation temporarily not allowed CME ERROR: 257 Call barred CME ERROR: 258 Phone is busy CME ERROR: 259 User abort CME ERROR: 260 Invalid dial string CME ERROR: 261 SS not executed CME ERROR: 262 SIM Blocked CME ERROR: 263 Invalid block CME ERROR: 772 SIM powered down
Коды ошибок CMS Error – GSM Network related codes
CMS ERROR: 1 Unassigned number CMS ERROR: 8 Operator determined barring CMS ERROR: 10 Call bared CMS ERROR: 21 Short message transfer rejected CMS ERROR: 27 Destination out of service CMS ERROR: 28 Unindentified subscriber CMS ERROR: 29 Facility rejected CMS ERROR: 30 Unknown subscriber CMS ERROR: 38 Network out of order CMS ERROR: 41 Temporary failure CMS ERROR: 42 Congestion CMS ERROR: 47 Recources unavailable CMS ERROR: 50 Requested facility not subscribed CMS ERROR: 69 Requested facility not implemented CMS ERROR: 81 Invalid short message transfer reference value CMS ERROR: 95 Invalid message unspecified CMS ERROR: 96 Invalid mandatory information CMS ERROR: 97 Message type non existent or not implemented CMS ERROR: 98 Message not compatible with short message protocol CMS ERROR: 99 Information element non-existent or not implemente CMS ERROR: 111 Protocol error, unspecified CMS ERROR: 127 Internetworking , unspecified CMS ERROR: 128 Telematic internetworking not supported CMS ERROR: 129 Short message type 0 not supported CMS ERROR: 130 Cannot replace short message CMS ERROR: 143 Unspecified TP-PID error CMS ERROR: 144 Data code scheme not supported CMS ERROR: 145 Message class not supported CMS ERROR: 159 Unspecified TP-DCS error CMS ERROR: 160 Command cannot be actioned CMS ERROR: 161 Command unsupported CMS ERROR: 175 Unspecified TP-Command error CMS ERROR: 176 TPDU not supported CMS ERROR: 192 SC busy CMS ERROR: 193 No SC subscription CMS ERROR: 194 SC System failure CMS ERROR: 195 Invalid SME address CMS ERROR: 196 Destination SME barred CMS ERROR: 197 SM Rejected-Duplicate SM CMS ERROR: 198 TP-VPF not supported CMS ERROR: 199 TP-VP not supported CMS ERROR: 208 D0 SIM SMS Storage full CMS ERROR: 209 No SMS Storage capability in SIM CMS ERROR: 210 Error in MS CMS ERROR: 211 Memory capacity exceeded CMS ERROR: 212 Sim application toolkit busy CMS ERROR: 213 SIM data download error CMS ERROR: 255 Unspecified error cause CMS ERROR: 300 ME Failure CMS ERROR: 301 SMS service of ME reserved CMS ERROR: 302 Operation not allowed CMS ERROR: 303 Operation not supported CMS ERROR: 304 Invalid PDU mode parameter CMS ERROR: 305 Invalid Text mode parameter CMS ERROR: 310 SIM not inserted CMS ERROR: 311 SIM PIN required CMS ERROR: 312 PH-SIM PIN required CMS ERROR: 313 SIM failure CMS ERROR: 314 SIM busy CMS ERROR: 315 SIM wrong CMS ERROR: 316 SIM PUK required CMS ERROR: 317 SIM PIN2 required CMS ERROR: 318 SIM PUK2 required CMS ERROR: 320 Memory failure CMS ERROR: 321 Invalid memory index CMS ERROR: 322 Memory full CMS ERROR: 330 SMSC address unknown CMS ERROR: 331 No network service CMS ERROR: 332 Network timeout CMS ERROR: 340 No +CNMA expected CMS ERROR: 500 Unknown error CMS ERROR: 512 User abort CMS ERROR: 513 Unable to store CMS ERROR: 514 Invalid Status CMS ERROR: 515 Device busy or Invalid Character in string CMS ERROR: 516 Invalid length CMS ERROR: 517 Invalid character in PDU CMS ERROR: 518 Invalid parameter CMS ERROR: 519 Invalid length or character CMS ERROR: 520 Invalid character in text CMS ERROR: 521 Timer expired CMS ERROR: 522 Operation temporary not allowed CMS ERROR: 532 SIM not ready CMS ERROR: 534 Cell Broadcast error unknown CMS ERROR: 535 Protocol stack busy CMS ERROR: 538 Invalid parameter
Status of a previously submitted SMS-SUBMIT (статус отправленного сообщения SMS-SUBMIT)
Short message transaction completed 0000000 Short message received by the SME 0000001 Short message forwarded by the SC to the SME but the SC is unable to confirm delivery 0000010 Short message replaced by the SC Reserved values 0000011..0001111 Reserved 0010000..0011111 Values specific to each SC Temporary error, SC still trying to transfer SM 0100000 Congestion 0100001 SME busy 0100010 No response from SME 0100011 Service rejected 0100100 Quality of service not available 0100101 Error in SME 0100110..0101111 Reserved 0110000..0111111 Values specific to each SC Permanent error, SC is not making any more transfer attempts 1000000 Remote procedure error 1000001 Incompatible destination 1000010 Connection rejected by SME 1000011 Not obtainable 1000100 Quality of service not available 1000101 No interworking available 1000110 SM Validity Period Expired 1000111 SM Deleted by originating SME 1001000 SM Deleted by SC Administration 1001001 SM does not exist (The SM may have previously existed in the SC but the SC no longer has knowledge of it or the SM may never have previously existed in the SC) 1001010..1001111 Reserved 1010000..1011111 Values specific to each SC Temporary error, SC is not making any more transfer attempts 1100000 Congestion 1100001 SME busy 1100010 No response from SME 1100011 Service rejected 1100100 Quality of service not available 1100101 Error in SME 1100110..1101001 Reserved 1101010..1101111 Reserved 1110000..1111111 Values specific to each SC
The
final result codes OK and ERROR are available to all AT commands.
Unlike OK and ERROR, the +CMS ERROR final result code is only
available to SMS AT commands. It notifies you about the occurrence of
a message service failure.
16.2.1. The +CMS
ERROR Final Result Code — Notifies the Occurrences and Causes of
Message Service Failures
The
+CMS ERROR final result code is returned when a message service
failure occurs. An error code is provided for programmers to check
what causes the message service failure. The +CMS ERROR final result
code is specific to SMS AT commands, i.e. the +CMS ERROR final result
code will only be outputted by AT commands that are used to perform
tasks related to SMS messaging. Below are the SMS AT commands that
may output the final result code +CMS ERROR:
-
+CMGC
(command name in text: Send Command) -
+CMGD
(command name in text: Delete Message) -
+CMGL
(command name in text: List Messages) -
+CMGR
(command name in text: Read Message) -
+CMGS
(command name in text: Sending Message) -
+CMGW
(command name in text: Write Message to Memory) -
+CMSS
(command name in text: Send Message from Storage) -
+CNMA
(command name in text: New Message Acknowledgement to ME/TA) -
+CNMI
(command name in text: New Message Indications to TE) -
+CPMS
(command name in text: Preferred Message Storage) -
+CRES
(command name in text: Restore Settings) -
+CSAS
(command name in text: Save Settings) -
+CSMS
(command name in text: Select Message Service)
The
syntax of the +CMS ERROR final result code is:
<CR><LF>+CMS
ERROR: error_code<CR><LF>
Just
as the final result codes OK and ERROR, the +CMS ERROR final result
code always starts and ends with a carriage return character and a
linefeed character. error_code is an integer that is
associated to a certain error. A list of some error codes and their
meanings can be found in «Table
of +CMS Error Codes and Their Meanings».
As
mentioned earlier, after the execution of a command line, only one
final result code is returned. Hence, when an error occurs, you will
not find both +CMS ERROR and ERROR in the command response. For
errors related to SMS messaging, the +CMS ERROR final result code is
returned. For other errors such as invalid command syntax and
unsupported AT command, the ERROR final result code is returned as
usual.
Below
shows some common causes of +CMS errors:
-
A
SIM card is not present in the GSM/GPRS modem or mobile phone. -
The
SIM card requires a password (e.g. PIN, PIN2, PUK and PUK2) but you
have not entered it. -
An
invalid memory index is assigned to an AT command. -
The
memory of the GSM/GPRS modem, mobile phone or SIM card for storing
SMS messages is full. -
The
SMSC address is unknown or incorrect.
Following
is an example that demonstrates the usage of the +CMS ERROR result
code. Let’s say there is only one SMS text message stored on our
Nokia 6021 and it is stored in the memory location at index 1. If we
enter the command line «AT+CMGR=11» (it means «to read
the SMS message at memory index 11»), Nokia 6021 will return a
+CMS error:
AT+CMGR=11<CR>
<CR><LF>+CMS
ERROR: 321<CR><LF>
As
mentioned earlier, when a terminal program such as HyperTerminal of
Microsoft Windows sees a carriage return character, it moves the
cursor to the beginning of the current line. When it sees a linefeed
character, it moves the cursor to the same position on the next line.
Hence, the command line you entered, together with the response
returned, will be displayed like this in a terminal program such as
HyperTerminal of Microsoft Windows:
AT+CMGR=11
+CMS
ERROR: 321
To
find out the meaning of the +CMS error code 321, go to «Table
of +CMS Error Codes and Their Meanings». From there, we know
that the read message operation failed because an invalid memory
index was assigned to the AT command +CMGR.
Note
that after the occurrence of a +CMS error, the GSM/GPRS modem
or mobile phone will not process the remaining AT commands in the
command line. Thus, if the command line sent to Nokia 6021 is
«AT+CMGR=11;+CGMI» (+CGMI is the AT command for retrieving
the manufacturer name of the GSM/GPRS modem or mobile phone), you
will get the following result in Windows’ HyperTerminal:
AT+CMGR=11;+CGMI
+CMS
ERROR: 321
But
if the positions of the two AT commands in the command line are
exchanged, Nokia 6021 will output the result of the execution of the
AT command +CGMI before outputting the +CMS ERROR result code. Below
is the result displayed in Windows’ HyperTerminal:
AT+CGMI;+CMGR=11
Nokia
+CMS
ERROR: 321
16.2.1.1. Table of
+CMS Error Codes and Their Meanings
The
following table lists some of the +CMS error codes and their
meanings.
+CMS |
Meaning |
---|---|
300 |
Mobile |
301 |
SMS |
302 |
The |
303 |
The |
304 |
One or |
305 |
One or |
310 |
There |
311 |
The SIM |
312 |
The SIM |
313 |
SIM |
314 |
The SIM |
315 |
The SIM |
316 |
The SIM |
320 |
Memory/message |
321 |
The |
322 |
The |
330 |
The SMS |
331 |
No |
332 |
Network |
340 |
There |
500 |
An |
Contents at a Glance (Click Here for Full Table of Contents)
- 1. Introduction to SMS Messaging
- 2. What Makes SMS Messaging So Successful Worldwide?
- 3. Example Applications of SMS Messaging
- 4. What is an SMS Center / SMSC?
- 5. Basic Concepts of SMS Technology
- 6. Intra-operator SMS Messages
- 7. Inter-operator SMS Messages
- 8. International SMS Messages
- 9. What is an SMS Gateway?
- 10. How to Send SMS Messages from a Computer / PC?
- 11. How to Receive SMS Messages Using a Computer / PC?
- 12. Introduction to GSM / GPRS Wireless Modems
- 13. How to Use Microsoft HyperTerminal to Send AT Commands to a Mobile Phone or GSM/GPRS Modem?
- 14. Introduction to AT Commands
- 15. General Syntax of Extended AT Commands
- 16. Result Codes of AT Commands
- 17. AT Command Operations: Test, Set, Read and Execution
- 18. Testing the Communication between the PC and GSM/GPRS Modem or Mobile Phone
- 19. Checking if the GSM/GPRS Modem or Mobile Phone Supports the Use of AT Commands to Send, Receive and Read SMS Messages
- 20. Operating Mode: SMS Text Mode and SMS PDU Mode
- 21. Setting or Reading the Service Center Address / SMSC Address (AT+CSCA)
- 22. Preferred Message Storage (AT+CPMS)
- 23. Writing SMS Messages to Memory / Message Storage (AT+CMGW)
- 24. Deleting SMS Messages from Message Storage (AT+CMGD)
- 25. Sending SMS Messages from a Computer / PC Using AT Commands (AT+CMGS, AT+CMSS)
- 26. Reading SMS Messages from a Message Storage Area Using AT Commands (AT+CMGR, AT+CMGL)
- 27. Appendix A: How to Choose an SMS Service Provider (SMS Gateway Provider, SMS Reseller, SMS Broker)?
- 28. Appendix B: Comparison Table of SMS Service Providers (SMS Gateway Providers, SMS Resellers, SMS Brokers)
- 29. Appendix C: Free Software/Tools and Libraries for Sending and Receiving SMS Messages with a Computer / PC
- 30. Appendix D: GSM 7-bit Default Alphabet Table (with Character Codes of ISO 8859 Latin 1)
Feedback Form (ExpandCollapse)