GSMSMSD(8)
π GSMSMSD β the gsmsmsd manual, but make it make sense π
okay bestie, sit down, we're reading a section 8 system manager's manual page and honestly? it ate. this is gsmsd's SMS-receiving sibling and she's busy. let's go β¨
πΈ NAME πΈ
gsmsmsd β the SMS message reception daemon. she sits there and she receives, that's her whole thing π
β¨ SYNOPSIS β¨
gsmsmsd [ -a action ] [ --action action ] [ -b baudrate ] [ --baudrate
baudrate ] [ -c concatenatedID ] [ --concatenate concatenatedID ] [ -C
service centre address ] [ --sca service centre address ] [ -d device ]
[ --device device ] [ -D ] [ --direct ] [ -f ] [ --flush ] [ -h ] [
--help ] [ -I init string ] [ --init init string ] [ -r ] [
--requeststat ] [ -s spool directory ] [ --spool spool directory ] [ -t
SMS store name ] [ --store SMS store name ] [ -v ] [ --version ] [ -X ]
[ --xonxoff ] { sms_type }
π¦ DESCRIPTION π¦
so. gsmsmsd reads new incoming SMS from the mobile phone and dispatches them to a user-defined action. periodt. and bonus: she can also send SMS messages that she reads from a spooldir. multitasking queen π
gsmsmsd attaches itself to the device given on the command line (usually an GSM modem) using the specified baudrate and waits for incoming SMS messages. no device given? she's going to /dev/mobilephone, no thoughts. no baudrate given? default baud rate of 38400, she picked it herself, iconic.
no action given? the SMS message is just printed to the standard output, lowkey chill. but if an action is specified, the action is excecuted using the shell and the SMS message is written to the standard input of the action. so the action gets the text piped straight into it, no cap.
β οΈ important bestie:gsmsmsdneeds one empty storage slot for SMS messages in the mobile phone, otherwise SMS reception will not work. like, at all. the SMS store to use for temporary storage of incoming SMS can be selected using the--storeoption, otherwise the ME default store is used.
to terminate gsmsmsd cleanly (without losing SMS messages π) one should send either SIGINT (CTRL-C on the command line) or SIGTERM to the process. do NOT just kill -9 her, she will ghost you and take your messages with her.
error messages are printed to the standard error output. if the program terminates on error the error code 1 is returned.
sms_type may be any combination of:
sms,no_smsβ controls reception of normal SMS messages.cb,no_cbβ controls reception of cell broadcast messages.stat,no_statβ controls reception of status reports.
the default is sms, cb, and stat. all three, she's greedy like that π
π OPTIONS π
-aaction,--actionaction β the action to execute for each incoming SMS message. if no action is given the SMS is written to the standard output.-bbaudrate,--baudratebaudrate β the baud rate to use.-cconcatenatedID,--concatenateconcatenatedID β if an ID is given, large SMSs are split into several, concatenated SMSs. all SMSs have the same ID and are numbered consecutively so that the receiving phone can assemble them in the correct order. IDs must be in the range0..255. this number is increased by one for every outgoing concatenated SMS and wraps around after255. not all receiving phones will support concatenated SMSs (and display them as separate SMSs), since all the numbering and ID information is carried in the user data header element at the beginning of the SMS user data. this information may show up as garbage in such phones π-Cservice centre address,--scaservice centre address β sets the service centre address to use for all SUBMIT SMSs (may not work with some phones, she tries her best).-ddevice,--devicedevice β the device to which the GSM modem is connected. the default is/dev/mobilephone.-D,--directβ enables direct routing of incoming SMS messages to the TE. this is not supported by many mobile phone/GSM modem combinations. therefore, the default is to store incoming SMS temporarily before processing them in the indicated store.-f,--flushβ this option causesgsmsmsdto flush (ie. read and erase) existing SMS messages from the SMS store selected by the--storeoption. the action given by the--actionoption is executed on each of the flushed SMS. this option should be used to ensure that enough space is available in the SMS store for temporary storage of incoming SMS, otherwise incoming SMS might be ignored silently by the ME π-h,--helpβ prints an option summary.-Iinit string,--initinit string β initialization string to send to the TA (default:"E0"). note that the sequence"ATZ"is sent first.-r,--requeststatβ request status reports for sent SMS. note: this option only makes sense if the phone supports routing of status reports to the TE. otherwise the status reports might show on the phone's display or get lost π«-sspool directory,--spoolspool directory β this option sets the spool directory wheregsmsmsdexpects SMS messages to send. the format of SMS files is very simple: the first line contains the phone number of the recipient. everything else after the first line is interpreted as the SMS text. please refer togsmsendsms(1)for details on the SMS text character set and maximum length.gsmsmsdpolls the spool directory every5seconds. sent SMS message files are removed.-tSMS store name,--storeSMS store name β the name of the SMS store to read from (for the--flushoption) or write to (for temporary SMS storage). this option must be must be used in conjunction with the--flushoption. if this option is omitted the ME uses it's default SMS store for temporary storage of incoming SMS. a commonly available message store is"SM"(SIM card).-v,--versionβ prints the program version.-X,--xonxoffβ uses software handshaking (XON/XOFF) for accessing the device.
π EXAMPLES π
the following invocation of gsmsmsd sends each incoming SMS message as a mail to the user "smsadmin":
gsmsmsd -d /dev/ttyS2 -b 19200 -a "mail smsadmin"
this is the format of SMS deliver messages as output from gsmsmsd:
----------------------------------------------------------------
Message type: SMS-DELIVER
SC address: '491710762100'
More messages to send: 1
Reply path: 0
User data header indicator: 0
Status report indication: 0
Originating address: '01805000102'
Protocol identifier: 0x39
Data coding scheme: default alphabet
SC timestamp: 17.12.98 14:10:55(+0100)
User data length: 159
User data header: 0x
User data: 'Nicht vergessen! Die XtraWeihnachtsverlosung lauft
noch bis zum 24.12. Nutzen Sie jetzt Ihre Gewinnchance und faxen
Sie Ihren Teiln.-Gutschein an 0180/5000 056'
----------------------------------------------------------------
this is the format of SMS status report messages as output from gsmsmsd:
----------------------------------------------------------------
Message type: SMS-STATUS-REPORT
SC address: ''
More messages to send: 0
Status report qualifier: 0
Message reference: 0
Recipient address: ''
SC timestamp: 00.00.00 00:00:00(+0000)
Discharge time: 00.00.00 00:00:00(+0000)
Status: 0x0 'Short message received by the SME'
----------------------------------------------------------------
the following invocation of gsmsmsd flushes all existing messages from the "SM" SMS store and looks in the "/tmp/spooldir" directory for SMS to send:
gsmsmsd -d /dev/ttyS2 --spool /tmp/spooldir -f --store sm \
--action 'mail smsadmin'
π FILES π
/dev/mobilephoneβ default mobile phone device. she lives here π
π AUTHOR π
Peter Hofmann <software@pxh.de> β the original main character, we stan.
π BUGS π
cell broadcast SMS message reception has not been tested, but it has been enabled in the gsmsmsd daemon. so like. good luck bestie β¨
the mobile phone device is blocked when the gsmsmsd daemon is running, ie. it cannot be used for data transfer or from the other programs of this suite (gsmpb, gsmsms). she's exclusive. she does not share.
report bugs to software@pxh.de. include a complete, self-contained example that will allow the bug to be reproduced, and say which version of gsmsmsd you are using. no vague "it's broken" DMs, we need receipts π
π COPYRIGHT π
Copyright Β© 1999 Peter Hofmann
gsmsmsd is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
gsmsmsd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU Library General Public License for more details.
you should have received a copy of the GNU Library General Public License along with gsmsmsd; see the file COPYING. if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
π§ SEE ALSO π§
gsminfo(7), gsmpb(1), gsmctl(1), gsmsendsms(1), gsmsmsstore(1).
and that's the whole vibe check, bestie π«Ά this was gsmsmsd v1.10, dated Sun Mar 31 18:20:52 UTC 2024. go forth, receive your SMSs, and hydrate πβ¨πΈ
π¦ where this page comes from
- ubuntu noble: gsm-utils 1.10+20120414.gita5e5ae9a-3build1
- ubuntu questing: gsm-utils 1.10+20120414.gita5e5ae9a-3build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms