SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Wed May 08, 2024 22:05
SMSTools3 Community » Help and support Bottom

[answered] +CMS ERROR: 500

  This topic is locked

Page:  1

Author Post
Member
Registered:
Sep 2009
Location: Russian Federation
I use smstools with nagios to send notification.
Some sms produce error 500 (unknown error)
I can't undestand what difference between sms produced error 500 and sms send without error
Here is example of sms with error 500:
PROBLEM: etax-srv: SSL Certificate is CRITICAL

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
In the configuration file smsd.conf, set loglevel = 7 and restart smsd. After you get next this kind of error, show the smsd.log content here, starting from the line containing "I have to send"...

It's not possible resolve this without seeing what is actually happening.

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner
Thank you for answer.
...
2009-09-17 14:37:34,6, GSM1: I have to send 1 short message for /var/spool/sms/checked/send_Vdaik
Y
2009-09-17 14:37:34,6, GSM1: Sending SMS from to 792198XXXXX
2009-09-17 14:37:34,6, GSM1: Checking if modem is ready
2009-09-17 14:37:34,7, GSM1: -> AT
2009-09-17 14:37:36,7, GSM1: Command is sent, waiting for the answer
2009-09-17 14:37:36,7, GSM1: <- OK
2009-09-17 14:37:36,6, GSM1: Pre-initializing modem
2009-09-17 14:37:36,7, GSM1: -> ATE0+CMEE=1
2009-09-17 14:37:42,7, GSM1: Command is sent, waiting for the answer
2009-09-17 14:37:42,7, GSM1: <- OK
2009-09-17 14:37:42,6, GSM1: Checking if Modem is registered to the network
2009-09-17 14:37:42,7, GSM1: -> AT+CREG?
2009-09-17 14:37:47,7, GSM1: Command is sent, waiting for the answer
2009-09-17 14:37:47,7, GSM1: <- +CREG: 0,1 OK
2009-09-17 14:37:47,6, GSM1: Modem is registered to the network
2009-09-17 14:37:47,6, GSM1: Selecting PDU mode
2009-09-17 14:37:47,7, GSM1: -> AT+CMGF=0
2009-09-17 14:37:52,7, GSM1: Command is sent, waiting for the answer
2009-09-17 14:37:53,7, GSM1: <- OK
2009-09-17 14:37:53,7, GSM1: -> AT+CMGS=96
2009-09-17 14:37:58,7, GSM1: Command is sent, waiting for the answer
2009-09-17 14:37:58,7, GSM1: <- >
2009-09-17 14:37:58,7, GSM1: -> PDU moved to private block
Hidden private text.


2009-09-17 14:39:38,7, GSM1: Command is sent, waiting for the answer
2009-09-17 14:39:38,7, GSM1: <- +CMS ERROR: 500
2009-09-17 14:39:38,7, GSM1: Explanation: Unknown error
2009-09-17 14:39:38,3, GSM1: The modem said ERROR or did not answer.
2009-09-17 14:39:38,5, GSM1: Waiting 10 sec. before retrying
...


« Last edit by keke on Thu Sep 17, 2009 11:33, 178 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
This is strange. It seems that there is nothing wrong with the format of this message. I also created similar message using Unicode and sent it back to my server. It worked well and the PDU was exactly the same as yours (of course with different phone number).

Does this destination number ever receive SMS successfully when sent from your server? Is there any difference between UCS2 and ISO (GSM) alphabet, if you have tried it?

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner
I can send SMS to the same phone number with other text.
Do I need make codeset conversation if I use onle 7-bit character?
I play with Alphabet:
Now I set it to
Alphabet: UCS2
And also add line to smssend script:
/usr/ucb/echo -n "$TEXT" | iconv -t UCS-2BE -f utf-8 >> $FILE
But it doesn't help.
I can even send sms using utf-8 with cyrillic. It works.

sendsms +7XXXXXXXXXX "PROBLEM: etax-srv: SSL Certificate is CRITICAL

