Updated for my home page URL change
[mdsms.git] / mdsms.1.in
index 80a8c61..a5b9823 100644 (file)
@@ -366,10 +366,61 @@ scheme) to 0 (\fBalphabet indication\fP, \fBdefault 7-bit alphabet\fP).
 .RE
 .TP
 .BR --receive :
+Receiving of messages is performed using direct routing of incoming data to TE (Terminal Equipment).
+No SMSes are stored to SIM card/device memory and then read back as one may expect.
+There are slight advantages of better response times (SIM card access is very slow) and
+saving EEPROM writes to SIMcard. Unfortunately there is one big advantage that when
+.B mdsms
+suddenly stops/crashes without switching the device back to SIM-store mode, messages
+being consequently received are lost on the dead end of serial port.
+.B mdsms
+tries very hard to restore the device state before its termination but sometimes it just
+.RB "isn't"
+possible. Due to this fact \fBnever kill mdsms with SIGKILL (-9) signal\fP, use standard
+SIGTERM instead, please. Also one fact resulting of this behaviour is that messages
+with Class-2 (SIM store) specific routing are really stored to SIM card and as such are
+not processed in any way by
+.BR mdsms .
+Safer SIM store/retrieve mechanism may be implemented in future versions. Command sequence used in
+.B --receive
+mode follows:
 .RS
 .TP
-FIXME
-To be written according to \fBAT+CMGF=0\fP support.
+\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 mode not available).
+.TP
+\fBAT+CNMI=,2\fP
+Set the message routing to go directly to TE (Terminal Equipment), see the discussion
+in paragraph above for more. Also right before starting attempt to send this command,
+\fBAT+CNMI=,0\fP is set to be tried before finishing
+.BR mdsms
+to restore the original device behaviour.
+.TP
+\fBAT+CSDH=0\fP
+We
+.RB "aren't"
+really much interested in additional non-standard values of
+PID (Protocol IDentifier), DCS (Data Coding Scheme) etc.
+.TP
+data wait
+In this point the device lock file is removed, retry count is set to infinite value
+(see discussion in
+.B --maxretry
+parameter) and
+.B mdsms
+starts to passively listen for any incoming data. Possible dial-out mode is being
+detected afterwards, otherwise message receive sequence follows as described below.
+.TP
+\fB+CMT:\fP read
+Any waiting \fB+CMT\fP incoming message indications are read and processed. Format
+being processed (text/PDU) depends on the actual value of \fBAT+CMGF\fP set before. Any
+possible \fB+CMTI:\fP input is discarded as we are not interested in SIM-store
+directed messages.
+.TP
+receive restart
+After processing all the messages, the whole initialization sequence is restarted as
+the device configuration may have changed or lost during the data wait phase.
 .RE
 
 .SH SEE ALSO