📄 gsmsmsd.man
字号:
.\" -*- eval: (nroff-mode) -*-.de TQ.br.ns.TP \\$1...\" Like TP, but if specified indent is more than half.\" the current line-length - indent, use the default indent..de Tp.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP.el .TP "\\$1"...TH GSMSMSD 8 "##DATE##" "gsmsmsd v##VERSION##".PP.SH NAMEgsmsmsd \- SMS message reception daemon.PP.SH SYNOPSIS.B gsmsmsd[ \fB-a\fP \fIaction\fP ][ \fB--action\fP \fIaction\fP ][ \fB-b\fP \fIbaudrate\fP ][ \fB--baudrate\fP \fIbaudrate\fP ][ \fB-c\fP \fIconcatenatedID\fP ][ \fB--concatenate\fP \fIconcatenatedID\fP ][ \fB-C\fP \fIservice centre address\fP ][ \fB--sca\fP \fIservice centre address\fP ][ \fB-d\fP \fIdevice\fP ][ \fB--device\fP \fIdevice\fP ][ \fB-D\fP ][ \fB--direct\fP ][ \fB-f\fP ][ \fB--flush\fP ][ \fB-F\fP \fIfailed SMS directory\fP ][ \fB--failed\fP \fIfailed SMS directory\fP ][ \fB-h\fP ][ \fB--help\fP ][ \fB-I\fP \fIinit string\fP ][ \fB--init\fP \fIinit string\fP ][ \fB-L\fP ][ \fB--syslog\fP ][ \fB-P\fP \fIpriority levels\fP ][ \fB--priorities\fP \fIpriority levels\fP ][ \fB-r\fP ][ \fB--requeststat\fP ][ \fB-s\fP \fIspool directory\fP ][ \fB--spool\fP \fIspool directory\fP ][ \fB-S\fP \fIsent SMS directory\fP ][ \fB--sent\fP \fIsent SMS directory\fP ][ \fB-t\fP \fISMS store name\fP ][ \fB--store\fP \fISMS store name\fP ][ \fB-v\fP ][ \fB--version\fP ][ \fB-X\fP ][ \fB--xonxoff\fP ]{ \fIsms_type\fP }.PP.SH DESCRIPTION\fIgsmsmsd\fP reads new incoming SMS from the mobile phone anddispatches them to a user-defined action. Additionally it can send SMS message that it reads from a spooldir..PP\fIgsmsmsd\fP attaches itself to the \fIdevice\fP given on the commandline (usually an GSM modem) using the specified \fIbaudrate\fP andwaits for incoming SMS messages. If no \fIdevice\fP is given, thedevice \fI/dev/mobilephone\fP is used. If no \fIbaudrate\fP is given, adefault baud rate of 38400 is used..PPIf no action is given, the SMS message is printed to the standardoutput. If an \fIaction\fP is specified the \fIaction\fP is excecuted using theshell and the SMS message is written to the standard input of the action..PP\fIgsmsmsd\fP needs one empty storage slot for SMS messages in themobile phone, otherwise SMS reception will not work. The SMS store touse for temporary storage of incoming SMS can be selected using the\fB--store\fP option, otherwise the ME default store is used..PPTo terminate \fIgsmsmsd\fP cleanly (without losing SMS messages) oneshould send either SIGINT (CTRL-C on the command line) or SIGTERM tothe process..PPError messages are printed to the standard error output or are sentto the syslog daemon, if syslog is enabled and available. If the programterminates on error the error code 1 is returned..PP\fIsms_type\fP may be any combination of:.TP\fIsms\fP, \fIno_sms\fPControls reception of normal SMS messages..TP\fIcb\fP, \fIno_cb\fPControls reception of cell broadcast messages..TP\fIstat\fP, \fIno_stat\fPControls reception of status reports..PPThe default is \fIsms\fP, \fIcb\fP, and \fIstat\fP..PP.SH OPTIONS.TP\fB-a\fP \fIaction\fP, \fB--action\fP \fIaction\fPThe action to execute for each incoming SMS message. If no action is given the SMS is written to the standard output..TP\fB-b\fP \fIbaudrate\fP, \fB--baudrate\fP \fIbaudrate\fPThe baud rate to use..TP\fB-c\fP \fIconcatenatedID\fP, \fB--concatenate\fP \fIconcatenatedID\fPIf an ID is given, large SMSs are split into several, concatenatedSMSs. All SMSs have the same ID and are numbered consecutively so that the receiving phone can assemble them in the correct order. IDs mustbe in the range 0..255. This number is increased by one for everyoutgoing concatenated SMS and wraps around after 255.Not all receiving phones will supportconcatenated SMSs (and display them as separate SMSs),since all the numbering and ID information iscarried in the user data header element at the beginning of the SMSuser data. This information may show up as garbage in such phones..TP\fB-C\fP \fIservice centre address\fP, \fB--sca\fP \fIservice centre address\fPSets the service centre address to use for all SUBMIT SMSs (may notwork with some phones)..TP\fB-d\fP \fIdevice\fP, \fB--device\fP \fIdevice\fPThe device to which the GSM modem is connected. The default is\fI/dev/mobilephone\fP..TP\fB-D\fP, \fB--direct\fPEnables direct routing of incoming SMS messages to the TE. This is notsupported by many mobile phone/GSM modem combinations. Therefore, thedefault is to store incoming SMS temporarily before processing them in the indicated store..TP\fB-F\fP \fIfailed SMS directory\fP, \fB--failed\fP \fIfailed SMS directory\fPMoves failed SMS messages to the given directory. If this option is not given,failed SMS will be removed..TP\fB-f\fP, \fB--flush\fPThis option causes \fIgsmsmsd\fP to flush (ie. read and erase)existing SMS messages fromthe SMS store selected by the \fB--store\fP option. The action givenby the \fB--action\fP option is executed on each of the flushedSMS. This option should be used to ensure that enough space isavailable in the SMS store for temporary storage of incoming SMS,otherwise incoming SMS might be ignored silently by the ME..TP\fB-h\fP, \fB--help\fPPrints an option summary..TP\fB-I\fP \fIinit string\fP, \fB--init\fP \fIinit string\fPInitialization string to send to the TA (default: "E0"). Note that thesequence "ATZ" is sent first..TP\fB-L\fP, \fB--syslog\fPSend errors and information to the syslog daemon if available..TP\fB-P\fP \fIpriority levels\fP, \fB--priorities\fP \fIpriority levels\fPActivates the priority system and sets thenumber or levels to use, see the \fBPRIORITY SYSTEM\fR section..TP\fB-r\fP, \fB--requeststat\fPRequest status reports for sent SMS. Note: This option only makessense if the phone supports routing of status reports to theTE. Otherwise the status reports might show on the phone's display orget lost..TP\fB-s\fP \fIspool directory\fP, \fB--spool\fP \fIspool directory\fPThis option sets the spool directory where \fIgsmsmsd\fP expects SMSmessages to send. The format of SMS files is very simple: The firstline contains the phone number of the recipient. Everything else after the first line is interpreted as the SMS text. Please refer to .BR gsmsendsms(1)for details on the SMS text character set and maximum length.\fIgsmsmsd\fP polls the spool directory every 5 seconds. SentSMS message files are removed by default..TP\fB-S\fP \fIsent SMS directory\fP, \fB--sent\fP \fIsent SMS directory\fPMoves sent SMS messages to the given directory. If this option is not given,sent SMS will be removed..TP\fB-t\fP \fISMS store name\fP, \fB--store\fP \fISMS store name\fPThe name of the SMS store to read from (for the \fB--flush\fP option)or write to (for temporary SMS storage). This option mustbe must be used in conjunction with the \fB--flush\fP option. If thisoption is omitted the ME uses it's default SMS store for temporarystorage of incoming SMS. A commonly available messagestore is "SM" (SIM card)..TP\fB-v\fP, \fB--version\fPPrints the program version..TP\fB-X\fP, \fB--xonxoff\fPUses software handshaking (XON/XOFF) for accessing the device..PP.SH PRIORITY SYSTEMIf the \fB--priorities\fP option is given, the priority system is activatedand the number of priority levels is set. There must be directories named<given spool directory name>+<priority level> for every level. This includesthe directories given in the \fB--failed\fP and \fB--sent\fP options if theyare used. See the \fBEXAMPLES\fR section..PP.SH EXAMPLESThe following invocation of \fIgsmsmsd\fP sends each incoming SMS messageas a mail to the user "smsadmin":.PP.nfgsmsmsd -d /dev/ttyS2 -b 19200 -a "mail smsadmin".fi.PPThis is the format of SMS deliver messages as output from \fIgsmsmsd\fP:.PP.nf----------------------------------------------------------------Message type: SMS-DELIVERSC address: '491710762100'More messages to send: 1Reply path: 0User data header indicator: 0Status report indication: 0Originating address: '01805000102'Protocol identifier: 0x39Data coding scheme: default alphabetSC timestamp: 17.12.98 14:10:55(+0100)User data length: 159User data header: 0xUser data: 'Nicht vergessen! Die XtraWeihnachtsverlosung lauftnoch bis zum 24.12. Nutzen Sie jetzt Ihre Gewinnchance und faxenSie Ihren Teiln.-Gutschein an 0180/5000 056'----------------------------------------------------------------.fi.PPThis is the format of SMS status report messages as output from \fIgsmsmsd\fP:.PP.nf----------------------------------------------------------------Message type: SMS-STATUS-REPORTSC address: ''More messages to send: 0Status report qualifier: 0Message reference: 0Recipient 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'----------------------------------------------------------------.fi.PPThe following invocation of \fIgsmsmsd\fP flushes all existingmessages from the "SM" SMS store and looks in the "/tmp/spooldir"directory for SMS to send:.PP.nfgsmsmsd -d /dev/ttyS2 --spool /tmp/spooldir -f --store sm \\--action 'mail smsadmin'.fi.PPThe following invocation of \fIgsmsmsd\fP uses the priority system withtwo levels and preserves sent and failed SMS. It requires the followingdirectories in /var/spool/sms/:queue1/ queue2/ send1/ send2/ failed1/ failed2/.brBefore sending one SMS from queue2, all pending SMS from queue1 will be sent.Sent messages from queue1 will be moved to send1, sent messages from queue2to send2. Failed messages will be moved to failed1 and failed2..PP.nfgsmsmsd -d /dev/ttyS2 -P 2 -s /var/spool/sms/queue \\-S /var/spool/sms/send -F /var/spool/sms/failed.fi.PP.SH FILES.TP 1.4i.B /dev/mobilephoneDefault mobile phone device..PP.SH AUTHORSPeter Hofmann <software@pxh.de> (main work).brMatthias Goebl <matthias.goebl@goebl.net> (priority system, error restart, syslog).PP.SH BUGSCell broadcast SMS message reception has not been tested, but it hasbeen enabled in the \fIgsmsmsd\fP daemon..PPThe mobile phone device is blocked when the \fIgsmsmsd\fP daemon isrunning, ie. it cannot be used for data transfer or from the otherprograms of this suite (\fIgsmpb\fP, \fIgsmsms\fP)..PPReport bugs to software@pxh.de. Include a complete, self-containedexample that will allow the bug to be reproduced, and say whichversion of \fIgsmsmsd\fP you are using..PP.SH COPYRIGHTCopyright \(co 1999 Peter Hofmann.LP\fIgsmsmsd\fP is free software; you can redistribute it and/or modify it underthe terms of the GNU Library General Public License as published by the FreeSoftware Foundation; either version 2, or (at your option) any laterversion..LP\fIgsmsmsd\fP is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNULibrary General Public License for more details..LPYou should have received a copy of the GNU Library General Public License alongwith \fIgsmsmsd\fP; see the file COPYING. If not, write to the Free SoftwareFoundation, 675 Mass Ave, Cambridge, MA 02139, USA..PP.SH "SEE ALSO".BR gsminfo(7),.BR gsmpb(1),.BR gsmctl(1),.BR gsmsendsms(1),.BR gsmsmsstore(1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -