GAMMU-SMSD(1)
GAMMU-SMSD(1) π
Bestie, welcome to the GAMMU-SMSD(1) page from the Gammu manual β aka the whole lowdown on gammu-smsd, the SMS daemon. Buckle up, weβre doing Unix but make it cute β¨
NAME π
gammu-smsd β the SMS daemon for Gammu. Thatβs the name vibe, no cap π
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 SMSD Configuration File<#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 chosen 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. Use0to not terminate (this is default).-X,--suicide=secondsβ kills itself after number of seconds.-S,--run-serviceβ runs program 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 a 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. Added in version1.31.90.-E,--uninstall-event-logβ uninstalls Windows EventLog description to registry. Added in version1.31.90.
β οΈ Quick caution, bestie:-S,--run-serviceshould not be used manually β only Windows Service manager should use this command.
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 forgammu-smsd -X.SIGUSR1β suspends SMSD operation, closing connection to phone and database.SIGUSR2β resumes SMSD operation (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:\Gammu\smsdrc -i
Install two instances of SMSD Windows service:
gammu-smsd.exe -c c:\Gammu\smsdrc-1 -n Gammu-first-phone -i
gammu-smsd.exe -c c:\Gammu\smsdrc-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.
Invoking Gammu and suspending SMSD π§
As you can not run Gammu and Gammu SMSD at same time on single device, you can workaround this limitation by suspending SMSD temporarily using SIGUSR1 and SIGUSR2 signals (see also Signals):
SMSD_PID=`pidof gammu-smsd`
if [ -z "$SMSD_PID" ] ; then
echo "Failed to figure out SMSD PID!"
else
kill -SIGUSR1 $SMSD_PID
gammu identify
kill -SIGUSR2 $SMSD_PID
fi
Or even create a gammu-safe script:
#!/bin/bash
SMSD_PID=`pidof gammu-smsd`
if [ -z "$SMSD_PID" ] ; then
gammu $@
else
tty=$(lsof |grep -E "gammu-sms\s+$SMSD_PID\s+.*/dev/tty*"|awk {'print $NF'})
kill -SIGUSR1 $SMSD_PID
while test "$(fuser $ttyfuser $tty 2> /dev/null|xargs)" = $SMSD_PID
do
sleep 1
done
sleep 1
gammu $@
kill -SIGUSR2 $SMSD_PID
while test "$(fuser $ttyfuser $tty 2> /dev/null|xargs)" != $SMSD_PID
do
sleep 1
done
sleep 1
fi
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-[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, see Invoking Gammu and suspending SMSD for workaround.
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-2015, Michal ΔihaΕ <michal@cihar.com>
Thatβs the whole page, bestie β version 1.45.0, dated Sep 16, 2026, from the GAMMU-SMSD(1) manual. Byeee π
β¨
π¦ where this page comes from
- arch rolling: gammu 1.45.0-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms