English man page updated, sms9110 man finally merged.
authorshort <>
Wed, 3 Nov 1999 15:55:06 +0000 (15:55 +0000)
committershort <>
Wed, 3 Nov 1999 15:55:06 +0000 (15:55 +0000)
--mode-receive description still missing.

README
acconfig.h
mdsms.1.in
setup.h

diff --git a/README b/README
index 2754d15..64fb3e6 100644 (file)
--- a/README
+++ b/README
@@ -6,7 +6,7 @@ $Id$
 Software homepage:
 ------------------
 
 Software homepage:
 ------------------
 
-  http://atrey.karlin.mff.cuni.cz/~short/sw/#sms9110
+  http://atrey.karlin.mff.cuni.cz/~short/sw/#mdsms
 
 
 Platform compatibility:
 
 
 Platform compatibility:
@@ -36,8 +36,8 @@ Quick installation:
   For full installation options see file INSTALL.
 
 
   For full installation options see file INSTALL.
 
 
-Quick run:
-----------
+Quick intro for sending operator logos:
+---------------------------------------
 
   Download some logo in NOL/NGG format from KESSLER Wireless Design:
 
 
   Download some logo in NOL/NGG format from KESSLER Wireless Design:
 
@@ -58,7 +58,7 @@ D Dest. phone network:                23002
 with baudrate of 57600. Then Active Fax modem and issue the following UNIX
 command:
 
 with baudrate of 57600. Then Active Fax modem and issue the following UNIX
 command:
 
-./sms9110 -v -d /dev/ttyS1 -b 57600 -s +420602909909 +420602431329 /tmp/eurotel.nol 23002
+./mdsms --logo-send -v -d /dev/ttyS1 -b 57600 -s +420602909909 +420602431329 /tmp/eurotel.nol 23002
 
   It should write some verbose output ending with "SMS sent..." message.
 
 
   It should write some verbose output ending with "SMS sent..." message.
 
@@ -66,7 +66,7 @@ command:
 Misc:
 -----
 
 Misc:
 -----
 
-  Documentation available in 'man' format, type "man sms9110" after
+  Documentation available in 'man' format, type "man mdsms" after
 installation.
 
   Contact to author available in file AUTHORS. When submitting bug reports,
 installation.
 
   Contact to author available in file AUTHORS. When submitting bug reports,
index b51d61b..890db9d 100644 (file)
@@ -201,6 +201,7 @@ extern char *sys_errlist[];
 #define offsetof(a,b) ((size_t)&((a *)0)->b)
 #endif
 
 #define offsetof(a,b) ((size_t)&((a *)0)->b)
 #endif
 
+#ifndef DONT_NEED_DECLARATIONS
 /*
  * Handles all of the internationalization configuration options.
  * Author: Tom Tromey <tromey@creche.cygnus.com>
 /*
  * Handles all of the internationalization configuration options.
  * Author: Tom Tromey <tromey@creche.cygnus.com>
@@ -227,3 +228,4 @@ extern char *sys_errlist[];
 #    define _(String) (String)
 #    define N_(String) (String)
 #endif /* ENABLE_NLS */
 #    define _(String) (String)
 #    define N_(String) (String)
 #endif /* ENABLE_NLS */
+#endif /* !DONT_NEED_DECLARATIONS */
index a6cca96..80a8c61 100644 (file)
@@ -46,13 +46,12 @@ device connected through the serial port. Currently supported:
 .RS
 .TP
 .B Nokia Communicator 9000/9000i
 .RS
 .TP
 .B Nokia Communicator 9000/9000i
-All modes except \fB--logo-send\fP and Nokia multiparts supported.
+All modes except \fB--logo-send\fP supported.
 .TP
 .B Nokia Communicator 9110
 .TP
 .B Nokia Communicator 9110
-All modes except Nokia multiparts supported. This is the only device
-with \fB--logo-send\fP capability for now.
+All modes supported. This is the only device with \fB--logo-send\fP capability for now.
 .TP
 .TP
-.B Siemens M20
+.B Siemens A1
 Firmware revision 2.0 required. All modes except \fB--logo-send\fP supported.
 .RE
 
 Firmware revision 2.0 required. All modes except \fB--logo-send\fP supported.
 .RE
 
@@ -66,7 +65,7 @@ for more information.
 .BR -d | --device\  < device >
 Specify serial device to communicate with your mobile. If only bare name is
 specified, "\fB/dev/\fP" is prepended automatically. This device name is used
 .BR -d | --device\  < device >
 Specify serial device to communicate with your mobile. If only bare name is
 specified, "\fB/dev/\fP" is prepended automatically. This device name is used
-subsequently with
+consequently with
 .BR -l | --lockfile
 option, see below.
 .TP
 .BR -l | --lockfile
 option, see below.
 .TP
@@ -122,36 +121,38 @@ quit after the initial initialisation has been successfuly negotiated.
 .BR -r | --readtime\  < sec >
 Maximum response read timeout before command retry.
 .B mdsms
 .BR -r | --readtime\  < sec >
 Maximum response read timeout before command retry.
 .B mdsms
-sends the requested \fBAT\fP-style command to
-<<<<<<< mdsms.1.in
-.B MobilDock
-and expects response. Unfortunately when the voice call is in progress,
-.B MobilDock
-\80will block any serial device communication and it is impossible to differentiate
-between calling
-.B MobilDock
-and stucked/disconnected one. After exceeding this time interval,
+sends the requested \fBAT\fP-style command to the device and expects response.
+After exceeding this time interval,
 .B mdsms
 .B mdsms
-is terminated immediately,
-.B maxretry
-parameter notwithstanding. Standard value is
-=======
-.B Nokia
-and expects response. After exceeding this time interval,
-.B sms9110
 reissues the last command until the maximum retry count (\fBmaxretry\fP) is exhausted.
 Standard value is
 reissues the last command until the maximum retry count (\fBmaxretry\fP) is exhausted.
 Standard value is
->>>>>>> 1.5.2.2
 .BR DEF_READTIME
 .BR DEF_READTIME
-<<<<<<< mdsms.1.in
-\80seconds and should be enough for any voice call.
-=======
 seconds and should be enough for standard
 seconds and should be enough for standard
-.B Nokia
-responses.
->>>>>>> 1.5.2.2
+.B mobiles
+responses. This is the only point where
+.B --send-mobildock
+differs the behaviour from regular
+.B --send
+option. Unfortunately when
+.B MobilDock
+has a voice call in progress, it will block any serial device
+communication with \fBSiemens A1\fP and it is impossible to differentiate between call-in-progress
+.B MobilDock
+and stucked/disconnected one, so the parameter
+.B readtime
+has very large value, see further. After exceeding this time interval,
+.B mdsms
+is terminated immediately,
+.B maxretry
+parameter notwithstanding. Standard value of this parameter is
+.BR DEF_READTIME_MOBILDOCK
+seconds and should be enough for any voice call.
 .TP
 .BR -t | --chartime\  < msec >
 .TP
 .BR -t | --chartime\  < msec >
+\fB(This paragraph\fP
+.BR "doesn't"
+\fBapply to Nokia 9110 or similiar smart devices but the functionality has been
+retained just to be on the safe side.)\fP
 Although the fixed used baudrate of
 .B 19200
 is pretty low, MobilDock/Siemens A1 couple
 Although the fixed used baudrate of
 .B 19200
 is pretty low, MobilDock/Siemens A1 couple
@@ -163,35 +164,29 @@ waiting a bit after character sent to give relax time to these devices.
 When full rate communication was used, occasional longer SMS data corruption
 was observed. Argument is given in milliseconds and its default value is
 .BR DEF_CHARTIME ms.
 When full rate communication was used, occasional longer SMS data corruption
 was observed. Argument is given in milliseconds and its default value is
 .BR DEF_CHARTIME ms.
+.TP
+.BR -T | --cmdtime\  < msec >
 \fB(This paragraph\fP
 .BR "doesn't"
 \fB(This paragraph\fP
 .BR "doesn't"
-\fBapply to Nokia 9110 but the functionality has been
+\fBapply to Nokia 9110 or similiar smart devices but the functionality has been
 retained just to be on the safe side.)\fP
 retained just to be on the safe side.)\fP
-.TP
-.BR -T | --cmdtime\  < msec >
 This delay is given before sending any
 .B AT-style
 This delay is given before sending any
 .B AT-style
-command to Nokia.
+command to the device.
 Its primary purpose is to let any previous entered commands to finish and
 to clear any input before actually sending our own command. Also all Siemens
 devices are known that they strongly dislike fast edge-to-edge communication
 and to satisfy these requirements this delay was considered as the best
 approach.
 Its primary purpose is to let any previous entered commands to finish and
 to clear any input before actually sending our own command. Also all Siemens
 devices are known that they strongly dislike fast edge-to-edge communication
 and to satisfy these requirements this delay was considered as the best
 approach.
-\fB(This sentence\fP
-.BR "doesn't"
-\fBapply to Nokia 9110 but the functionality has been
-retained just to be on the safe side.)\fP
 The default value is
 .BR DEF_CMDTIME ms.
 .TP
 The default value is
 .BR DEF_CMDTIME ms.
 .TP
-<<<<<<< mdsms.1.in
-\80.BR -f | --file
+.BR -f | --file
 When parameter <\fBmsg text\fP> has been specified, by using this option
 \fBmdsms\fP will read the file with the <\fBmsg text\fP> filename instead
 and send its \fBcontents\fP as the SMS message.
 When parameter <\fBmsg text\fP> has been specified, by using this option
 \fBmdsms\fP will read the file with the <\fBmsg text\fP> filename instead
 and send its \fBcontents\fP as the SMS message.
+This parameter is applicable only together with \fB--send\fP or \fB--send-mobildock\fP mode.
 .TP
 .TP
-=======
->>>>>>> 1.5.2.2
 .BR -v | --verbose
 Increase verbosity level by one. Currently the maximum defined level is
 .BR 3 ,
 .BR -v | --verbose
 Increase verbosity level by one. Currently the maximum defined level is
 .BR 3 ,
@@ -220,17 +215,7 @@ This number can be made default in system configuration files, see below
 for section
 .BR CONFIGURATION .
 .TP
 for section
 .BR CONFIGURATION .
 .TP
-.RB < "logo filename" >
-Here you specifify the filename of the logo file to be uploaded. Currently
-recognized file formats are \fBNOL\fP (Nokia logo?) and \fBNGG\fP (Nokia
-Group Graphics). These formats are proprietary by \fBKESSLER Wireless Design\fP
-and \fBsms9110\fP currently "can't" edit them. More info can be found on:
-.RS
-.B http:/      /www.kessler-design.com/wireless/operatorlogo.php3
-.RE
-.TP
-<<<<<<< mdsms.1.in
-\80.RB < "msg text" >
+.RB < "msg text" >
 Here you write the exact body of the message. This parameter should be
 specified only as one component, although if more found they are concatenated
 with separating space (" "). But this practice is discouraged as
 Here you write the exact body of the message. This parameter should be
 specified only as one component, although if more found they are concatenated
 with separating space (" "). But this practice is discouraged as
@@ -240,7 +225,19 @@ mess, you may prefer to omit this parameter and the the message text is
 then read from
 .I stdin
 (standard input stream).
 then read from
 .I stdin
 (standard input stream).
-=======
+This parameter is applicable only together with \fB--send\fP or \fB--send-mobildock\fP mode.
+.TP
+.RB < "logo filename" >
+Here you specifify the filename of the logo file to be uploaded. Currently
+recognized file formats are \fBNOL\fP (Nokia logo?) and \fBNGG\fP (Nokia
+Group Graphics). These formats are proprietary by \fBKESSLER Wireless Design\fP
+and \fBmdsms\fP currently "can't" edit them.
+This parameter is applicable only together with \fB--logo send\fP mode.
+More info can be found on:
+.RS
+.B http:/      /www.kessler-design.com/wireless/operatorlogo.php3
+.RE
+.TP
 .RB < "GSMnet id" >
 Specify GSM network code to be set on the logo being uploaded. Upon upload to
 Nokia phone each operator logo has a GSM network code binded with it. When
 .RB < "GSMnet id" >
 Specify GSM network code to be set on the logo being uploaded. Upon upload to
 Nokia phone each operator logo has a GSM network code binded with it. When
@@ -252,10 +249,10 @@ specify string ~\fB       WORD_GROUP      \fP~ to send the logo as group graphics
 of network code from \fBNOL\fP. The default if this parameter is not specified
 is ~\fB        WORD_NET        \fP~ for \fBNOL\fP files and ~\fB       WORD_GROUP      \fP~ for
 \fBNGG\fP files.
 of network code from \fBNOL\fP. The default if this parameter is not specified
 is ~\fB        WORD_NET        \fP~ for \fBNOL\fP files and ~\fB       WORD_GROUP      \fP~ for
 \fBNGG\fP files.
->>>>>>> 1.5.2.2
+This parameter is applicable only together with \fB--logo send\fP mode.
 
 .SH CONFIGURATION
 
 .SH CONFIGURATION
-.B sms9110
+.B mdsms
 reads ~\fB     CONFIG_MAIN     \fP~ followed by ~\fB$HOME      CONFIG_HOME     \fP~
 configuration files. The content of these files (and also any file read by
 .BR -c | --config
 reads ~\fB     CONFIG_MAIN     \fP~ followed by ~\fB$HOME      CONFIG_HOME     \fP~
 configuration files. The content of these files (and also any file read by
 .BR -c | --config
@@ -279,29 +276,25 @@ to see details of option processing with more complex configuration setups.
 
 .SH OPERATION
 Upon startup
 
 .SH OPERATION
 Upon startup
-.B sms9110
+.B mdsms
 locks the port (see option
 .BR -l | --lockfile
 for details) and opens the serial device with specified baudrate (default
 \fB    DEF_BAUD        \fP baud), software handshaking (XON/XOFF style), 8 bits,
 no parity. Then issues the following commands:
 .TP
 locks the port (see option
 .BR -l | --lockfile
 for details) and opens the serial device with specified baudrate (default
 \fB    DEF_BAUD        \fP baud), software handshaking (XON/XOFF style), 8 bits,
 no parity. Then issues the following commands:
 .TP
-.BR AT <ESCAPE>
+.BR AT <ESCAPE><CTRL-Z>
 .B AT
 .B AT
-<<<<<<< mdsms.1.in
-\80is used to fool MobilDock and pass the following
-.B <CTRL-Z>
-(ascii decimal code 26) character to Siemens A1 and break it from eventual
-=======
-is used to fool Nokia and pass the following
-.B <ESCAPE>
-(ascii decimal code 27) character to Nokia and break it from eventual
->>>>>>> 1.5.2.2
+is used to fool
+.B MobilDock
+(if present, otherwise it is harmlesss anyway) and pass the following
+.B <ESCAPE><CTRL-Z>
+(ascii decimal code 27 followed by 26) characters to the device and break it from eventual
 .B AT+CMGS
 mode in which it may errorneously remain from previous sessions.
 .TP
 .B AT
 .B AT+CMGS
 mode in which it may errorneously remain from previous sessions.
 .TP
 .B AT
-Test the responsiveness of Nokia.
+Test the responsiveness of the device.
 .TP
 \fBAT+CSCA="\fPsmc # from user\fB"\fP
 This command is omitted if
 .TP
 \fBAT+CSCA="\fPsmc # from user\fB"\fP
 This command is omitted if
@@ -309,18 +302,49 @@ This command is omitted if
 is not specified by user (or specified/overriden as empty string \fB""\fP
 .TP
 \fBAT+CSCA?\fP
 is not specified by user (or specified/overriden as empty string \fB""\fP
 .TP
 \fBAT+CSCA?\fP
-<<<<<<< mdsms.1.in
 Query the currently set SMC center number to include it later to the
 header of SMS PDU format where it is required. If \fBAT+CSCA="\fP...\fB"\fP
 was issued before, this number should match it but no sanity checks are
 Query the currently set SMC center number to include it later to the
 header of SMS PDU format where it is required. If \fBAT+CSCA="\fP...\fB"\fP
 was issued before, this number should match it but no sanity checks are
-currently do so.
+currently do so. Also it is used to detect possibly unset SMS center.
+.TP
+.RB "Mode-dependent."
+Here are executed the commands listed for each of the specified operation
+mode separately.
 .TP
 .TP
-\80\fBAT+CMGF=0\fP
-Set the default SMS message format to PDU type. Currently Siemens A1
-.RB "doesn't"
-support any other SMS format anyway.
-=======
-Query the currently set SMC center number to detect possibly unset SMS center.
+\fBAT\fP
+Check that the mobile survived our torture.
+
+.TP
+The following operations are dependant on the operation:
+.TP
+.BR --send / --send-mobildock :
+.RS
+.TP
+\fBAT+CMGF=0\fP, if fails \fBAT+CMGF=1\fP
+Set the default SMS message format to PDU type (preferred) or text mode (if
+PDU not available). Next \fB+CMGS\fP command is dependant on the mode selected
+by this one.
+.TP
+\fBAT+CMGS=\fP# chars if \fB+CMGF=0\fP
+This command physically sends the message and the resulting "\fB+CMGS:\fP" output
+is catched and returned as
+.B MR
+(message reference) number to the user. \fB# chars\FP corresonds to total data
+bytes sent to the phone (so the half of the hex-string, SMSC is included).
+SMSC number is preceding the rest of PDU to be conformant with GSM Phase 2
+specification. Siemens M1 or Siemens M20 rev. 1.x are known that
+.RB "don't"
+like this SMSC number, I have to get in touch with such device to be able to autodetect
+it properly (mail me if you want to be helpful).
+.TP
+\fBAT+CMGS="\fPphone # from user\fB"\fP if \fB+CMGF=1\fP
+The same as the previous command except that the message is text as pure text
+terminated with \fB<CTRL-Z>\fP character. SMSC number is not present anywhere
+in this mode.
+.RE
+.TP
+.BR --logo-send / --ring-send :
+.RS
 .TP
 \fBAT+CSMP=81,,0,245\fP
 Sets PDU type to 81 (\fBSMS-SUBMIT\fP + integer-type for \fBvalidity\fP
 .TP
 \fBAT+CSMP=81,,0,245\fP
 Sets PDU type to 81 (\fBSMS-SUBMIT\fP + integer-type for \fBvalidity\fP
@@ -328,13 +352,8 @@ Sets PDU type to 81 (\fBSMS-SUBMIT\fP + integer-type for \fBvalidity\fP
 0 (standard non-converted SMS) and DCS (data coding scheme) to 0xF5
 (\fBdata coding\fP/\fBmessage class\fP, \fB8-bit data\fP + \fBmobile-equipment\fP
 specific).
 0 (standard non-converted SMS) and DCS (data coding scheme) to 0xF5
 (\fBdata coding\fP/\fBmessage class\fP, \fB8-bit data\fP + \fBmobile-equipment\fP
 specific).
->>>>>>> 1.5.2.2
 .TP
 .TP
-<<<<<<< mdsms.1.in
-\80\fBAT+CMGS=\fP# chars
-=======
 \fBAT+CMGS="\fPphone # from user\fB"\fP
 \fBAT+CMGS="\fPphone # from user\fB"\fP
->>>>>>> 1.5.2.2
 This command physically sends the message and the resulting "\fB+CMGS:\fP" output
 is catched and returned as
 .B MR
 This command physically sends the message and the resulting "\fB+CMGS:\fP" output
 is catched and returned as
 .B MR
@@ -344,9 +363,14 @@ is catched and returned as
 Resets back PDU type to 17 (\fBSMS-SUBMIT\fP + integer-type for \fBvalidity\fP),
 PID (protocol identifier) to 0 (standard non-converted SMS) and DCS (data coding
 scheme) to 0 (\fBalphabet indication\fP, \fBdefault 7-bit alphabet\fP).
 Resets back PDU type to 17 (\fBSMS-SUBMIT\fP + integer-type for \fBvalidity\fP),
 PID (protocol identifier) to 0 (standard non-converted SMS) and DCS (data coding
 scheme) to 0 (\fBalphabet indication\fP, \fBdefault 7-bit alphabet\fP).
+.RE
 .TP
 .TP
-\fBAT\fP
-Check that Nokia survived the sending of the message.
+.BR --receive :
+.RS
+.TP
+FIXME
+To be written according to \fBAT+CMGF=0\fP support.
+.RE
 
 .SH SEE ALSO
 .TP
 
 .SH SEE ALSO
 .TP
@@ -374,7 +398,7 @@ Main configuration file
 User personalized local configuration file
 
 .SH AUTHOR
 User personalized local configuration file
 
 .SH AUTHOR
-.B sms9110
+.B mdsms
 was written by Jan Kratochvil who should be responsible for all the bugs
 included. Please see the file "\fBAUTHORS\fP"
 shipped with the original distribution archive for more details.
 was written by Jan Kratochvil who should be responsible for all the bugs
 included. Please see the file "\fBAUTHORS\fP"
 shipped with the original distribution archive for more details.
diff --git a/setup.h b/setup.h
index 2ce6d6b..85a8113 100644 (file)
--- a/setup.h
+++ b/setup.h
@@ -12,7 +12,7 @@
 #endif
 #define DEF_BAUD 19200 /* --baud default */
 #define DEF_MAXRETRY 3 /* --maxretry default */
 #endif
 #define DEF_BAUD 19200 /* --baud default */
 #define DEF_MAXRETRY 3 /* --maxretry default */
-#define DEF_READTIME_MOBILDOCK 60*60 /* --readtime default for MobilDock */
+#define DEF_READTIME_MOBILDOCK 3600 /* --readtime default for MobilDock */
 #define DEF_READTIME 5 /* --readtime default */
 #define EXT_READTIME 10 /* --readtime multiply for long running commands */
 #define DEF_CHARTIME 10 /* --chartime default
 #define DEF_READTIME 5 /* --readtime default */
 #define EXT_READTIME 10 /* --readtime multiply for long running commands */
 #define DEF_CHARTIME 10 /* --chartime default