smsd.log
...
2009-09-17 16:05:38,7, GSM1: -> 0011000B919712898342F80008FF5C00500052004F0042004C0045004D003A002
00065007400610078002D007300720076003A002000530053004C00200043006500720074006900660069006300610074
006500200069007300200043005200490054004900430041004C^Z
Here modem didn't answer long time and then got error
2009-09-17 16:07:28,7, GSM1: Command is sent, waiting for the answer
2009-09-17 16:07:28,7, GSM1: <- +CMS ERROR: 500
2009-09-17 16:07:28,7, GSM1: Explanation: Unknown error
2009-09-17 16:07:28,3, GSM1: The modem said ERROR or did not answer.


spool file

To: +7XXXXXXXXXX
Alphabet: UCS2
UDH: false

^@P^@R^@O^@B^@L^@E^@M^@:^@ ^@e^@t^@a^@x^@-^@s^@r^@v^@:^@ ^@S^@S^@L^@ ^@C^@e^@r^@t^@i^@f^@i^@c^@a
^@t^@e^@ ^@i^@s^@ ^@C^@R^@I^@T^@I^@C^@A^@L

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner
May be problem in some setting serial port in Solaris?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Quote
Do I need make codeset conversation if I use onle 7-bit character?

No, 7-bit and ISO goes with default settings. Characters outside the GSM alphabet are replaced, if there is an alternative, or removed if there is not. As your application talks english, you can also send more characters in one part of a message (160 vs. 70).

Quote
May be problem in some setting serial port in Solaris?

That's it! When a PDU is sent to the modem, it got broken and this causes the error.

You can verify this issue with changing modem settings:
init = ATE1+CMEE=1
pre_init = no


All the data is echoed back and it can be seen if there is a difference between sent and echoed PDU when the error next time occurs.

You have not disabled rtscts, or? Usually handshaking should be used. Perhaps you can also try a different baudrate, for example 9600 or 19200 if now using 115200 which is the default value.

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner
stty -a </dev/cua/1
speed 9600 baud;
rows = 0; columns = 0; ypixels = 0; xpixels = 0;
csdata ?
eucw ?, scrw ?
min = 0; time = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>;
eof = <undef>; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = <undef>; stop = <undef>; susp = <undef>; dsusp = <undef>;
rprnt = <undef>; flush = <undef>; werase = <undef>; lnext = <undef>;
-parenb -parodd cs8 -cstopb -hupcl cread clocal -loblk -crtscts -crtsxoff -parext
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -iuclc
-ixon -ixany -ixoff -imaxbel
-isig -icanon -xcase -echo -echoe -echok -echonl -noflsh
-tostop -echoctl -echoprt -echoke -defecho -flusho -pendin -iexten
-opost -olcuc -onlcr -ocrnl -onocr -onlret -ofill -ofdel

cat /etc/smsd.conf
devices = GSM1
logfile = /var/log/smsd.log
loglevel = 7

[GSM1]
device = /dev/cua/1
incoming = no
init = ATE1+CMEE=1
pre_init = no

Still the same error :(

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Quote
stty -a </dev/cua/1
speed 9600 baud;

That's what the stty says, but because you do not have baudrate defined in the smsd.conf, smsd will use 19200 with versions below 3.1.5, or 115200 with 3.1.5. What version of smsd you are actually using?

Quote
Still the same error :(

You had not disabled the handshaking, so it should be ok. But you could try to define baudrate = 9600 in the configuration.

There should be three retries for each message part, and after these the message is deleted permanently (because you do not use the failed folder).

Is it possible to try to send this kind of failed message (with exactly the same content) to the different GSM number, which probably is registered into the different network?

The most important thing: when running with init = ATE1+CMEE=1, did you verify the sent PDU against the echoed PDU? When an error still happened, is it sure that echoed string was exactly the same than what was sent?

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner
I set baudrate = 9600. Doesn't help

Quote
The most important thing: when running with init = ATE1+CMEE=1, did you verify the sent PDU against the echoed PDU? When an error still happened, is it sure that echoed string was exactly the same than what was sent?

How can I verify?

Quote
Is it possible to try to send this kind of failed message (with exactly the same content) to the different GSM number, which probably is registered into the different network?

Modem and phone which i send to is on the same gsm network.

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner


Seems that modem for some reason stop receive after 0011000B919712898342F80008FF5C00500052004F

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Ok, I was just writing my answer to the previous post, but I was too slow... ;)

Communication breaks before all of the data is sent. As you already have a lower baudrate, and you are using handshaking, smsd cannot do much more. You probably have a bad driver for serial port, or a broken cable. Perhaps it's a cable, even bad connectors can do this. Can you try to replace some hardware? :(

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner
ok
I'll try to change cable. I'll be difficult to do because servers are on Internet provider far from me.
But I still can't understand why modem can send some SMS.
I think if cable or connector is wrong modem can send nothing

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
You have not answered what version of smsd you are using... Assuming that you are using 3.1.5, you could try the following setting for a modem:
send_delay = 0

There obviously is a problem with handshaking, as the sending time is so long:
2009-09-17 22:01:14,7, GSM1: -> PDU
2009-09-17 22:06:17,7, GSM1: Command is sent, ...

That's the longest time I have ever seen...

Something is still broken, but the setting send_delay = 0 causes that the whole string is sent using single write command. By default, all characters are sent one at a time. Perhaps this may give some result, at least a different result... ;)

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
svs wrote
But I still can't understand why modem can send some SMS.

Bad to say for sure, but there can also be some other process which uses the port, even if it should not be used by other processes than a modem process of smsd.

If you can make a test with some 10-20 SMS, send these to your phone with a very short content, like "1" and "2" (without quotation marks) and so on. You can then see how often this failure happens. Your latest PDU show that SMS containing only single character might work.

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner
I use Smsd v3.1.3
I can send THE SAME sms that smstools failed to send using AT command:

ATZ0
OK
AT+CMGF=1
OK
AT+CNMI=2,1
OK
AT+CMGS=+7XXXXXXXXXX
> PROBLEM: etax-srv: SSL Certificate is CRITICAL▒
+CMGS: 76

OK

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner
I upgrade smstools to ver. 3.1.5 and set send_delay = 0
Now "wrong" SMSs send :)
I have one more question.
I set
incoming_utf8 = yes
decode_unicode_text = yes
But I can't read incoming SMS.
It's still in some internal codeset.
How can I covert it to utf-8?
What should I set to send sms with utf-8 text?
Thank you.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
svs wrote
I upgrade smstools to ver. 3.1.5 and set send_delay = 0
Now "wrong" SMSs send :)

Good, but it still is not known why transferring of characters has failed. There is still some problem and send_delay is just a workaround.

Your test using ascii mode is not fully complete because of the string sent was lot of shorter than the PDU sent by smsd.

You could use loglevel = notice and smart_logging = yes to detect possible failures in the future.

Quote
I set
incoming_utf8 = yes
decode_unicode_text = yes
But I can't read incoming SMS.
It's still in some internal codeset.
How can I covert it to utf-8?

With cyrillic languages decode_unicode_text should not be used. This is because internal alphabet of smsd is ISO, and received messages using UCS2 and containing cyrillic characters cannot be converted to ISO.

For received messages, set up an eventhandler:
eventhandler = /usr/local/bin/smsd_eventhandler

This kind of eventhandler will convert Unicode correctly:


Quote
What should I set to send sms with utf-8 text?

Just create an outgoing message file without Alphabet header and store the message body using UTF-8. The smsd will automatically convert UTF-8 to ISO and will send it using GSM character set.

Messages written using Unicode can be sent like you have already done. As an alternative way for handling outgoing message, the next script as a checkhandler can be used. All messages are written using UTF-8. Those which are known to not containing cyrillic characters can be sent without Alphabet header. Messages which should be sent using Unicode have Alphabet: UCS2 header. The checkhandler will detect this header and make the conversion if necessary.



Next version of smsd has built-in handling for character sets, including Unicode with cyrillic languages. However, it may take two or three months until this version is released.

Member
Registered:
Sep 2009
Location: Russian Federation
Topic owner
Thank you.
I understand the idea.
Solaris version of sed doesn't work.
I install GNU sed and now everything fine.
Thanks lot again.

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.