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