--- /dev/null
+--- mdsms-1.5.3/mdsms.c-orig 2003-07-10 13:58:13.000000000 +0200
++++ mdsms-1.5.3/mdsms.c 2006-05-14 08:26:53.000000000 +0200
+@@ -2303,6 +2303,29 @@
+ int gotdatawait;
+
+ restore="\r\nAT+CNMI=,0";
++ /*
++ * FIXME: Check cross-device compatibility to accept it for the trunk.
++ * Guido Sohne <guido(at)sohne.net>:
++ *
++ * The Siemens MC35i AT reference says for AT+CNMI
++ *
++ * > The write command selects the procedure how the receipt of new SMS
++ * > messages from the network is indicated
++ * > to the TE when TE is active, e.g. DTR signal is ON. If TE is
++ * > inactive (e.g. DTR signal is OFF), message receiving
++ * > should be done as specified in GSM03.38. If the DTR signal is not
++ * > available or the state of the signal is ignored
++ * > (V.25ter command AT&D0, reliable message transfer can be assured by
++ * > using AT+CNMA acknowledgment pro-
++ * > cedure. The rules <mt>=2 and <mt>=3 for storing received SM are
++ * > possible only if phase 2+ compatibility is acti-
++ * > vated with AT+CSMS=1. The parameter <ds>=1 is only available in
++ * > phase 2+
++ *
++ * The <mt>=2 rule corresponds to the second argument for AT
++ * +CNMI=<mode>,<mt> ...
++ */
++ devcmd(NULL,NULL,"\r\nAT+CSMS=1");
+ devcmd(NULL,NULL,"\r\nAT+CNMI=,2");
+ devcmd(NULL,NULL,"\r\nAT+CSDH=0");
+ continue_receive:
+@@ -2344,6 +2367,29 @@
+ if (i) receive_text(s);
+ }
+ else receive_pdu(s);
++ /*
++ * FIXME: Check cross-device compatibility to accept it for the trunk.
++ * Guido Sohne <guido(at)sohne.net>:
++ *
++ * The Siemens MC35i AT reference says for AT+CNMA
++ *
++ * > The write / execute command confirms successful receipt of a new
++ * > message (SMS-DELIVER or SMS-STATUS-
++ * > REPORT) routed directly to the TE. TA shall not send another +CMT
++ * > or +CDS result code to TE until previous
++ * > one is acknowledged. If ME does not receive acknowledgment within
++ * > required time (network time-out), ME sends
++ * > RP-ERROR to the network. TA shall automatically disable routing to
++ * > TE by setting both <mt> and <ds> values
++ * > of AT+CNMI to zero.
++ *
++ * AT+CNMA=0 needs to be issued before the TA will send another result
++ * code for a received message. Without this command, only one message
++ * will be received, because the modem waits for AT+CNMA=0 as an
++ * acknowledgement of the reception of the message and will not notify
++ * us of another message until we send this acknowledgement ...
++ */
++ devcmd(NULL,NULL,"\r\nAT+CNMA=0");
+ } while (datawait(0));
+ goto retryall;
+ }