Re: CMS error 500

Florian Schlums <[email protected]>
Newsgroups gmane.comp.mobile.kannel.user,gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hello
Same issue here. We are running an Ubuntu 14.04 on a pcengines apu board 
with HP un2400 mini pci-e card on it.
Some times a week without problems, sometimes five times a day.
Our device only sends SMS. If it receices an SMS it sends it to a 
default mail address.

The error appears often from one to the other SMS:
2015-05-15 13:47:29 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: 
TP-Validity-Period: 24.0 hours
2015-05-15 13:47:29 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CMGS=71^M
2015-05-15 13:47:29 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- >
2015-05-15 13:47:29 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: send command 
status: 1
2015-05-15 13:47:29 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: --> 0011000A....
2015-05-15 13:47:29 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: --> ^Z
2015-05-15 13:47:29 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- >
2015-05-15 13:47:30 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- +CMGS: 219
2015-05-15 13:47:30 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2015-05-15 13:47:30 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: send command 
status: 0
2015-05-15 16:12:32 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: 
TP-Validity-Period: 24.0 hours
2015-05-15 16:12:32 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CMGS=71^M
2015-05-15 16:12:32 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- >
2015-05-15 16:12:32 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: send command 
status: 1
2015-05-15 16:12:32 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: --> 0011000A....
2015-05-15 16:12:32 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: --> ^Z
2015-05-15 16:12:32 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- >
2015-05-15 16:12:32 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- +CMS ERROR: 500
2015-05-15 16:12:32 [914] [6] ERROR: AT2[/dev/ttyUSB1]: CMS ERROR: +CMS 
ERROR: 500
2015-05-15 16:12:32 [914] [6] ERROR: AT2[/dev/ttyUSB1]: CMS ERROR: 
Unknown error. -> maybe Sim storage is full? I'll have a look at it. (500)
2015-05-15 16:12:32 [914] [6] DEBUG: AT2[/dev/ttyUSB1]: send command 
status: 1

And when it appears I have to clean it by hand. Otherwise it won't send 
any SMS anymore.
First we stopped and restarted kannel. Clear did not helped.
Then we just rebooted our smsgateway and were surprised as it didn't 
helped either.
Then somebody first plugged out the power cord. The server starts 
automatically after power on and then it works again.

There must be a way to reset the HP un2400 module without a hardcore 
reset of the whole device.
I've found a simple way to reset the module by:
echo -ne "AT+CFUN=1,1\r" > /dev/ttyUSB1
and within a script I tried:
CMS=`tail -n10 /var/log/kannel/smsc.log | grep 'ERROR'`
if [ "x$CMS" != "x" ]
then
         /etc/init.d/kannel stop
         echo -ne "AT+CFUN=1,1\r" > /dev/ttyUSB1 #  reset and activate 
device : https://www.anywi.com/3g/wiki/AtCommandCfun
         /etc/init.d/kannel start
fi

But that did not solved the problem every time.
So I made a half hardcore reset. :o)
CMS=`tail -n10 /var/log/kannel/smsc.log | grep 'ERROR'`
if [ "x$CMS" != "x" ]
then
         /etc/init.d/kannel stop
         echo -ne "AT+CFUN=1,1\r" > /dev/ttyUSB1 #  reset and activate 
device : https://www.anywi.com/3g/wiki/AtCommandCfun
         reboot
fi

Regards
Florian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.