Initial untested implementation of --ring-send.
[mdsms.git] / mdsms.1.in
1 .TH MDSMS 1 "30 Oct 1999" ~     VERSION ~ "MDSMS Manual"
2
3 .\~ $Id$
4
5 .SH NAME
6 mdsms \- Mobile Device SMS tool
7
8 .SH SYNOPSIS
9 .BR "mdsms --send" [ -mobildock ]
10 .RB options...
11 .RB [ "\-f" ]
12 .BR "<dest. phone>"
13 .BR "<msg text>"
14 .br
15 .BR "mdsms --receive"
16 .RB options...
17 .BR "<command name>"
18 .br
19 .BR "mdsms --logo-send"
20 .RB options...
21 .BR "<dest. phone>"
22 .BR "<logo filename>"
23 .RB [ "<GSMnet id>" ]
24 .br
25 .BR "mdsms --ring-send"
26 .RB options...
27 .BR "<dest. phone>"
28 .BR "<ring filename>"
29 .br
30 options:
31 .RB [ "-c <cfgfile>" ]
32 .RB [ "-d <device>" ]
33 .RB [ "-L <file>" ]
34 .RB [ "-b <rate>" ]
35 .RB [ "-l <lockfile>" ]
36 .RB [ "-s <smsc #>" ]
37 .RB [ "-m <#>" ]
38 .RB [ "-r <sec>" ]
39 .RB [ "-t <msec>" ]
40 .RB [ "-T <msec>" ]
41 .RB [ "\-vhV" ]
42
43 .SH DESCRIPTION
44 Program sends one SmartMessaging SMS through one of the supported mobile
45 device connected through the serial port. Currently supported:
46 .RS
47 .TP
48 .B Nokia Communicator 9000/9000i
49 All modes except \fB--logo-send\fP and Nokia multiparts supported.
50 .TP
51 .B Nokia Communicator 9110
52 All modes except Nokia multiparts supported. This is the only device
53 with \fB--logo-send\fP capability for now.
54 .TP
55 .B Siemens M20
56 Firmware revision 2.0 required. All modes except \fB--logo-send\fP supported.
57 .RE
58
59 .SH OPTIONS
60 .TP
61 .BR -c | --config\  < cfgfile >
62 Process recursively this file and read all options from it. See the section
63 .B CONFIGURATION
64 for more information.
65 .TP
66 .BR -d | --device\  < device >
67 Specify serial device to communicate with your mobile. If only bare name is
68 specified, "\fB/dev/\fP" is prepended automatically. This device name is used
69 subsequently with
70 .BR -l | --lockfile
71 option, see below.
72 .TP
73 .BR -L | --log\  < file >
74 Log all important messages to this file preceded by timestamp, machine hostname
75 etc., similar to output of
76 .BR syslogd (8).
77 If set to empty string (which is default - ~\fB DEF_LOGNAME     \fP~), nothing
78 is logged anywhere.
79 .TP
80 .BR -b | --baud\  < rate >
81 Sets custom baudrate for accessing Nokia modem. Supported speeds are currently:
82 \fB2400\fP,
83 \fB4800\fP,
84 \fB9600\fP,
85 \fB19200\fP,
86 \fB38400\fP,
87 \fB57600\fP. Default is \fB     DEF_BAUD        \fP.
88 .TP
89 .BR -l | --lockfile\  < lockfile >
90 Prior to accessing serial device specified above the lockfile should be
91 acquired for correct concurrent processes behaviour. Although this name
92 can be given as direct filename more common method is to use pattern
93 with embedded "\fB%s\fP" where this mark is replaced by actual basename
94 (last component of pathname with all preceding directory names stripped)
95 of serial device used.
96 Default name for lockfile is ~\fB       DEF_LOCKFILE    \fP~.
97 .TP
98 .BR -s | --smsc\  < smsc\ # >
99 Specify custom SMS center number. If not specified (or overriden as empty
100 string by \fB-s ""\fP)
101 .B mdsms
102 asks by "\fBAT+CSCA?\fP"
103 for the current default SMS center. Situation with undeterminable SMS center
104 is unrecoverable and casues immediate fail. It is a common practice to use
105 plus sign ("\fB+\fP") to indicate international number type.
106 Known SMS centers as of May 1999:
107 .RS
108 .TP
109 .BR "CZ Paegas " ( "230 01" "): " +420603052000
110 .TP
111 .BR "CZ EuroTel " ( "230 02" "): " +420602909909
112 .RE
113 .TP
114 .BR -m | --maxretry\  < # >
115 Maximum retries of any \fBAT\fP-style command during the session. All the
116 retries are summed during one run of
117 .B mdsms
118 and no more retries of the command are permitted. After exceeding this
119 value the program is terminated. Exception is \fB--receive\fP which is never
120 quit after the initial initialisation has been successfuly negotiated.
121 .TP
122 .BR -r | --readtime\  < sec >
123 Maximum response read timeout before command retry.
124 .B mdsms
125 sends the requested \fBAT\fP-style command to
126 <<<<<<< mdsms.1.in
127 .B MobilDock
128 and expects response. Unfortunately when the voice call is in progress,
129 .B MobilDock
130 \80will block any serial device communication and it is impossible to differentiate
131 between calling
132 .B MobilDock
133 and stucked/disconnected one. After exceeding this time interval,
134 .B mdsms
135 is terminated immediately,
136 .B maxretry
137 parameter notwithstanding. Standard value is
138 =======
139 .B Nokia
140 and expects response. After exceeding this time interval,
141 .B sms9110
142 reissues the last command until the maximum retry count (\fBmaxretry\fP) is exhausted.
143 Standard value is
144 >>>>>>> 1.5.2.2
145 .BR DEF_READTIME
146 <<<<<<< mdsms.1.in
147 \80seconds and should be enough for any voice call.
148 =======
149 seconds and should be enough for standard
150 .B Nokia
151 responses.
152 >>>>>>> 1.5.2.2
153 .TP
154 .BR -t | --chartime\  < msec >
155 Although the fixed used baudrate of
156 .B 19200
157 is pretty low, MobilDock/Siemens A1 couple
158 .RB "aren't"
159 able to accept steady
160 stream of data at this speed. Even the used XON/XOFF handshaking is just not
161 enough. The only possible workaround is to slowdown the communication by
162 waiting a bit after character sent to give relax time to these devices.
163 When full rate communication was used, occasional longer SMS data corruption
164 was observed. Argument is given in milliseconds and its default value is
165 .BR DEF_CHARTIME ms.
166 \fB(This paragraph\fP
167 .BR "doesn't"
168 \fBapply to Nokia 9110 but the functionality has been
169 retained just to be on the safe side.)\fP
170 .TP
171 .BR -T | --cmdtime\  < msec >
172 This delay is given before sending any
173 .B AT-style
174 command to Nokia.
175 Its primary purpose is to let any previous entered commands to finish and
176 to clear any input before actually sending our own command. Also all Siemens
177 devices are known that they strongly dislike fast edge-to-edge communication
178 and to satisfy these requirements this delay was considered as the best
179 approach.
180 \fB(This sentence\fP
181 .BR "doesn't"
182 \fBapply to Nokia 9110 but the functionality has been
183 retained just to be on the safe side.)\fP
184 The default value is
185 .BR DEF_CMDTIME ms.
186 .TP
187 <<<<<<< mdsms.1.in
188 \80.BR -f | --file
189 When parameter <\fBmsg text\fP> has been specified, by using this option
190 \fBmdsms\fP will read the file with the <\fBmsg text\fP> filename instead
191 and send its \fBcontents\fP as the SMS message.
192 .TP
193 =======
194 >>>>>>> 1.5.2.2
195 .BR -v | --verbose
196 Increase verbosity level by one. Currently the maximum defined level is
197 .BR 3 ,
198 the default value is
199 .BR 0 .
200 .TP
201 .BR -h | --help
202 Give short parameters description to
203 .I stderr
204 (standard error output stream).
205 .TP
206 .BR -V | --version
207 Print the version number and exit.
208 .TP
209 .RB < "dest. phone" >
210 This mandatory parameter specifies the telephone number of the recipient
211 of SmartMessaging message. International prefix character plus
212 .RB ( + )
213 is supported the national mode without plus
214 .RB ( + )
215 prefix is supported and the meaning is specific to the GSM operator currently
216 being roamed in (NOT the native
217 .RB "'home'"
218 operator of the SIM card!).
219 This number can be made default in system configuration files, see below
220 for section
221 .BR CONFIGURATION .
222 .TP
223 .RB < "logo filename" >
224 Here you specifify the filename of the logo file to be uploaded. Currently
225 recognized file formats are \fBNOL\fP (Nokia logo?) and \fBNGG\fP (Nokia
226 Group Graphics). These formats are proprietary by \fBKESSLER Wireless Design\fP
227 and \fBsms9110\fP currently "can't" edit them. More info can be found on:
228 .RS
229 .B http:/       /www.kessler-design.com/wireless/operatorlogo.php3
230 .RE
231 .TP
232 <<<<<<< mdsms.1.in
233 \80.RB < "msg text" >
234 Here you write the exact body of the message. This parameter should be
235 specified only as one component, although if more found they are concatenated
236 with separating space (" "). But this practice is discouraged as
237 your shell will probably remove any multiple spaces found and also other
238 metacharacters may be incorrectly interpreted. To prevent any escaping
239 mess, you may prefer to omit this parameter and the the message text is
240 then read from
241 .I stdin
242 (standard input stream).
243 =======
244 .RB < "GSMnet id" >
245 Specify GSM network code to be set on the logo being uploaded. Upon upload to
246 Nokia phone each operator logo has a GSM network code binded with it. When
247 you are registered (even roamed) into such network the logo is displayed on
248 the phone. Current Nokia mobile phones can handle only one logo loaded
249 simultaneously, it will be rewritten by any other upload. You can also
250 specify string ~\fB     WORD_GROUP      \fP~ to send the logo as group graphics
251 (even from \fBNOL\fP format) or string ~\fB     WORD_NET        \fP~ to force detection
252 of network code from \fBNOL\fP. The default if this parameter is not specified
253 is ~\fB WORD_NET        \fP~ for \fBNOL\fP files and ~\fB       WORD_GROUP      \fP~ for
254 \fBNGG\fP files.
255 >>>>>>> 1.5.2.2
256
257 .SH CONFIGURATION
258 .B sms9110
259 reads ~\fB      CONFIG_MAIN     \fP~ followed by ~\fB$HOME      CONFIG_HOME     \fP~
260 configuration files. The content of these files (and also any file read by
261 .BR -c | --config
262 option)
263 has the usual
264 .BR getopt (3)
265 syntax with dashes. Newlines are taken as whitespace, both double ("\fB~\fP")
266 and single ("\fB'\fP")
267 quoting is supported. Embedded quote characters can be escaped by backslash
268 ("\fB\\\fP").
269 Arguments are processes in order as specified in configuration files and
270 finally the command-line of the program itself, overriding any previous
271 values.  Although the order of
272 .BR -c | --config
273 options on one line is preserved the first file is read AFTER all of the
274 current options are processed. Recursive use of
275 .B -c
276 is permitted and the files are read in LIFO (Last-In First-Out, AKA stack)
277 order. You should use "\fB-v -v\fP"
278 to see details of option processing with more complex configuration setups.
279
280 .SH OPERATION
281 Upon startup
282 .B sms9110
283 locks the port (see option
284 .BR -l | --lockfile
285 for details) and opens the serial device with specified baudrate (default
286 \fB     DEF_BAUD        \fP baud), software handshaking (XON/XOFF style), 8 bits,
287 no parity. Then issues the following commands:
288 .TP
289 .BR AT <ESCAPE>
290 .B AT
291 <<<<<<< mdsms.1.in
292 \80is used to fool MobilDock and pass the following
293 .B <CTRL-Z>
294 (ascii decimal code 26) character to Siemens A1 and break it from eventual
295 =======
296 is used to fool Nokia and pass the following
297 .B <ESCAPE>
298 (ascii decimal code 27) character to Nokia and break it from eventual
299 >>>>>>> 1.5.2.2
300 .B AT+CMGS
301 mode in which it may errorneously remain from previous sessions.
302 .TP
303 .B AT
304 Test the responsiveness of Nokia.
305 .TP
306 \fBAT+CSCA="\fPsmc # from user\fB"\fP
307 This command is omitted if
308 .B "smsc #"
309 is not specified by user (or specified/overriden as empty string \fB""\fP
310 .TP
311 \fBAT+CSCA?\fP
312 <<<<<<< mdsms.1.in
313 Query the currently set SMC center number to include it later to the
314 header of SMS PDU format where it is required. If \fBAT+CSCA="\fP...\fB"\fP
315 was issued before, this number should match it but no sanity checks are
316 currently do so.
317 .TP
318 \80\fBAT+CMGF=0\fP
319 Set the default SMS message format to PDU type. Currently Siemens A1
320 .RB "doesn't"
321 support any other SMS format anyway.
322 =======
323 Query the currently set SMC center number to detect possibly unset SMS center.
324 .TP
325 \fBAT+CSMP=81,,0,245\fP
326 Sets PDU type to 81 (\fBSMS-SUBMIT\fP + integer-type for \fBvalidity\fP
327 + \fBUDHI\fP - user data header indicator), PID (protocol identifier) to
328 0 (standard non-converted SMS) and DCS (data coding scheme) to 0xF5
329 (\fBdata coding\fP/\fBmessage class\fP, \fB8-bit data\fP + \fBmobile-equipment\fP
330 specific).
331 >>>>>>> 1.5.2.2
332 .TP
333 <<<<<<< mdsms.1.in
334 \80\fBAT+CMGS=\fP# chars
335 =======
336 \fBAT+CMGS="\fPphone # from user\fB"\fP
337 >>>>>>> 1.5.2.2
338 This command physically sends the message and the resulting "\fB+CMGS:\fP" output
339 is catched and returned as
340 .B MR
341 (message reference) number to the user.
342 .TP
343 \fBAT+CSMP=17,,0,0\fP
344 Resets back PDU type to 17 (\fBSMS-SUBMIT\fP + integer-type for \fBvalidity\fP),
345 PID (protocol identifier) to 0 (standard non-converted SMS) and DCS (data coding
346 scheme) to 0 (\fBalphabet indication\fP, \fBdefault 7-bit alphabet\fP).
347 .TP
348 \fBAT\fP
349 Check that Nokia survived the sending of the message.
350
351 .SH SEE ALSO
352 .TP
353 .B GSM 03.40
354 ETSI documentation for SMS messages in GSM networks
355 .TP
356 .B GNokii, tools and drivers for Nokia mobile phones
357 Nokia logo data format was read from its sources:
358 .B http:/       www.gnokii.org/
359 .TP
360 .B "Developers'" Guide: SMS with the A1
361 Tech note on PDU SMS format etc:
362 .B http:/               /www.siemens.se/telefoner/ovrigtgsm/fragorsvar/a1_sms.pdf
363 .TP
364 .B Technical Description of the Siemens A1
365 Siemens A1 command description
366 .B http:/               /www.siemens.se/telefoner/ovrigtgsm/fragorsvar/a1_manual.pdf
367
368 .SH FILES
369 .TP
370 \fB     CONFIG_MAIN     \fP
371 Main configuration file
372 .TP
373 \fB$HOME        CONFIG_HOME     \fP
374 User personalized local configuration file
375
376 .SH AUTHOR
377 .B sms9110
378 was written by Jan Kratochvil who should be responsible for all the bugs
379 included. Please see the file "\fBAUTHORS\fP"
380 shipped with the original distribution archive for more details.