Steven,
Looks like to determine the actual failure code you need to tell the
modem to report mobile equipment errors. To do that, add this AT command
to your kannel.conf config file for the modem's init-string:
+CMEE=1
Here's the line I use (look up the +CNMI command I use to see if it might
also be useful):
init-string = "AT+CMEE=1;+CNMI=2,1,0,0,0"
This will only change what you see coming back from the modem from
ERROR
to
+CME ERROR: xxx
or
+CMS ERROR: xxx
Kannel looks for these, will interpret the xxx error code that comes
back (if it knows about it) and will give you a more meaningful error
message. smsc_at.c has a routine called at2_error_string() that's
responsible for doing this translation.
I've attached an "enhanced" version of the at2_error_string() subroutine
which I use with my WAVECOM modems (actually MultiTech MTCBA-G-F1 Serial
and MTCBA-G-U-F1 USB modems) based on their AT command reference manual.
I was reluctant to submit it to the kannel repository only because I don't
know if these error messages always have the same meaning for other modems.
Some of the comments I added may be more useful than the actual message
printed, they're pretty much straight from the command reference.
Also since you're sending a PDU, verify that the modem is being setup to
use PDU mode as the preferred mode (as opposed to text; look into the
AT+CMGF command). That's probably the case, but it's worth mentioning.
Hope this helps you track down the problem.
Sydd
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Steven König
Sent: Saturday, May 27, 2006 5:41 PM
To: [email protected]
Subject: need help with wavecom modem
Hi,
i have a wavecom wmo2, debian (sarge), and kannel 1.4.0 installed.
My Problem is, that kannel connects to the modem without a problem.
But if I want to test sending a message i get the following Error in the
log :
2006-05-27 23:28:53 [28418] [7] INFO: AT2[/dev/ttyS0]: AT SMSC
successfully opened.
2006-05-27 23:29:15 [28418] [18] DEBUG: boxc_receiver: sms received
2006-05-27 23:29:15 [28418] [18] DEBUG: send_msg: sending msg to box:
<127.0.0.1>
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]:
TP-Validity-Period: 24.0 hours
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: --> AT+CMGS=19^M
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: <-- >
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: send command
status: 1
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: -->
0011000C811067122560210000A705E8309BFD06
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: --> ^Z
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: <-- >
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: <-- ERROR
2006-05-27 23:29:17 [28418] [7] ERROR: AT2[/dev/ttyS0]: Error occurs:
ERROR (error number not known to us. ask google and add it.)
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: send command
status: -1
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: --> AT+CMGS=19^M
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: <-- >
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: send command
status: 1
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: -->
0011000C811067122560210000A705E8309BFD06
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: --> ^Z
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: <-- >
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: <-- ERROR
2006-05-27 23:29:17 [28418] [7] ERROR: AT2[/dev/ttyS0]: Error occurs:
ERROR (error number not known to us. ask google and add it.)
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: send command
status: -1
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: --> AT+CMGS=19^M
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: <-- >
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: send command
status: 1
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: -->
0011000C811067122560210000A705E8309BFD06
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: --> ^Z
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: <-- >
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: <-- ERROR
2006-05-27 23:29:17 [28418] [7] ERROR: AT2[/dev/ttyS0]: Error occurs:
ERROR (error number not known to us. ask google and add it.)
2006-05-27 23:29:17 [28418] [7] DEBUG: AT2[/dev/ttyS0]: send command
status: -1
2006-05-27 23:29:17 [28418] [1] DEBUG: Dumping 0 messages and 0 acks to
store
Can anyone help me please. Is it a general problem with this type of
modem or could it be a configuration-failure?
I've tried a lot of different settings, if found in web by searching for
the problem, but none was working.
Hope anyone can help me.
thanks,
Steven
const char *at2_error_string(int code)
{
switch (code) {
case 0:
/*
* Default the code to 0 then when you extract the value from the
* modem response message and no code is found, 0 will result.
*/
return "Modem returned ERROR but no error code - possibly unsupported or
invalid command?";
case 1:
/*
* 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).
*/
return "Unassigned (unallocated) number";
case 3:
/*
* This can be a lot of things, depending upon the command, but in general
* it relates to trying to do a command when no connection exists.
*/
return "Operation not allowed at this time (connection may be required)";
case 4:
/*
* This can be a lot of things, depending upon the command, but in general
* it relates to invaid parameters being passed.
*/
return "Operation / Parameter(s) not supported";
case 8:
/*
* 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.
*/
return "Operator determined barring";
case 10:
/*
* This cause indicates that the outgoing call barred service applies to
* the short message service for the called destination.
*/
return "Call barred or SIM not inserted or card inserted not a SIM";
case 11:
return "SIM PIN required";
case 12:
return "SIM PUK required";
case 13:
return "SIM failure";
case 16:
return "Incorrect password";
case 17:
/*
* 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.
*/
return "Network failure";
case 18:
return "SIM PUK2 required";
case 20:
return "Memory full";
case 21:
/*
* 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.
*/
return "Short message transfer rejected";
case 22:
/*
* This cause is sent if the service request cannot be actioned because
* of congestion (e.g. no channel, facility busy/congested etc.). Or
* this cause indicates that the mobile station cannot store the
* incoming short message due to lack of storage capacity.
*/
return "Congestion or Memory capacity exceeded";
case 24:
return "Text string too long"; /* +CPBW, +CPIN, +CPIN2, +CLCK, +CPWD */
case 26:
return "Dial string too long"; /* +CPBW, ATD, +CCFC */
case 27:
/*
* 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.
* Also means "Invalid characters in dial string" for +CPBW.
*/
return "Destination out of service";
case 28:
/*
* This cause indicates that the subscriber is not registered in the PLMN
* (i.e. IMSI not known).
*/
return "Unidentified subscriber";
case 29:
/*
* This cause indicates that the facility requested by the Mobile Station
* is not supported by the PLMN.
*/
return "Facility rejected";
case 30:
/*
* This cause indicates that the subscriber is not registered in the HLR
* (i.e. IMSI or directory number is not allocated to a subscriber).
* Also means "No network service" for +VTS, +COPS=?, +CLCK, +CCFC,
+CCWA, +CUSD
*/
return "Unknown subscriber or No network service";
case 32:
return "Network not allowed � emergency calls only"; /* +COPS */
case 38:
/*
* 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.
*/
return "Network out of order";
case 40:
return "Network personal PIN required (Network lock)";
case 41:
/*
* 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.
*/
return "Temporary failure";
case 42:
/*
* This cause indicates that the short message service cannot be serviced
* because of high traffic.
*/
return "Congestion";
case 47:
/*
* This cause is used to report a resource unavailable event only when no
* other cause applies.
*/
return "Resources unavailable, unspecified";
case 50:
/*
* 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.
*/
return "Requested facility not subscribed";
case 69:
/*
* This cause indicates that the network is unable to provide the
* requested short message service.
*/
return "Requested facility not implemented";
case 81:
/*
* 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.
*/
return "Invalid short message transfer reference value";
case 95:
/*
* This cause is used to report an invalid message event only when no
* other cause in the invalid message class applies.
*/
return "Invalid message, unspecified";
case 96:
/*
* 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).
*/
return "Invalid mandatory information";
case 97:
/*
* 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.
*/
return "Message type non-existent or not implemented";
case 98:
/*
* 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.
*/
return "Message not compatible with short message protocol state";
case 99:
/*
* 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.
*/
return "Information element non-existent or not implemented";
case 103:
return "Illegal MS (#3)"; /* +CGATT */
case 106:
return "Illegal ME (#6)"; /* +CGATT */
case 107:
return "GPRS services not allowed (#7)"; /* +CGATT */
case 111:
/*
* This cause is used to report a protocol error event only when no other
* cause applies.
* Also means "PLMN not allowed (#11)" for +CGATT
*/
return "Protocol error, unspecified or PLMN not allowed (#11)";
case 112:
return "Location area not allowed (#12)"; /* +CGATT */
case 113:
return "Roaming not allowed in this area (#13)"; /* +CGATT */
case 127:
/*
* 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.
*/
return "Interworking, unspecified";
case 128:
/*
*/
return "Telematic interworking not supported x";
case 129:
/*
*/
return "Short message Type 0 not supported x x";
case 130:
/*
*/
return "Cannot replace short message x x";
case 132:
return "service option not supported (#32)"; /* +CGACT +CGDATA ATD*99 */
case 133:
return "requested service option not subscribed (#33)"; /* +CGACT +CGDATA
ATD*99 */
case 134:
return "service option temporarily out of order (#34)"; /* +CGACT +CGDATA
ATD*99 */
case 143:
/*
*/
return "Unspecified TP-PID error x x";
case 144:
/*
*/
return "Data coding scheme (alphabet) not supported x";
case 145:
/*
*/
return "Message class not supported x";
case 148:
return "unspecified GPRS error";
case 149:
return "PDP authentication failure"; /* +CGACT +CGDATA ATD*99 */
case 150:
return "invalid mobile class";
case 159:
/*
*/
return "Unspecified TP-DCS error x x";
case 160:
/*
*/
return "Command cannot be actioned x";
case 161:
/*
*/
return "Command unsupported x";
case 175:
/*
*/
return "Unspecified TP-Command error x";
case 176:
/*
*/
return "TPDU not supported x x";
case 192:
/*
*/
return "SC busy x";
case 193:
/*
*/
return "No SC subscription x";
case 194:
/*
*/
return "SC system failure x";
case 195:
/*
*/
return "Invalid SME address x";
case 196:
/*
*/
return "Destination SME barred x";
case 197:
/*
*/
return "SM Rejected-Duplicate SM x";
case 198:
/*
*/
return "TP-VPF not supported X";
case 199:
/*
*/
return "TP-VP not supported X";
case 208:
/*
*/
return "DO SIM SMS storage full x";
case 209:
/*
*/
return "No SMS storage capability in SIM x";
case 210:
/*
*/
return "Error in MS x";
case 211:
/*
*/
return "Memory Capacity Exceeded X";
case 212:
/*
*/
return "SIM Application Toolkit Busy x x";
case 213:
/*
*/
return "SIM data download error";
case 255:
/*
*/
return "Unspecified error cause";
case 300:
/*
*/
return "ME failure";
case 301:
/*
*/
return "SMS service of ME reserved";
case 302:
/*
*/
return "Operation not allowed";
case 303:
/*
*/
return "Operation not supported";
case 304:
/*
*/
return "Invalid PDU mode parameter";
case 305:
/*
*/
return "Invalid text mode parameter";
case 310:
/*
*/
return "SIM not inserted";
case 311:
/*
*/
return "SIM PIN required";
case 312:
/*
*/
return "PH-SIM PIN required";
case 313:
/*
*/
return "SIM failure";
case 314:
/*
*/
return "SIM busy";
case 315:
/*
*/
return "SIM wrong";
case 316:
/*
*/
return "SIM PUK required";
case 317:
/*
*/
return "SIM PIN2 required";
case 318:
/*
*/
return "SIM PUK2 required";
case 320:
/*
*/
return "Memory failure";
case 321:
/*
*/
return "Invalid memory index -> don't worry, just memory fragmentation.";
case 322:
/*
*/
return "Memory full";
case 330:
/*
*/
return "SMSC address unknown";
case 331:
/*
*/
return "No network service";
case 332:
/*
*/
return "Network timeout";
case 340:
/*
*/
return "NO +CNMA ACK EXPECTED";
case 500:
/*
*/
return "Unknown error. -> maybe Sim storage is full? I'll have a look at
it.";
case 512:
/*
* Resulting from +CMGS, +CMSS
*/
return "User abort or MM establishment failure (SMS)";
case 513:
/*
* Resulting from +CMGS, +CMSS
*/
return "Lower layer falure (SMS)";
case 514:
/*
* Resulting from +CMGS, +CMSS
*/
return "CP error (SMS)";
case 515:
/*
*/
return "Please wait, service not available, init or command in progress";
case 517:
/*
* Resulting from +STGI
*/
return "SIM ToolKit facility not supported";
case 518:
/*
* Resulting from +STGI
*/
return "SIM ToolKit indication not received";
case 519:
/*
* Resulting from +ECHO, +VIP
*/
return "Reset the product to activate or change a new echo cancellation
algorithm";
case 520:
/*
* Resulting from +COPS=?
*/
return "Automatic abort about get plmn list for an incoming call";
case 526:
/*
* Resulting from +CLCK
*/
return "PIN deactivation forbidden with this SIM card";
case 527:
/*
* Resulting from +COPS
*/
return "Please wait, RR or MM is busy. Retry your selection later";
case 528:
/*
* Resulting from +COPS
*/
return "Location update failure. Emergency calls only";
case 529:
/*
* Resulting from +COPS
*/
return "PLMN selection failure. Emergency calls only";
case 531:
/*
* Resulting from +CMGS, +CMSS
*/
return "SMS not sent: the <da> is not in FDN phonebook, and FDN lock is
enabled";
case 532:
/*
* Resulting from +WOPEN
*/
return "The embedded application is activated so the objects flash are
not erased.";
case 533:
/*
* Resulting from +ATD*99,+GACT,+CGDATA
*/
return "Missing or unknown APN";
default:
/*
*/
/*fprintf(stderr,"at2_error_string(%d[0x%d]) unknown error
code\n",code,code);*//*DEBUG*/
return "error number not known to us. Ask google and add it.";
}
}