Please note that my book describes this topic with more details.
The config file is /etc/smsd.conf. You may specify another file using the option -c. During installation an easy example file will be copied to /etc/smsd.conf directory.
The config file has the following structure:
some global settings [first modem name] ... [second modem name] ... [third modem name] ... and so on |
I left out the part for the provider-sorting feature.
In case of yes/no settings, you can use the following keywords:
yes , no
true , false
on , off
1 , 0
In case of lists, you need to use the comma character to separate items. Example: modem1, modem2, modem3
The global part begins at the top of the config file.
devices = names
List of names of your modems, maximum 32 devices. This limit is changeable.
outgoing = directory
Path of the Outgoing Queue folder.
checked = directory
Path of the default Queue directory in case you do not use provider-sorting.
failed = directory
Path of the Failed Folder. Delete this line if you do not want to keep failed files.
incoming = directory
Path of the Incoming Folder.
sent = directory
Path of the Sent Folder. Delete this line, if you do not want to keep copies of each sent message file.
mypath = directory
Specifies the directory where you installed the SMS Server Tools binaries. Default is /usr/local/bin.
logfile = filename
Name of the log file. Delete this line, if you want to use the syslog for logging. You can use "1" to write to the console (stdout).
loglevel = number
Sets the verbosity of your log file. The default is "4" if you use a logfile and it is "7" if you use syslog.
This affects also syslog. If you want all messages in syslog, you need to set it to "7" (or higher) here and "*" in the config file of syslog. If you want less messages, you can reduce it here or in the config file of syslog, both will work.
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
You can specify here an external program that is started whenever an alarm occurs.
alarmlevel = number
Specifies what levels start an alarmhandler. You can use value between 2 and 5.
delaytime = number
Smsd sleep so many seconds when it has nothing to do.
errorsleeptime = number
A modem sleeps so many seconds when it answers a command with ERROR.
blocktime = number
A modem is not used so many seconds when it seems to be out of order.
eventhandler = filename
Specifies an external program or script that will execute whenever a message was sent, received or failed.
stats = directory
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.
stats_interval = number
Smsd writes statistics files every n seconds. I would recommend 3600 for 1 hour.
blacklist = filename
Name of the blacklist file.
whitelist = filename
Name of the whitelist file. The black list takes precedence before the white list.
checkhandler = filename
External program that checks if a message file is valid. If the checkhandler return a non-zero exitcode the message will not be sent.
autosplit = yes/no
Enables or disables automatic splitting of large text messages (only with 7/8 bit text messages).
receive_before_send = yes/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.
number_parts = yes/no
Enable or disable numbers in splitted messages.
[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
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
Specifies a second modem initialisation command. Most users do not need this.
device = name of serial port
Specifies the device name of the serial port to the modem.
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 receives with less priority. The value "high" or "2" means that smsd receives with high priority. "No" or "0" means that smsd does not receive messages.
queues = list of queue names
Specifies the Provider Queues that this modem shall serve. Use the same provider names as in [queues] and [provider]. If you do not use the provider-sorting feature, then leave this line out.
pin = 4 digit number
Specifies the PIN number of the SIM card inside the modem. Delete this line, if your computer does not need to enter a PIN.
mode = old/new/ascii/digicom
Specifies version of modem command set. Almost everybody needs to set
it to "new" which is the default.
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. |
ascii | in ascii mode the program sends the text as it is, instead of encoding it into a PDU string. This was made for debugging and is not recommended for normal operation. |
smsc = number
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
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 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
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 to fast, then you
can use this parameter to make it even slower. A value of 100 menas that the program waits 100 milliseconds between sending each single character to the modem. This makes the program very slow.
cs_convert = yes/no
The program converts normal text messages into GSM character set. You need this to display
german umlauts and control characters correctly.
report = yes/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.
eventhandler = filename
Specifies an eventhandler script like in the global part. If you use this variable, then this modem will use its own individual eventhandler instead of the global one.