SMS Server Tools 3
 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. The forum is currently read-only, but will open soon. Fri Nov 22, 2024 02:25
SMSTools3 Community » Help and support Bottom

[solved] PPC platform problem

  This topic is locked

Page:  1  2  Next

Author Post
Member
Registered:
Oct 2009
Location: Latvia
Operating system name and version: Debian on PPC
Version of smsd: 3.1.11
Smsd installed from: sources
Name and model of a modem: Nokia N30
Interface: USB with serial adapter

I have very similar behaviour like year ago: http://smstools3.kekekasvi.com/topic.php?id=187
I haved did not yet detailed info as it has happened just couple times and I did not yet collect the information from logs and etc..

Could it be the similar problem with PPC platform, or the new verison will help.
What is the diffrences?

The version 3.1.6 worked for me almoust a year without a problem.

brgds
Janeks

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
This morning I got the error again, the behavior is a bit different from that one year ago so I gues that there is some modem specific problem:

The behaviour:
There are unread messages in the modem, that i saw from led indicators.
I restarted smsd - it does not help messages are still in the modem and from log we see that modem is not responding.
I restarted the system/server and started smsd - now it works again.

smsd.log:


trouble.log part:


It looks like it could also that the problem is connected with messages that has non latin characters or is started with space symbol / newline symbol (multipart messages?)

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
For some reason the serial port is lost. Content of the message should not cause this, but you never know...

As your modem and hardware worked in the past without any errors, probably the changed way of handling the serial port causes this problem. With two settings for a modem you can move back to the way that version 3.1.6 used:

send_delay = 1
send_handshake_select = no


With these settings the string is sent to the modem one character at a time, and between each character there is a one millisecond delay.

However, the "send_handshake_select" is a very common style for handling the serial port and should work without problems.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
Those settings did not help.

When modem hanged I cannot it even reset with minicoms reset command.

But the logs look a bit diffrent:

smsd.log:


trouble.log


I now set the loglevel to 7, let's see.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Janeks wrote
Those settings did not help.

When modem hanged I cannot it even reset with minicoms reset command.

But the logs look a bit diffrent:

You just changed the smsd.conf and restarted smsd, without any other actions or issues?

Now rtscts does not work...

Can you try this with 3.1.6? It might be interesting to see if it works, because there should not be any difference between those versions. But as you told that it was working for a long time, it could be verified now.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
How to correclty remove last installed version.
I got:


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
You do not need to uninstall. Extract the package of 3.1.6 to some different directory, compile it in there and run from src directory: ./smsd (do not run "make install").

The uninstall did not proceed, because it wanted "yes" as an answer, not "y". But that's good ;), you have still your smsd.conf and /var/spool/sms available...

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
O'k I did it. Let's see...

I had to disable send_handshake_select in my config file. As it was unknown for old version.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
The version 3.1.6 works. At least I have all the messages that I got this morning. And smsd still running and modem shows no unread messages.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
No it hangs again this morning.
Strange - it means that it worked with almoust the same configuration like it was before.

But the strange too was that logfiles in /var/log was empty.
WIth version 3.1.11 despite I has logfile to another directory it wrote logfiles into /var/log
Now I has the logfile specified in configuration file, but it was damaged or something like that - I could not it open and if copied then system reports IO error and I could not get whole file.
So I have no logging info. :(

Could it be a HW problem on my side? Because I have another box, but with the same parameters - should be identical, may be some other version of linux kernel.
I now did uninstall and compile the 3.1.6, let's see ... :?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Janeks wrote
Could it be a HW problem on my side? Because I have another box, but with the same parameters - should be identical, may be some other version of linux kernel.

What did you mean, does this kind of an error happen on another hardware too?

If you have a disk failure, it may be the reason for the communication problem, because devices are files and files are located on disk...

I was running 3.1.12 on PPC without any problems with all handshaking methods:

# uname -a
Linux macmini 2.6.26-2-powerpc #1 Tue Aug 31 09:21:51 UTC 2010 ppc GNU/Linux

# cat /etc/debian_version
5.0.6

The kernel is not the same as yours, but I do not know if it does matter.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
No it not happened on other HW.
I has the same HW that worked well, but it has other problems, so I changed it to the same but new one, that has the same paramaters, but new version of software.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
I am getting any way sporadic problems.
The last looks in a sms file:


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I think that this is an infrequent error which cannot be repeated. The message itself looks correct, but the PDU string contains additional ` characters and they are causing error. The PDU is second part of a message which contains two parts. I assume that you have received the first part without errors.

Probably a problem in communication is causing this failure. You could try a different baudrate, but I'm not sure if it helps because you have had hardware problems in the past too.

If this kind of error happens more often, it could be reasonable to add "PDU checking" to the code. If the PDU looks broken, smsd could try to re-read it and check if it helps. However, I do not yet start coding this feature, because this error is very unusual.

What kind of smsd.conf you have currently? And the hardware, is it the same N30 with USB adapter, or have you replaced something?

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
Is this a HW problem I am not shure, but I have the same HW.

And yet working with the same old version of sms3: 3.1.6

smsd.conf:

# Example smsd.conf. Read the manual for a description

#GLOBAL DIRECTIVES

devices = GSM1
failed = /var/spool/sms/failed
report = /var/spool/sms/report
sent = /var/spool/sms/sent
logfile = /var/spool/sms/logs/sms3.log
loglevel = 5

#errorsleeptime = number
#Default value: 10.
#A modem sleeps so many seconds when it answers a command with ERROR.

#blockafter = number
#Default value: 3.
#A modem is blocked after n number of errors while sending messages.
#A successfull sending will reset this counter.

eventhandler = /usr/local/bin/smsd_eventhandler.sh
#Default value: not in use.
#Specifies an external program or script that will execute whenever a message
#was sent, received or failed.

#stats = directory
#Default value: not in use.
#Specifies the directory where smsd stores statistic files. The directoy must
#exist before you start smsd. If not given, then the program does not write
#statistic files. After version >= 3.1.1 message counter files are stored to
#this directory even if smsd is compiled without statistics enabled.

#stats_interval = number
#Default value: 3600.
#Smsd writes statistics files every n seconds. Value 0 disables statistics but
#counters are still updated if stats directory is defined.

#stats_no_zeroes = yes/no
#Default value: no.
#Smsd does not write statistic files when no message was sent or received
#(Zero-Counters) if this is set to yes.

#blacklist = filename
#Default value: not in use.
#Name of the blacklist file.

#whitelist = filename
#Default value: not in use.
#Name of the whitelist file.
#The black list takes precedence before the white list

checkhandler = /usr/local/bin/smsd_checkhandler.sh
#Default value: not in use.
#External program that checks if a message file is valid.
#If the checkhandler return a non-zero (other than 2) exitcode the message
#will not be sent. With the smsd version >= 3.1 the checkhandler can also
#modify a message file. Exitcode 2 means that the checkhandler has moved a
#message to the spooler by itself.

#autosplit = number
#Default value: 3.
#Controls if and how the program splits large text messages.
#The program does not split text messages with UDH.
#If splitting is disabled, binary messages requiring more than one part are
#not sent.
# 0     disabled
# 1     enabled, no part-number
# 2     enabled, text numbers
# 3     enabled, concatenated format (not supported by some phones)

#receive_before_send = yes/no
#Default value: no.
#Forces smsd to empty the first SIM card memory before sending SM.
#This is a workaround for modems that cannot send SM with a full SIM card.

#store_received_pdu = 3
#Default value: 1.
#Controls when the incoming PDU string(s) is stored to message file.
# 0     no PDU's are stored
# 1     unsupported PDU's are stored
# 2     unsupported and PDU's with 8bit binary data or Unicode text are stored
# 3     all PDU's are stored
# Header is "PDU: " and PDU's of a multipart message are stored from 1 to n order.

#ic_purge_hours = 0

#validity = number
#Default value: 255.
#0 ... 143    (value + 1) * 5 minutes (i.e. 5 minutes intervals up to 12 hours)
#144 ... 167    12 hours + ((value - 143) * 30 minutes) (i.e. 30 min intervals up to 24 hours)
#168 ... 196    (value - 166) * 1 day (i.e. 1 day intervals up to 30 days)
#197 ... 255    (value - 192) * 1 week (i.e. 1 week intervals up to 63 weeks)

#decode_unicode_text = yes
#Default value: no.
#Controls when the incoming Unicode text is decoded internally.

incoming_utf8 = yes
#Default value: no.
#With this setting messages using ISO or GSM alphabet are stored using UTF-8
#character set.

#log_charconv = yes
#Default value: no.
#With this setting a details of character set conversions (outgoing UTF-8 to
#ISO conversion and incoming GSM/ISO to UTF-8 conversion) is printed to the log.
#If smsd is compiled using DEBUGMSG definition, details are also printed to the
#console. Logging feature can be useful if you have some troubles with
#characters and like to know what exactly happens inside the smsd.#internal_combine = yes/no
#Default value: yes.
#Controls when the incoming multipart message is combined internally.

#internal_combine_binary = no
#Default value: internal_combine.
#Controls when the incoming multipart binary message is not combined internally.

date_filename = 2
#Default value: 0. Defines if date is included to the filename of incoming
#message. With value 1 like 2007-09-02.GSM1.xxxxxx and with value 2 like
#GSM1.2007-09-02.xxxxxx.

#user = username
#Default value: not in use.
#group = groupname
#Default value: not in use.
#If the smsd is started by the root, these two settings can be used to switch
#smsd to run as an unpriviledged user.
#If user is set but group is unset, that user's normal groups
#(e.g. from /etc/groups) are used.
#This means you can allow other users on the system access to write messages
#to the outgoing spool without giving them direct access to the serial port.

#infofile = filename
#Default value: /var/run/smsd.working.
#pidfile = filename
#Default value: /var/run/smsd.pid.
#Location of infofile and pidfile can be changed with these settings. This is
#usually necessary if the smsd is running as an unpriviledged user. If a sms3
#script is used to start and stop the smsd, these settings should be defined
#in the script.

#regular_run = filename
#Default value: not in use.
#regular_run_interval = number
#Default value: 300.
#A regular_run is an external script or program which is run regularly while
#the smsd is running. A value regular_run_interval describes number of seconds
#between each run.

admin_to = 3712637XXXX
#Default value: not in use.
#Specifies a destination number for administrative messages created by smsd.
#Messages are sent without using the filesystem.

#executable_check = yes/no
#Default value: yes.
#This setting defines if all executables are checked during the startup check.
#Usually eventhanler, alarmhandler etc. are shell scripts or some other single
#files which can be executed and therefore checked simply. If using a settings
#like eventhandler = /usr/local/bin/php -f /usr/local/bin/smsd_eventhandler.php,
# the check will fail and smsd will not start unless executable_check = no is
#defined.

#international_prefixes = list of numbers
#national_prefixes = list of numbers
#Default value: not in use.
#See SMS file (Using Type Of Address selection) for details.

#adminmessage_device = name
#Default value: first available modem.
#Defines which modem is used to send administrative messages from the mainspooler.
#This feature uses shared memory and works only if libmm is installed and statistics
#functionality is enabled.

smart_logging = yes
#Default value: no.
#This feature is available when file based logging is used.
#If loglevel is less than 7 (for example "notice" is a good choise with
#smart_logging), trouble log (with loglevel 7) about whole communication is
#written to different file if there has been any errors.

#END GLOBAL DIRECTIVES

#DEVICE DIRECTIVES

[GSM1]
device = /dev/ttyUSB0
incoming = yes
#pin = 3375

#init = modem command
#Default value: not in use.
#Specifies a modem initialisation command.
#Most modems do not need any init string. See the manual of your modem for more
#details of modem commands.

#init2 = modem command
#Default value: not in use.
#Specifies a second modem initialisation command. Most users do not need this.

#smsc = number
#Default value: not in use.
#Specifies the SMSC number that this modem should use to send SM.
#You need this setting only if the default of the SIM card is bad.
#Write the phone number of the SMSC in international format without the
#starting "+".

#baudrate = number
#Default value: 115200.
#Specifies the speed of the serial communication in bits per second.
#Most modems including old devices work well with 115200. If this speed is
#not supported by the system, 19200 is used. Some very old devices may need
#lower speed like 9600 baud.

#rtscts = yes/no
#Default value: yes.
#You can disable usage of hardware handshake wires by setting this option to
#"no". Please don't use this feature in commercial applications because the
#hardware handshake wires ensure proper communications timing between the
#computer and the modem.

#send_delay = number
#Default value: 1 (milsec)
#If your modem does not support hardware handshake you should use the lowest
#possible baudrate to ensure that the program does not run faster than the
#modem can do. However, if the lowest possible baudrate is still too fast,
#then you can use this parameter to make it even slower.

#cs_convert = yes/no
#Default value: yes.
#The program converts normal text messages into GSM character set.
#You need this to display german umlauts and control characters correctly.

#report = yes/no
#Default value: no.
#If you enable this, the program requests a status report SM from the SMSC for
#each sent message. This does not work on many mobile phones and on some modems.

#check_network = value
#Default value: 1.
#Defines how network registration is checked:
# 0  no     Network registration is not checked.
# 1  yes     Network registration is always checked
# 2    Network registration is checked only when preparing to send messages.
#If a modem does not support network checking, checking is automatically ignored.
#With value 2 incoming messages are processed faster.

#messageids = number
#Default value: 2.
#Available from version >= 3.1.1. Defines how message id's are stored:
#1 = first, 2 = last, 3 = all. When all id's are stored, numbers are delimited
#whith space and there is one space and dot in the end of string.

number = 3712642XXXX
#Default value: empty.
#SIM card's telephone number. If not empty, it is stored to the message files
#using header "Number:".



#END GSM1 device directives

#END DEVICE DIRECTIVES
 
'smsdconf' Syntax Highlight powered by GeSHi


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
How often this error has happened? If this error is more regular, I could try to produce a code for you which tries to check if the error is caused by the communication, or by the modem. This kind of a code will work with check_memory_method 1 which you are using.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
It could happen around once per week, but not on regular basis.
The longest run without it was around two weeks, but last was around two days.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
And in the past you was running the same 3.1.6 with the same hardware, for one year without problems, right?

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
Yes, but not exactly the same, modem and USB-serial adapter are the same, but computer parameters are the same and model is the same, but it is not the same box.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
You could try if your modem supports check_memory_method = 31. If it is supported, this method will check the length of PDU and if it's incorrect, error is reported to the log. SMS is not handled, and when smsd tries to read messages next time, you can see if this error is repeated. If it is not, you have a communication problem. But if it's repeated, the problem is in the modem.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Is this problem still active?

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
The unit's HD died couple of weeks ago. So I gues , that probably the problem somehow was connected with HD failures.

And I did not yet restored the system, but I am planning it to do within a week.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Janeks wrote
The unit's HD died couple of weeks ago. So I gues , that probably the problem somehow was connected with HD failures.

Yes, that likely was causing the problem.

Because the problem did not happen on other HW, I close this topic today.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I had to re-open this topic... :(

Janeks wrote
Apparently I faced with the same (or similar) problem - sporadic hangup of communication smsd with modem. That can be solved only by restarting system (not only smsd).

So I am sending (attached) you the all files of my setup before restart and after.

I hope it could help. If you need some other info - just let me know,

In your system there are two critical problems:

1) The modem or serial interface dies. Smstools cannot do much for this, as the restarting does not help. When this problem next time occurs, you could try if stopping smsd, disconnecting the USB plug, re-connecting it and starting smsd helps. If it helps, it is possible to build a relay which does connecting automatically, but of course it will be just a workaround for the reason which causes the problem.

You could monitor this problem using alarmhandler. In the smsd.conf, define:
alarmhandler = /usr/local/bin/smsd_alarmhandler.sh

Create this script with the following content, and make it executable:

#!/bin/bash

LOG="/var/spool/sms/logs/alarm.log"
CONTROLFILE="/var/spool/sms/logs/alarm.control"

# $1 the keyword ALARM
# $2 a date in the format yyyy-mm-dd
# $3 a time in the format hh:mm:ss
# $4 the alarm severity (1 digit number)
# $5 the modem name or SMSD
# $6 the alarm text

echo "$2 $3,$4, $5: $6" >> $LOG

if echo -n "$6" | grep "Modem is not ready to answer commands" >/dev/null; then

  if [ ! -f $CONTROLFILE ]
  then
    DATE=`date +"%Y-%m-%d %T"`
    echo "${DATE},1, $5: Alarmhandler created request for reset." >> $LOG
    echo "RESET $5 $DATE" > $CONTROLFILE
  fi
fi
 
'bash' Syntax Highlight powered by GeSHi


When the permanent error is detected, a file alarm.control is created. You can of course send some alarm using e-mail, but not with a modem because it does not work. As at this time restarting the server is the only way to get the modem working again, you can create another script which is run by cron, and with detects if alarm.control exists with a content RESET*, and run shutdown -r now, if necessary.

I think that shutdown -r now can be run in the alarmhandler itself too, but I have not tested it.


2) After you restarted the system, there is a message with incorrect PDU string received (like in the post #13). In this case the PDU is almost correct, but contains several Ctrl-Q` character combinations. As said before, smsd could check and fix this, but it will not resolve the problem. And if some characters are missing, smsd cannot do anything to fix this issue.

As you have not disabled handshaking, I have no idea what in your system causes this error, but in any case this error should be fixed...

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
It seems, that I should try either another modem and/or serial-usb connector.
Could smsd work with Huawei E1752?

  This topic is locked

Page:  1  2  Next

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.