The program smsd needs a config file in /etc/smsd.conf. You may specifiy another file by using the option -c. During installation an example file will be copied to /etc/smsd.conf directory.
The config file has the following structure:
some global settings [queues] ... [providers] ... [first modem name] ... [second modem name] ... [third modem name] ... and so on |
The [queues] and [provider] sections are optionally. Klick here to find the description.
The global part control basic settings of smsd. The modem parts control the configuration of each single modem. Therefore you need exactly one modem part for each of your modems.
Some values are yes/no settings. You can use any of the following keywords in this case, they all do the same:
yes , no
true , false
on , off
1 , 0
The global part begins at the top of the config file.
devices = names
Specifies the number and names of your modems. You may compose the names using the characters
A-Z, 0-9 and _. Do not use space or control characters. The name is only a label for your modem.
WHen you receive messages, then the text files start with the first 5 characters of the modem's name. It may be useful to keep the modem names short (max. 5 characters) but longer names are also allowed.
outgoing = directory
Specifies the path of the outgoing spool directory. All messages that shall be sent go into this directory first. (in older versions this option was named "spool").
checked = directory
Specifies the spool directory for successful checked messages. Messages go from the spool directory to this one before they are really sent out by the modem. When you use [providers] and [queues] sections, then this variable has no effect.
failed = directory
Specifies the path of the failed spool directory. Delete this line if you do not want to keep failed files.
incoming = directory
Specifies the path of the incoming spool directory.
sent = directory
Specifies the path of the sent spool directory. Delete this line, if you do not want to keep sent SMS files.
mypath = directory
Specifies the directory where you installed the SMS Server Tools binaries.
logfile = filename or number
Name of the log file. Delete this line, if you want to use the syslog daemon for logging.
You can use "1" to write to the console.
Numbers are interpreted as file handles, where
1 is the file handle for stdout.
Windows has no syslog daemon, the program uses the event log
on windows NT instead syslog.
If you want a list of all possible alarms go into
the src directory and enter grep LOG_ *.c
loglevel = number
Specifies the verbosity of your log file (see above). 4 means that all warnings and errors are logged.
The following loglevels are used:
debug | 7 | All AT-Commands and modem answers and other detailed informations useful for debugging |
info | 6 | Information what is going on at the moment. Not detailled enough for debugging but maybe interesting. |
notice | 5 | Information when a message was received or sent and when something not normal happens but program still works fine (for example wrong destination number in SMS file). |
warning | 4 | Warning when the program has a problem sending a single short message. |
error | 3 | Error message when the program has temporary problem (for example modem answered with ERROR during initialization or a file can not be accessed). |
critical | 2 | Error message when the program has a permament problem (for example sending failed many times or wrong permissions to a queue). |
alarmhandler = filename
Specifies a program or script that will be called whenever an alarm occures.
Use full path name. Delete this line if you do not use an eventhandler.
alarmlevel = number
Sets the verbosity of the alarm handler if you use one (see above). 2 means that only critical error messages
cause the alarm handler to be called. You can use value between 2 and 5.
delaytime = number
Specifies the time smsd sleeps if the queues are empty before re-checking for new files (seconds).
errorsleeptime = number
Specifies the delay between ERROR answers from the modem and the next retry (seconds).
blocktime = number
If three consecutive messages fail to send the modem will be blocked for this time (seconds).
eventhandler = filename
Specifies an eventhandler program or script that will execute whenever a message was sent, received or failed.
Use full path name. Delete this line if you do not use an eventhandler.
stats = directory
Specifies the directory where smsd stores statistic files.
The filename is a timestamp in the format YYMMDD.HHMMSS .
You have to create the directory yourself before start smsd. Delete this line if you dont need
statistic files.
stats_interval = number
This sets the timer that control the time difference between each statistic file in seconds. For
example 3600 results in one file for each hour. Delete this line if you dont need
statistic files.
blacklist = filename
Specifies the filename of a black-list. The black list contains numbers that are not allowed to receive SM.
Delete this line if you do not want to use a black list.
whitelist = filename
Specifies the filename of a white-list. The white list contains numbers that are allowed to receive SM.
If you do not have a white list, everybody can receive SM. The black list takes precedence before the white list.
Delete this line if you do not use a white list.
checkhandler = filename
Specifies an external program that tells smsd if this sms file is valid. If the eventhandler return a non-zero exitcode
the message will not be sent.
autosplit = yes/no
Enables or disables automatic splitting of large SMS files. If set to "yes" (wich is the default) then messages larger than 160 characters
are splittet into many short messages. Note: Smsd splits only text messages, not binary messages.
receive_before_send = yes/no
Forces smsd to flush the first SIM card memory before sending SM.
This is a workaround for modems that cannot send SM with a full SIM card.
number_parts = yes/no
Enable or disable part numbers at the beginning of every splitted SM. Default is enabled.
[modem name]
Begin of a modem settings block. The modem name must be the same as in the devices= line in the global part.
init = modem command sequence
Specifies a modem initialisation string. Most modems do not need any init string.
Some mobile phones store received messages into the ME but try to read them from SM. In this case, use init string AT +CPMS="SM" or AT +CPMS="ME". SM=SIM Card, ME=Mobile memory.
Siemens Modems need the init string AT +CNMI=2,0,0,2,1 when you want to receive status report. Most modems report error codes in more detail when the init string contains AT +CMEE=1. You can disable command echoing with AT E0. This has no functional effect but makes the logfile a little bit shorter when loglevel is set to 7. The letters AT must only appears once at the beginning of the init string. Example: AT E0 +CPMS="SM". See the manual of your modem for more details of modem commands. |
device = name of serial port
Specifies the device name of the serial port to the modem. Normally a device under /dev.
Linux example: /dev/ttyS0. Windows example: /dev/com1. Solaris example: /dev/cuaa.
incoming = no/yes/high or 0/1/2
Specifies if the program should read incoming SM from this modem. "Yes" or "1" means that smsd reads incoming
messages from the modem. The value "high" or "2" means that smsd reads with higher priority. This means
that it sends only messages when there is nothing to receive. "No" or "0" means that smsd does not
read received messages.
queues = list of queue names
Specifies the queues that you want to serve by this modem. Use the same provider names as in [queues] and [provider]. If you do not use the [providers] and [queues] feature, then leave this line out.
pin = 4 digit number
Specifies the PIN number of the modems SIM card. Delete thisline, if you do not need a PIN. All mobile phones do not
need a PIN.
mode = old/new/ascii/digicom
Specifies wich version of command set your modem has got.
old for Falcom A1 and maybe some other old modems of GSM phase 1 (1990-1995)
new for nearly all mobile phones and modems
digicom for old digicom modems.
Deprecated: mode=ascii
In ascii mode the program communicates in human readable text wth the modem. Ascii mode is limited to 140 characters of plain text, no bonary messages possible). Some modems and phones do not support ascii mode.
smsc = number
Specifies the SMSC number that this modem should use to send SM. Delete this line, if you think that you do not need this setting. Most modems and phones use a default setting from the SIM card if you delete this line. Write the phone number of the SMSC in international format without the starting "+".
You can override this setting with the header SMSC: in the sms files.
baudrate = number
Specifies the speed of the serial communication in bits per second. Most modems work well with 19200 baud, some need 9600 baud.
rtscts = yes/no
You can disable hardware handshake (using the RTS and CTS control lines of the serial port) by setting this option to "no".
The default value is "yes". Some not original cables for mobile phones do not support hardware handshake. I recommend
to use always cables with RTS and CTS lines because without handshake the program may talk too fast to your modem.
cs_convert = yes/no
If you enable this, the program will convert the SM character set to iso-8859-15 whend sending and receiving messages.
If you disable this, the program will send messages without character set conversion.
There is one exception: the @ charcter is ASCII 0 and is converted to ASCII 183 because ASCII 0 are not allowed in C Programming language.
report = yes/no
If you enable this, the program will request a status report SM from the SMSC for each sent message.
This does not work on many mobile phones and on some modems.
eventhandler = filename
Specifies an eventhandler script or program that will execute whenever you send or receive a message on this modem.
Delete this line if you do not need it. If you specify an eventhandler in this part, smsd will ignore the
global eventhandler for this modem. Smsd does not call both eventhanlder!