GNOKII-SMSD(8)
π gnokii-smsd π
so bestie, this is gnokii-smsd from the Gnokii family, and it lives in section 8 of the manual (that's the sysadmin section, iykyk π). it's a daemon, it deals with SMSes, and honestly? it's a whole vibe. let's get into it π¦
β¨ NAME β¨
gnokii-smsd β daemon for handling incoming and outgoing SMSes using libgnokii π
β¨ SYNOPSIS β¨
gnokii-smsd [OPTIONS]
β¨ DESCRIPTION β¨
okay so the SMSD (that's SMS daemon, keep up π) is literally made for receiving and sending SMSes. that's the whole job. that's the assignment and it ate.
the way this works is: the program uses modules (aka plugins, same thing bestie) so it can talk to different backends. right now the supported ones are PostgreSQL, MySQL, and a special file module that's designed to run with no SQL database at all (there's a whole special section about it below, don't worry π«Ά). so when SMSD uses an SQL server as its SMS repository, you must create a database (the default name is sms) with tables defined in the sms.tables.{module}.sql files.
the table inbox is where received SMSes go. SMSD periodically checks a given phone memory to move messages over into this table. and listen β only received SMSes and status reports are deleted from the phone. other kinds of messages do not get removed. periodt.
the inbox table has these fields:
numberβ phone number from which the sms was receiveddateβ date set by SMS centerinsertdateβ date the SMS was inserted into the tabletextβ the SMS textphoneβ number of phone to use. if you usegnokii-smsdwithout the-toption you can ignore this column. see the-toption below.processedβgnokii-smsdsets this always toFALSE. you can use it for another program that'll parse the SMSes π
the table outbox is for outgoing SMSes. SMSD periodically looks into this table and searches for lines with the attribute processed set to FALSE. if it finds such an SMS, it will send the SMS to number.
the outbox table has these fields:
numberβ recipient's phone numberprocessed_dateβ date of processing the SMSinsertdateβ date of inserting the SMS into the tabletextβ the SMS textphoneβ number of phone to use. if you usegnokii-smsdwithout the-toption you must not fill this column. see the-toption below.processedβ a new SMS must have this attribute set toFALSE. SMSD will send this SMS and will updateprocessedtoTRUE.errorβ this attribute contains the return value of thegn_sms_send()function. for explanation of the numeric values, see<gnokii/error.h>in the gnokii source.dreportβ request for delivery report per message. possible values are0for no delivery report,1for delivery report.not_beforeβ the sms will not be sent before this time (default00:00:00).not_afterβ the sms will not be sent after this time (default23:59:59).
SMSD is a multi threaded program. so if you list your processes you're gonna see more than one instance of gnokii-smsd. it's not a glitch bestie, it's just like that π
πΈ THE FILE MODULE πΈ
this module doesn't need an SQL server to work, iconic honestly. for incoming messages it works by calling a program, giving it the phone number and date as parameters, and passing the message text on stdin. in the gnokii-smsd directory there's an example file action β it just shows the sms data to stdout. if you want something actually useful you gotta write your own action, sorry babe π
for outgoing messages you can set a spool directory where gnokii-smsd looks regularly.
incoming sms are passed in this format:
action number date < sms
outgoing sms must be in this format:
number
text
the name of the file is unimportant, but gnokii-smsd ignores all files with the prefix "ERR.". if gnokii-smsd successfully sends the sms, it removes the file from the spool directory. if gnokii-smsd cannot send the sms, it prepends the file with the "ERR." prefix and ignores it. π
if you use -m file, then -u (--user) and -c (--host) mean something totally different:
-uis for the action (and the action must be executable)-cis for the spool directory wheregnokii-smsdlooks for smses.
Smsd must have read and write permissions to this directory. no cap.
heads up bestie: the-pand-dparameters have no meaning when-m fileis used. like, none. they're just sitting there.
if you don't specify -u, the default action is to print sms to stdout. if you don't specify -c, sms sending will be disabled. simple as that β¨
β¨ OPTIONS β¨
available options, let's gooo:
-u,--userdb_username β specify user name.-p,--passworddb_password β specify user password.-d,--dbdb_name β specify database name for thepqandmysqlmodules, or the full path to the database file for thesqlitemodule (defaults tosms).-c,--hostdb_hostname β specify database server host name.-s,--schemadb_hostname β specify the database schema used by the PostgreSQL module (defaults topublic).-e,--encodingclient_encoding β specify client encoding for the database connection.-m,--moduledb_module β specify which module to use for connecting to the DB server. currently supported values arepqfor PostgreSQL,mysqlfor MySQL,sqlitefor SQLite3 andfile. psst β the File module is not supported in Windows.-l,--libdirpath_to_db_module β specify the path to the DB modules. if you specify thepqmodule,gnokii-smsdsearches in libdir for the filelibsmsd_pq.so(for mysql it'slibsmsd_mysql.so). and do not interchange these plugins with the default SQL libraries from your database distribution! i'm so serious.-f,--logfilefile β if used,gnokii-smsdwill monitor sms traffic to the filefile. the file is reopened and closed for every message, so you can simply rename or delete it if you want to rotate logs π. if you use-as the filename, smsd will use standard output.-t,--phonephone_number β you can run more instances ofgnokii-smsd, one instance per phone. in this setup you must configure the phone section in the config file. for example:
[global]
port = /dev/ttyS0
model = 6110
initlength = default
connection = serial
bindir = /usr/local/sbin/
use_locking = no
serial_baudrate = 38400
smsc_timeout = 10
[phone_1]
port = /dev/ttyS0
model = 6110
initlength = default
connection = serial
bindir = /usr/local/sbin/
use_locking = no
serial_baudrate = 38400
[phone_2]
port = /dev/ttyS1
model = AT
initlength = default
connection = serial
bindir = /usr/local/sbin/
use_locking = no
serial_baudrate = 38400
smsc_timeout = 10
in this setup, if you run gnokii-smsd without the -t option it'll use the config from the global section. if you run gnokii-smsd with -t 1 it'll use the config from phone_1, and likewise with -t 2 it uses phone_2. and in case you use the -t option, gnokii-smsd fills the phone number for incoming sms's, and in the outbox it looks only for sms's with the specified phone number in the phone column. this behaviour gives you the possibility to run one instance of gnokii-smsd for every phone you have, all at the same time. main character multitasking energy π
-i,--intervalinterval β polling interval for incoming sms's, in seconds. default is1second.-S,--maxsmsnumber β when the phone driver doesn't support sms status, it's possible to specify the number of sms's supported by the phone. default is10. if the driver does support sms status, this option is ignored.-b,--inboxmemory_type β where to look for new messages (defaults toINfor most Nokia phones and toSMfor all other phones). for debugging or for unusual setups you can use another memory type supported by your phone (eg.INfor the Inbox,OUfor the Outbox,ARfor the Archive,TEfor the Templates andF1,...,F20for your own folders). usegnokii --showsmsfolderstatusfor a list of such memory types. π-0,--firstpos0β SMSD starts reading messages from position 1. if your phone stores sms's from position 0, use this option.-v,--versionβ showsgnokii-smsdversion.-h,--helpβ shows short help.
β¨ DIAGNOSTICS β¨
various error messages are printed to STDERR. π
debug output can be enabled by setting xdebug=on (for messages specific to SMSD) and debug=on (for messages specific to libgnokii) in the configuration file.
β¨ BUGS β¨
None reported. πβ¨ (yeah, really. nothing. we love that for us.)
β¨ AUTHOR β¨
SMSD was written by Jan Derfinak and contributed by other people. see also Docs/CREDITS from the Gnokii sources. π«Ά
β¨ COPYING β¨
this program is distributed under the GNU Public License.
β¨ SEE ALSO β¨
and that's the whole page bestie π the gnokii crew signed this one off on September 27, 2010, and it came to you straight from the Gnokii sources. go send some SMSes, you've got this πππ
π¦ where this page comes from
- epel 9: gnokii-smsd 0.6.31-35.el9 Β· GPLv2+
- fedora 43: gnokii-smsd 0.6.31-46.fc43 Β· GPL-2.0-or-later
- fedora 44: gnokii-smsd 0.6.31-47.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms