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