When sending and/or receiving SMS messages with a GSM modem, if an error occurs, the modem will report a “+CMS ERROR” with a numeric code to indicate the reason for the problem. These error codes are defined in the ETSI GSM specifications, specifically GSM 07.05, GSM 03.40 and GSM 04.11.
I posted a list of CMS ERROR codes on the NowSMS discussion board almost 5 years ago at http://www.nowsms.com/discus/messages/1/829.html.
It’s a useful reference that I seem to search for a few times every month, so to make the information easier to find, I figured I would post it here.
Before I get to the list, and the sometimes cryptic definitions defined in the specifications, I want to highlight a few of the error codes that seem to occur most frequently.
+CMS ERROR 500 is probably the most commonly observed error code. The specifications define this as “unknown error”. So, of course, that is the error code that many modems return for almost any reason. Most frequently, it seems that this error occurs when the modem simply does not have a signal, or it has too weak of a signal. It’s a good idea to check the signal strength of the modem, and possibly relocate the modem so that it can acquire a stronger signal from the mobile operator.
+CMS ERROR 500 can also occur in situations where the mobile operator does not have SMS over GPRS (or SMS over 3G packet data) enabled. The default behaviour with most dedicated GSM modem devices is to try to send SMS over the packet network, and if this fails, fallback to the circuit switched network. However, in some environments, the modem doesn’t know how to interpret the failure, and the fallback does not occur properly. To determine if this is the problem, try going into “Properties” for the modem in the “SMSC” list of NowSMS, and change “SMS Access” to “GSM”.
+CMS ERROR 330 occurs frequently with 3G modems, it means that the address of the operator SMSC is not defined. It seems to be a bug in commonly used modem chipsets, where they do not read this address automatically from the SIM. To resolve this error, you need to manually define the operator SMSC address in the NowSMS configuration.
You can set the SMSC address by manually editing the SMSGW.INI file. Under the section header for the modem configuration (e.g., [Modem - ...], add SMSC=+phonenumber, where “+phonenumber” is the address of the SMSC. The best way to find this SMSC address is to move the SIM card from the modem temporarily to a phone, and go through the SMS configuration menus on the phone to determine the currently configured SMSC number. When you enter the SMSC phone number, always start it with a “+” and don’t include any other non-numeric characters (no dashes or dots) in the address.
Always restart the gateway service after making a change to the SMSGW.INI file.
If you try setting the SMSC value by manually editing SMSGW.INI … if the setting doesn’t make a difference, always go back in and remove it immediately so that it doesn’t confuse things down the road.
+CMS ERROR 304 occurs frequently when using Motorola phones as a modem. Basically, these modems have a bug that prevent them from being able to send any messages that include UDH (User Data Header). This includes almost all types of binary messages, as well as long text messages. There is no resolution for this problem, other than to use a different modem that does not suffer from this bug.
+CMS ERROR 512 is defined as a manufacturer specific error. From what we’ve seen, when this error occurs, it is usually the same as error 500.
General Troubleshooting Tips
Before I get into the full CMS ERROR code list, it may be worth offering some general troubleshooting tips, as the error codes themselves are usually quite cryptic.
- In the “SMSC” list, highlight the modem and press “Properties”. Try changing the “SMS Access” to “GSM”.
- Remove the SIM card from the modem, and put it into a mobile phone. Verify that you can actually send SMS messages using the SMS client in the mobile phone. If you cannot, then there may be a problem with your account with the mobile operator. (Note: We have observed that with some mobile operators, if you buy a modem with a SIM card, they assume that the modem is going to be used for internet access, and SMS capabilities are not provisioned for the account.)
- Check the signal strength of the modem. Connect to the modem using HyperTerminal, and issue the command AT+CSQ. This will return a result in the format +CSQ: xx,yy. If the xx value is 99 (no signal), or lower than 10, you may have a signal problem. It’s subjective, but I like to see this value as at least 16.
CMS ERROR Code List
1 – “Unassigned (unallocated) number”
This cause indicates that the destination requested by the Mobile Station cannot be reached because, although the number is in a valid format, it is not currently assigned (allocated).
8 – “Operator determined barring”
This cause indicates that the MS has tried to send a mobile originating short message when the MS’s network operator or service provider has forbidden such transactions.
10 – “Call barred”
This cause indicates that the outgoing call barred service applies to the short message service for the called destination.
17 – “Network failure”.
This cause is sent to the MS if the MSC cannot service an MS generated request because of PLMN failures, e.g. problems in MAP.
21 – “Short message transfer rejected”
This cause indicates that the equipment sending this cause does not wish to accept this short message, although it could have accepted the short message since the equipment sending this cause is neither busy nor incompatible.
22 – “Congestion”.
This cause is sent if the service request cannot be actioned because of congestion (e.g. no channel, facility busy/congested etc.).
22 – “Memory capacity exceeded”.
This cause indicates that the mobile station cannot store the incoming short message due to lack of storage capacity.
Note that error “22″ is defined twice. It is likely that “CMS ERROR 22″ would be due to the first definition, while the second definition is likely to only be a status code for delivery reports.
27 – “Destination out of service”
This cause indicates that the destination indicated by the Mobile Station cannot be reached because the interface to the destination is not functioning correctly. The term “not functioning correctly” indicates that a signalling message was unable to be delivered to the remote user; e.g., a physical layer or data link layer failure at the remote user, user equipment off-line, etc.
28 – “Unidentified subscriber”
This cause indicates that the subscriber is not registered in the PLMN (i.e. IMSI not known).
29 – “Facility rejected”
This cause indicates that the facility requested by the Mobile Station is not supported by the PLMN.
30 – “Unknown subscriber”
This cause indicates that the subscriber is not registered in the HLR (i.e. IMSI or directory number is not allocated to a subscriber).
38 – “Network out of order”
This cause indicates that the network is not functioning correctly and that the condition is likely to last a relatively long period of time; e.g., immediately reattempting the short message transfer is not likely to be successful.
41 – “Temporary failure”
This cause indicates that the network is not functioning correctly and that the condition is not likely to last a long period of time; e.g., the Mobile Station may wish to try another short message transfer attempt almost immediately.
42 – “Congestion”
This cause indicates that the short message service cannot be serviced because of high traffic.
47 – “Resources unavailable, unspecified”
This cause is used to report a resource unavailable event only when no other cause applies.
50 – “Requested facility not subscribed”
This cause indicates that the requested short message service could not be provided by the network because the user has not completed the necessary administrative arrangements with its supporting networks.
69 – “Requested facility not implemented”
This cause indicates that the network is unable to provide the requested short message service.
81 – “Invalid short message transfer reference value”
This cause indicates that the equipment sending this cause has received a message with a short message reference which is not currently in use on the MS-network interface.
95 – “Invalid message, unspecified”
This cause is used to report an invalid message event only when no other cause in the invalid message class applies.
96 – “Invalid mandatory information”
This cause indicates that the equipment sending this cause has received a message where a mandatory information element is missing and/or has a content error (the two cases are indistinguishable).
97 – “Message type non-existent or not implemented”
This cause indicates that the equipment sending this cause has received a message with a message type it does not recognize either because this is a message not defined or defined but not implemented by the equipment sending this cause.
98 – “Message not compatible with short message protocol state”
This cause indicates that the equipment sending this cause has received a message such that the procedures do not indicate that this is a permissible message to receive while in the short message transfer state.
99 – “Information element non-existent or not implemented”
This cause indicates that the equipment sending this cause has received a message which includes information elements not recognized because the information element identifier is not defined or it is defined but not implemented by the equipment sending the cause. However, the information element is not required to be present in the message in order for the equipment sending the cause to process the message.
111 – “Protocol error, unspecified”
This cause is used to report a protocol error event only when no other cause applies.
127 – “Interworking, unspecified”
This cause indicates that there has been interworking with a network which does not provide causes for actions it takes; thus, the precise cause for a message which is being send cannot be ascertained.
0…127 – Other values in this range are reserved, defined by GSM 04.11 Annex E-2 values
128 – Telematic interworking not supported x
129 – Short message Type 0 not supported x x
130 – Cannot replace short message x x
143 – Unspecified TP-PID error x x
144 – Data coding scheme (alphabet) not supported x
145 – Message class not supported x
159 – Unspecified TP-DCS error x x
160 – Command cannot be actioned x
161 – Command unsupported x
175 – Unspecified TP-Command error x
176 – TPDU not supported x x
192 – SC busy x
193 – No SC subscription x
194 – SC system failure x
195 – Invalid SME address x
196 – Destination SME barred x
197 – SM Rejected-Duplicate SM x
198 – TP-VPF not supported X
199 – TP-VP not supported X
208 – SIM SMS storage full x
209 – No SMS storage capability in SIM x
210 – Error in MS x
211 – Memory Capacity Exceeded X
212 – SIM Application Toolkit Busy x x
255 – Unspecified error cause
128…255 – Other values in this range are reserved, defined by GSM 03.40 subclause 126.96.36.199 values
300 – ME failure
301 – SMS service of ME reserved
302 – operation not allowed
303 – operation not supported
304 – invalid PDU mode parameter
305 – invalid text mode parameter
310 – SIM not inserted
311 – SIM PIN required
312 – PH-SIM PIN required
313 – SIM failure
314 – SIM busy
315 – SIM wrong
316 – SIM PUK required
317 – SIM PIN2 required
318 – SIM PUK2 required
320 – memory failure
321 – invalid memory index
322 – memory full
330 – SMSC address unknown
331 – no network service
332 – network timeout
340 – no +CNMA acknowledgement expected
500 – unknown error
256…511 – Other values in this range are reserved
512… – manufacturer specific
For comments and further discussion, please click here to visit the NowSMS Technical Forums (Discussion Board)...