GAMMU-SMSD-FILES(7) Gammu GAMMU-SMSD-FILES(7)NAME
gammu-smsd-files - gammu-smsd(1) backend using filesystem as a message storage
DESCRIPTION
FILES backend stores all data on a filesystem in folders defined by configuration (see gammu-smsdrc for description of configuration
options).
RECEIVING OF MESSAGES
Received messages are stored in a folder defined by configuration. The filename will be IN<date>_<time>_<serial>_<sender>_<sequence>.<ext>,
for example NN20021130_021531_00_+45409000931640979_00.txt.
Explanation of fields:
<date> date in format YYYYMMDD
<time> time in format HHMMSS
<sender>
sender number
<serial>
order of a message (in case more messages were received at same time), in format NN
<sequence>
part of the message for multipart messages, in format NN
<ext> txt for text message, 8-bit messages are stored with bin extension, smsbackup for gammu-smsbackup
The content of the file is content of the message and the format is defined by configuration directive InboxFormat (see gammu-smsdrc).
TRANSMITTING OF MESSAGES
Transmitted messages are read from a folder defined by configuration. The filename should be one of the following formats:
o OUT<recipient>.<ext>
o OUT<priority>_<recipient>_<serial>.<ext>
o OUT<priority><date>_<time>_<serial>_<recipient>_<note>.<ext>
Explanation of fields:
<recipient>
recipient number where to send message
<priority>
an alphabetic character (A-Z) A = highest priority
<ext> txt for normal text SMS, smsbackup for gammu-smsbackup
<note> any artibrary text which is ignored
For text messages, you can additionally append flags to extension:
d delivery report requested
f flash SMS
b WAP bookmark as name,URL
Other fields are same as for received messages.
For example OUTG20040620_193810_123_+4512345678_xpq.txtdf is a flash text SMS requesting delivery reports.
SMSes will be transmitted sequentially based on the file name. The contents of the file is the SMS to be transmitted (in Unicode or stan-
dard character set).
The contents of the file is the SMS to be transmitted (in Unicode or standard character set), for WAP bookmarks it is split on as Name,URL,
for text messages whole file content is used.
Please note that if file is not in Unicode, encoding is detected based on locales, which do not have to be configured if SMSD is running
from init script. If this is your case, please add locales definition to init script.
AUTHOR
Michal iha <michal@cihar.com>
COPYRIGHT
2009-2012, Michal iha <michal@cihar.com>
1.31.90 February 24, 2012 GAMMU-SMSD-FILES(7)
Check Out this Related Man Page
GAMMU-SMSD(1) Gammu GAMMU-SMSD(1)NAME
gammu-smsd - SMS daemon for Gammu
SYNOPSIS
gammu-smsd [OPTION]...
DESCRIPTION
This manual page documents briefly the gammu-smsd command.
gammu-smsd is a program that periodically scans GSM modem for received messages, stores them in defined storage and also sends messages
enqueued in this storage.
The daemon can reload configuration file after sending hangup signal (SIGHUP) and properly terminates itself on SIGINT and SIGTERM.
Program accepts following options (please note that long options might be not accepted on some platforms):
-h, --help
Shows help.
-v, --version
Shows version information and compiled in features.
-c, --config=file
Configuration file to use, default is /etc/gammu-smsdrc, on Windows there is no default and configuration file path has to be always
specified.
If you run SMSD as a system daemon (or service), it is recommended to use absolute path to configuration file as startup directory
might be different than you expect.
See gammu-smsdrc for configuration file documentation.
-p, --pid=file
Lock file for storing pid, empty for no locking. Not supported on Windows.
-U, --user=user
Drop daemon privileges to chosed user after starting.
-G, --group=group
Drop daemon privileges to chosen group after starting.
-d, --daemon
Daemonize program on startup. Not supported on Windows.
-i, --install-service
Installs SMSD as a Windows service.
-u, --uninstall-service
Uninstalls SMSD as a Windows service.
-s, --start-service
Starts SMSD Windows service.
-k, --stop-service
Stops SMSD Windows service.
-f, --max-failures=count
Terminate after defined number of failures. Use 0 to not terminate (this is default).
-X, --suicide=seconds
Kills itself after number of seconds.
-S, --run-service
Runs pogram as SMSD Windows service. This should not be used manually, but only Windows Service manager should use this command.
-n, --service-name=name
Defines name of a Windows service. Each service requires an unique name, so if you want to run several SMSD instances, you have to
name each service differently. Default is "GammuSMSD".
-l, --use-log
Use logging as configured in config file (default).
-L, --no-use-log
Do not use logging as configured in config file.
-e, --install-event-log
Installs Windows EventLog description to registry.
New in version 1.31.90.
-E, --uninstall-event-log
Uninstalls Windows EventLog description to registry.
New in version 1.31.90.
SIGNALS
SMSD can be controlled using following POSIX signals (if your platform supports this):
SIGHUP Reload configuration and reconnect to phone.
SIGINT, SIGTERM
Gracefully shutdown the daemon.
SIGALRM
Used internally for gammu-smsd -X
SIGUSR1
Suspends SMSD operartion, closing connection to phone and database.
SIGUSR2
Resumes SMSD operattion (after previous suspend).
Changed in version 1.22.91: Added support for SIGHUP.
Changed in version 1.22.95: Added support for SIGALRM.
Changed in version 1.31.90: Added support for SIGUSR1 and SIGUSR2.
EXAMPLES
Linux/Unix Examples
Start SMSD as a daemon on Linux:
gammu-smsd --config /etc/gammu-smsdrc --pid /var/run/gammu-smsd.pid --daemon
Start SMSD as a daemon on Linux with reduced privileges:
gammu-smsd --config /etc/gammu-smsdrc --pid /var/run/gammu-smsd.pid --daemon --user gammu --group gammu
SMSD as a system wide daemon
To use SMSD as a daemon, you might want to use init script which is shipped with Gammu in contrib/init directory. It is not installed by
default, either install it manually or check INSTALL file for instructions.
Under Windows 7 you might need to disable UAC (user account control) before you will be able to install SMSD service.
Windows Service Examples
Install Gammu SMSD Windows service:
gammu-smsd.exe -c c:Gammusmsdrc -i
Install two instances of SMSD Windows service:
gammu-smsd.exe -c c:Gammusmsdrc-1 -n Gammu-first-phone -i
gammu-smsd.exe -c c:Gammusmsdrc-2 -n Gammu-second-phone -i
To uninstall a Windows service:
gammu-smsd.exe -u
Troubleshooting Windows Service
If Gammu fails to start as a Windows service (you will usually get "Error 1053: The service did not respond to the start or control request
in a timely fashion"), first check your SMSD logs. If they do not contain any useful hint, try starting SMSD manually with exactly same
parameters as you installed the service (without -i).
For example the command line can look like:
gammu-smsd.exe -c smsdrc
You now should be able to get errors from SMSD even if it fails to start as a service.
KNOWN LIMITATIONS
You can not use same phone by more programs in same time. However in case you did not enable locking in [gammu] section, it might be able
to start the communication with phone from more programs. In this case neither of the programs will probably work.
There is no way to detect that SMS message is reply to another by looking at message headers. The only way to achieve this is to add some
token to the message and let the user include it in the message on reply.
AUTHOR
Michal iha <michal@cihar.com>
COPYRIGHT
2009-2012, Michal iha <michal@cihar.com>
1.31.90 February 24, 2012 GAMMU-SMSD(1)