| 1 |
.\" -*- eval: (nroff-mode) -*- |
| 2 |
.de TQ |
| 3 |
.br |
| 4 |
.ns |
| 5 |
.TP \\$1 |
| 6 |
.. |
| 7 |
.\" Like TP, but if specified indent is more than half |
| 8 |
.\" the current line-length - indent, use the default indent. |
| 9 |
.de Tp |
| 10 |
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP |
| 11 |
.el .TP "\\$1" |
| 12 |
.. |
| 13 |
.TH GSMSMSD 8 "##DATE##" "gsmsmsd v##VERSION##" |
| 14 |
.PP |
| 15 |
.SH NAME |
| 16 |
gsmsmsd \- SMS message reception daemon |
| 17 |
.PP |
| 18 |
.SH SYNOPSIS |
| 19 |
.B gsmsmsd |
| 20 |
[ \fB\-a\fP \fIaction\fP ] |
| 21 |
[ \fB\-\-action\fP \fIaction\fP ] |
| 22 |
[ \fB\-b\fP \fIbaudrate\fP ] |
| 23 |
[ \fB\-\-baudrate\fP \fIbaudrate\fP ] |
| 24 |
[ \fB\-c\fP \fIconcatenatedID\fP ] |
| 25 |
[ \fB\-\-concatenate\fP \fIconcatenatedID\fP ] |
| 26 |
[ \fB\-C\fP \fIservice centre address\fP ] |
| 27 |
[ \fB\-\-sca\fP \fIservice centre address\fP ] |
| 28 |
[ \fB\-d\fP \fIdevice\fP ] |
| 29 |
[ \fB\-\-device\fP \fIdevice\fP ] |
| 30 |
[ \fB\-D\fP ] |
| 31 |
[ \fB\-\-direct\fP ] |
| 32 |
[ \fB\-f\fP ] |
| 33 |
[ \fB\-\-flush\fP ] |
| 34 |
[ \fB\-h\fP ] |
| 35 |
[ \fB\-\-help\fP ] |
| 36 |
[ \fB\-I\fP \fIinit string\fP ] |
| 37 |
[ \fB\-\-init\fP \fIinit string\fP ] |
| 38 |
[ \fB\-r\fP ] |
| 39 |
[ \fB\-\-requeststat\fP ] |
| 40 |
[ \fB\-s\fP \fIspool directory\fP ] |
| 41 |
[ \fB\-\-spool\fP \fIspool directory\fP ] |
| 42 |
[ \fB\-t\fP \fISMS store name\fP ] |
| 43 |
[ \fB\-\-store\fP \fISMS store name\fP ] |
| 44 |
[ \fB\-v\fP ] |
| 45 |
[ \fB\-\-version\fP ] |
| 46 |
[ \fB\-X\fP ] |
| 47 |
[ \fB\-\-xonxoff\fP ] |
| 48 |
{ \fIsms_type\fP } |
| 49 |
.PP |
| 50 |
.SH DESCRIPTION |
| 51 |
\fIgsmsmsd\fP reads new incoming SMS from the mobile phone and |
| 52 |
dispatches them to a user-defined action. Additionally it can send SMS |
| 53 |
message that it reads from a spooldir. |
| 54 |
.PP |
| 55 |
\fIgsmsmsd\fP attaches itself to the \fIdevice\fP given on the command |
| 56 |
line (usually an GSM modem) using the specified \fIbaudrate\fP and |
| 57 |
waits for incoming SMS messages. If no \fIdevice\fP is given, the |
| 58 |
device \fI/dev/mobilephone\fP is used. If no \fIbaudrate\fP is given, a |
| 59 |
default baud rate of 38400 is used. |
| 60 |
.PP |
| 61 |
If no action is given, the SMS message is printed to the standard |
| 62 |
output. If an \fIaction\fP is specified the \fIaction\fP is excecuted using the |
| 63 |
shell and the SMS message is written to the standard input of the action. |
| 64 |
.PP |
| 65 |
\fIgsmsmsd\fP needs one empty storage slot for SMS messages in the |
| 66 |
mobile phone, otherwise SMS reception will not work. The SMS store to |
| 67 |
use for temporary storage of incoming SMS can be selected using the |
| 68 |
\fB\-\-store\fP option, otherwise the ME default store is used. |
| 69 |
.PP |
| 70 |
To terminate \fIgsmsmsd\fP cleanly (without losing SMS messages) one |
| 71 |
should send either SIGINT (CTRL\-C on the command line) or SIGTERM to |
| 72 |
the process. |
| 73 |
.PP |
| 74 |
Error messages are printed to the standard error output. If the program |
| 75 |
terminates on error the error code 1 is returned. |
| 76 |
.PP |
| 77 |
\fIsms_type\fP may be any combination of: |
| 78 |
.TP |
| 79 |
\fIsms\fP, \fIno_sms\fP |
| 80 |
Controls reception of normal SMS messages. |
| 81 |
.TP |
| 82 |
\fIcb\fP, \fIno_cb\fP |
| 83 |
Controls reception of cell broadcast messages. |
| 84 |
.TP |
| 85 |
\fIstat\fP, \fIno_stat\fP |
| 86 |
Controls reception of status reports. |
| 87 |
.PP |
| 88 |
The default is \fIsms\fP, \fIcb\fP, and \fIstat\fP. |
| 89 |
.PP |
| 90 |
.SH OPTIONS |
| 91 |
.TP |
| 92 |
\fB\-a\fP \fIaction\fP, \fB\-\-action\fP \fIaction\fP |
| 93 |
The action to execute for each incoming SMS message. If no action |
| 94 |
is given the SMS is written to the standard output. |
| 95 |
.TP |
| 96 |
\fB\-b\fP \fIbaudrate\fP, \fB\-\-baudrate\fP \fIbaudrate\fP |
| 97 |
The baud rate to use. |
| 98 |
.TP |
| 99 |
\fB\-c\fP \fIconcatenatedID\fP, \fB\-\-concatenate\fP \fIconcatenatedID\fP |
| 100 |
If an ID is given, large SMSs are split into several, concatenated |
| 101 |
SMSs. All SMSs have the same ID and are numbered consecutively so that |
| 102 |
the receiving phone can assemble them in the correct order. IDs must |
| 103 |
be in the range 0..255. This number is increased by one for every |
| 104 |
outgoing concatenated SMS and wraps around after 255. |
| 105 |
Not all receiving phones will support |
| 106 |
concatenated SMSs (and display them as separate SMSs), |
| 107 |
since all the numbering and ID information is |
| 108 |
carried in the user data header element at the beginning of the SMS |
| 109 |
user data. This information may show up as garbage in such phones. |
| 110 |
.TP |
| 111 |
\fB\-C\fP \fIservice centre address\fP, \fB\-\-sca\fP \fIservice centre address\fP |
| 112 |
Sets the service centre address to use for all SUBMIT SMSs (may not |
| 113 |
work with some phones). |
| 114 |
.TP |
| 115 |
\fB\-d\fP \fIdevice\fP, \fB\-\-device\fP \fIdevice\fP |
| 116 |
The device to which the GSM modem is connected. The default is |
| 117 |
\fI/dev/mobilephone\fP. |
| 118 |
.TP |
| 119 |
\fB\-D\fP, \fB\-\-direct\fP |
| 120 |
Enables direct routing of incoming SMS messages to the TE. This is not |
| 121 |
supported by many mobile phone/GSM modem combinations. Therefore, the |
| 122 |
default is to store incoming SMS temporarily before processing them in |
| 123 |
the indicated store. |
| 124 |
.TP |
| 125 |
\fB\-f\fP, \fB\-\-flush\fP |
| 126 |
This option causes \fIgsmsmsd\fP to flush (ie. read and erase) |
| 127 |
existing SMS messages from |
| 128 |
the SMS store selected by the \fB\-\-store\fP option. The action given |
| 129 |
by the \fB\-\-action\fP option is executed on each of the flushed |
| 130 |
SMS. This option should be used to ensure that enough space is |
| 131 |
available in the SMS store for temporary storage of incoming SMS, |
| 132 |
otherwise incoming SMS might be ignored silently by the ME. |
| 133 |
.TP |
| 134 |
\fB\-h\fP, \fB\-\-help\fP |
| 135 |
Prints an option summary. |
| 136 |
.TP |
| 137 |
\fB\-I\fP \fIinit string\fP, \fB\-\-init\fP \fIinit string\fP |
| 138 |
Initialization string to send to the TA (default: "E0"). Note that the |
| 139 |
sequence "ATZ" is sent first. |
| 140 |
.TP |
| 141 |
\fB\-r\fP, \fB\-\-requeststat\fP |
| 142 |
Request status reports for sent SMS. Note: This option only makes |
| 143 |
sense if the phone supports routing of status reports to the |
| 144 |
TE. Otherwise the status reports might show on the phone's display or |
| 145 |
get lost. |
| 146 |
.TP |
| 147 |
\fB\-s\fP \fIspool directory\fP, \fB\-\-spool\fP \fIspool directory\fP |
| 148 |
This option sets the spool directory where \fIgsmsmsd\fP expects SMS |
| 149 |
messages to send. The format of SMS files is very simple: The first |
| 150 |
line contains the phone number of the recipient. Everything else after |
| 151 |
the first line is interpreted as the SMS text. Please refer to |
| 152 |
.BR gsmsendsms(1) |
| 153 |
for details on the SMS text character set and maximum length. |
| 154 |
\fIgsmsmsd\fP polls the spool directory every 5 seconds. Sent |
| 155 |
SMS message files are removed. |
| 156 |
.TP |
| 157 |
\fB\-t\fP \fISMS store name\fP, \fB\-\-store\fP \fISMS store name\fP |
| 158 |
The name of the SMS store to read from (for the \fB\-\-flush\fP option) |
| 159 |
or write to (for temporary SMS storage). This option must |
| 160 |
be must be used in conjunction with the \fB\-\-flush\fP option. If this |
| 161 |
option is omitted the ME uses it's default SMS store for temporary |
| 162 |
storage of incoming SMS. A commonly available message |
| 163 |
store is "SM" (SIM card). |
| 164 |
.TP |
| 165 |
\fB\-v\fP, \fB\-\-version\fP |
| 166 |
Prints the program version. |
| 167 |
.TP |
| 168 |
\fB\-X\fP, \fB\-\-xonxoff\fP |
| 169 |
Uses software handshaking (XON/XOFF) for accessing the device. |
| 170 |
.PP |
| 171 |
.SH EXAMPLES |
| 172 |
The following invocation of \fIgsmsmsd\fP sends each incoming SMS message |
| 173 |
as a mail to the user "smsadmin": |
| 174 |
.PP |
| 175 |
.nf |
| 176 |
gsmsmsd \-d /dev/ttyS2 \-b 19200 \-a "mail smsadmin" |
| 177 |
.fi |
| 178 |
.PP |
| 179 |
This is the format of SMS deliver messages as output from \fIgsmsmsd\fP: |
| 180 |
.PP |
| 181 |
.nf |
| 182 |
---------------------------------------------------------------- |
| 183 |
Message type: SMS\-DELIVER |
| 184 |
SC address: '491710762100' |
| 185 |
More messages to send: 1 |
| 186 |
Reply path: 0 |
| 187 |
User data header indicator: 0 |
| 188 |
Status report indication: 0 |
| 189 |
Originating address: '01805000102' |
| 190 |
Protocol identifier: 0x39 |
| 191 |
Data coding scheme: default alphabet |
| 192 |
SC timestamp: 17.12.98 14:10:55(+0100) |
| 193 |
User data length: 159 |
| 194 |
User data header: 0x |
| 195 |
User data: 'Nicht vergessen! Die XtraWeihnachtsverlosung lauft |
| 196 |
noch bis zum 24.12. Nutzen Sie jetzt Ihre Gewinnchance und faxen |
| 197 |
Sie Ihren Teiln.-Gutschein an 0180/5000 056' |
| 198 |
---------------------------------------------------------------- |
| 199 |
.fi |
| 200 |
.PP |
| 201 |
This is the format of SMS status report messages as output from \fIgsmsmsd\fP: |
| 202 |
.PP |
| 203 |
.nf |
| 204 |
---------------------------------------------------------------- |
| 205 |
Message type: SMS\-STATUS\-REPORT |
| 206 |
SC address: '' |
| 207 |
More messages to send: 0 |
| 208 |
Status report qualifier: 0 |
| 209 |
Message reference: 0 |
| 210 |
Recipient address: '' |
| 211 |
SC timestamp: 00.00.00 00:00:00(+0000) |
| 212 |
Discharge time: 00.00.00 00:00:00(+0000) |
| 213 |
Status: 0x0 'Short message received by the SME' |
| 214 |
---------------------------------------------------------------- |
| 215 |
.fi |
| 216 |
.PP |
| 217 |
The following invocation of \fIgsmsmsd\fP flushes all existing |
| 218 |
messages from the "SM" SMS store and looks in the "/tmp/spooldir" |
| 219 |
directory for SMS to send: |
| 220 |
.PP |
| 221 |
.nf |
| 222 |
gsmsmsd \-d /dev/ttyS2 \-\-spool /tmp/spooldir \-f \-\-store sm \\ |
| 223 |
\-\-action 'mail smsadmin' |
| 224 |
.fi |
| 225 |
.PP |
| 226 |
.SH FILES |
| 227 |
.TP 1.4i |
| 228 |
.B /dev/mobilephone |
| 229 |
Default mobile phone device. |
| 230 |
.PP |
| 231 |
.SH AUTHOR |
| 232 |
Peter Hofmann <[email protected]> |
| 233 |
.PP |
| 234 |
.SH BUGS |
| 235 |
Cell broadcast SMS message reception has not been tested, but it has |
| 236 |
been enabled in the \fIgsmsmsd\fP daemon. |
| 237 |
.PP |
| 238 |
The mobile phone device is blocked when the \fIgsmsmsd\fP daemon is |
| 239 |
running, ie. it cannot be used for data transfer or from the other |
| 240 |
programs of this suite (\fIgsmpb\fP, \fIgsmsms\fP). |
| 241 |
.PP |
| 242 |
Report bugs to [email protected]. Include a complete, self-contained |
| 243 |
example that will allow the bug to be reproduced, and say which |
| 244 |
version of \fIgsmsmsd\fP you are using. |
| 245 |
.PP |
| 246 |
.SH COPYRIGHT |
| 247 |
Copyright \(co 1999 Peter Hofmann |
| 248 |
.LP |
| 249 |
\fIgsmsmsd\fP is free software; you can redistribute it and/or modify it under |
| 250 |
the terms of the GNU Library General Public License as published by the Free |
| 251 |
Software Foundation; either version 2, or (at your option) any later |
| 252 |
version. |
| 253 |
.LP |
| 254 |
\fIgsmsmsd\fP is distributed in the hope that it will be useful, but |
| 255 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 256 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 257 |
Library General Public License for more details. |
| 258 |
.LP |
| 259 |
You should have received a copy of the GNU Library General Public License along |
| 260 |
with \fIgsmsmsd\fP; see the file COPYING. If not, write to the Free Software |
| 261 |
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 262 |
.PP |
| 263 |
.SH "SEE ALSO" |
| 264 |
.BR gsminfo(7), |
| 265 |
.BR gsmpb(1), |
| 266 |
.BR gsmctl(1), |
| 267 |
.BR gsmsendsms(1), |
| 268 |
.BR gsmsmsstore(1). |
| 269 |
|