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] ... and so on |
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 need the init string AT +CPMS="SM" or AT +CPMS="ME" to tell the phone where it
should store and read received messages. SM=SIM Card, ME=Mobiles internal 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
new for nearly all mobile phones and modems
ascii for ascii mode. This simplifies debugging but is limited to 140 characters and cannot send or receive binary SM. Some modems and mobile phones do not support ascii mode.
The software code for ascii mode is not maintained anymore. It may have some small bugs.
digicom for old digicom modems.
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!