PDU receive mode implemented, untested yet.
authorshort <>
Sun, 7 Nov 1999 11:19:50 +0000 (11:19 +0000)
committershort <>
Sun, 7 Nov 1999 11:19:50 +0000 (11:19 +0000)
mdsms.1.in
mdsms.c
po/cs.po

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
diff --git a/mdsms.c b/mdsms.c
index 2b7edd1..a630131 100644 (file)
--- a/mdsms.c
+++ b/mdsms.c
@@ -273,8 +273,10 @@ Usage: %s [-c|--config <cfgfile>] [-d|--device <device>]\n\
  <command name>\tProgram to run on receive, message will be on stdin\n\
 \t\tFollowing substitutes are recognized:\n\
 \t\t%%p - source phone number\n\
-\t\t%%T - timestamp from SMSC as number of seconds from 1970\n\
-\t\t%%t - ctime(3) style timestamp (e.g. \"Wed Jun 30 21:49:08 1993\")\n\
+\t\t%%T - timestamp from SMSC as # of seconds from 1970 (-1 if invalid)\n\
+\t\t%%t - ctime(3) style timestamp (e.g. \"Wed Jun 30 21:49:08 1993\"),\n\
+\t\t     empty string if invalid\n\
+\t\t%%s - originating SMSC number, if available (else empty)\n\
 --logo-send:\n\
  <GSMnet id>\t* Oper. logo: Enter custom network code MccMnc, e.g. 23002\n\
 \t\t* Oper. logo: Specify \"%s\" to read network code from NOL file\n\
@@ -661,7 +663,7 @@ char *s;
                body=glueargstack(&bodylen," ");
                for (s=body;(s=strchr(s,'%'));s++)
                        switch (*++s) {
-                               case 'p': case 'T': case 't': break;
+                               case 'p': case 'T': case 't': case 's': break;
                                default:
                                        error(_("Unknown formatsymbol '%c' (use \"%%%%%c\" to fix it) at pos %d in: %s"),
                                                *s,*s,s-body,body);
@@ -1088,7 +1090,7 @@ unsigned char bin[2+(MAXNUMLEN+1)/2];
        textconv(pdusmsc,bin,bin[0]+1);
 }
 
-static inline unsigned char charconv(char c,size_t offs)
+static inline unsigned char charconv_send(char c,size_t offs)
 {
        switch (c) {
                case '@': return(0);
@@ -1105,6 +1107,17 @@ static inline unsigned char charconv(char c,size_t offs)
 #endif
 }
 
+static inline unsigned char charconv_recv(char c,size_t offs)
+{ /* FIXME: unify with charconv_send() */
+       switch (c) {
+               case 0: return('@');
+               case 2: return('$');
+               default:
+                       return(c);
+               }
+/* strict checking not done, see charconv_send */
+}
+
 /* Logo format shamelessly stolen from GNokii-0.3.0: http://www.gnokii.org/
  * Beware - Nokia Smart Messaging specification 1.0.0 and 2.0.0 is incompatible
  * with Nokia current product line implementation
@@ -1311,7 +1324,7 @@ size_t offs=0;
        while (bodylen || inb) {
                if (!inb) {
                        assert(bodylen>0); assert(!!*body);
-                       inreg=charconv(*bodyr++,offs++);
+                       inreg=charconv_send(*bodyr++,offs++);
                        bodylen--;
                        inb=7;
                        }
@@ -1457,13 +1470,9 @@ const char *sf,*ss;
        return(NULL);
 }
 
-static char *receive_number;
+static char *receive_number,*receive_smsc;
 static time_t receive_time;
 
-/* +CMT: "+420602431329",,"99/10/25,03:21:03-00" */
-static int receive_headerparse(char *buf)
-{
-char *s,*s1,*err;
 struct tm tm;
 static const struct {
        off_t strpos;
@@ -1480,9 +1489,36 @@ static const struct {
                TP_ENT(18,tm_sec ,0,59,N_("second")),
                /* Time zone ignored */
                };
-int i,val;
+#define GETTIME(i) (*(int *)(((char *)&tm)+timeparse[(i)].tmpos))
+
+static void maketime(const char *string)
+{
+int val;
+int i;
+
+       for (i=0;i<NELEM(timeparse);i++) {
+               val=GETTIME(i);
+               if (val<timeparse[i].min || val>timeparse[i].max) {
+                       error(_("Weird value of %s, is %d but expected %d..%d, setting to %d"),
+                               _(timeparse[i].name),val,timeparse[i].min,timeparse[i].max,timeparse[i].min);
+                       GETTIME(i)=timeparse[i].min;
+                       }
+               }
+       if (tm.tm_year<70) tm.tm_year+=100;
+       tm.tm_mon--;
+       d7("mktime(y%dm%dd%dh%dm%ds%d)\n",
+               tm.tm_year,tm.tm_mon,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
+       if ((receive_time=mktime(&tm))==-1)
+               error(_("^mktime(3) failed for %s"),string);
+}
 
-#define DIGIT2(s) (((s)[0]-'0')*10+((s)[1]-'0'))
+/* +CMT: "+420602431329",,"99/10/25,03:21:03-00" */
+static int receive_headerparse(char *buf)
+{
+char *s,*s1,*err;
+int i;
+
+#define DIGIT2ASC(s) (((s)[0]-'0')*10+((s)[1]-'0'))
 
        for (s=buf;*s==' ';s++);
        if (*s++!='"') {
@@ -1494,6 +1530,7 @@ int i,val;
                error(_("Only one '\"' found in CMT header: %s"),buf);
                return(0);
                }
+       free(receive_smsc); receive_smsc=NULL;
        free(receive_number);
        chk(receive_number=malloc(s-s1+1));
        memcpy(receive_number,s1,s-s1); receive_number[s-s1]='\0';
@@ -1504,28 +1541,16 @@ int i,val;
                return(0);
                }
        memset(&tm,0,sizeof(tm)); /* may be redundant */
-       for (i=0;i<NELEM(timeparse);i++) {
-               val=DIGIT2(s+timeparse[i].strpos);
-               if (val<timeparse[i].min || val>timeparse[i].max) {
-                       error(_("Weird value of %s, is %d but expected %d..%d, setting to %d"),
-                               _(timeparse[i].name),val,timeparse[i].min,timeparse[i].max,timeparse[i].min);
-                       val=timeparse[i].min;
-                       }
-               *(int *)(((char *)&tm)+timeparse[i].tmpos)=val;
-               }
+       for (i=0;i<NELEM(timeparse);i++)
+               GETTIME(i)=DIGIT2ASC(s+timeparse[i].strpos);
        if (tm.tm_year<70) tm.tm_year+=100;
        tm.tm_mon--;
-       d7("mktime(y%dm%dd%dh%dm%ds%d)\n",
-               tm.tm_year,tm.tm_mon,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
-       if ((receive_time=mktime(&tm))==-1) {
-               error(_("^mktime(3) failed for %s"),s+2);
-               return(0);
-               }
+       maketime(s+2);
        return(1);
-#undef DIGIT2
+#undef DIGIT2ASC
 }
 
-static void receive_accept(char *bodyline)
+static void receive_text(char *bodyline)
 {
 char *buf,*s,*s1,*s2,*s3;
 pid_t pid;
@@ -1533,7 +1558,7 @@ char tbuf[32];
 int i;
 FILE *f;
 
-       d2("receive_accept: %s\n",bodyline);
+       d2("receive_text: %s\n",bodyline);
 #if RECEIVE_TEST
        pid=0;
 #else
@@ -1550,7 +1575,7 @@ FILE *f;
                s1=s;
                do {
                        s1=strchr(s1+(s1!=s),'%');
-                       } while (s1 && s1[1]!='p' && s1[1]!='T' && s1[1]!='t');
+                       } while (s1 && s1[1]!='p' && s1[1]!='T' && s1[1]!='t' && s1[1]!='s');
                if (!s1) {
                        pushargstack_one(s,0);
                        break;
@@ -1568,6 +1593,7 @@ FILE *f;
                                pushargstack_one(tbuf,0);
                                break;
                        case 't':
+                               if (receive_time==-1) break;
                                if (!(s2=ctime(&receive_time))) {
                                        error(_("Failing ctime(3), ignoring substitution"));
                                        break;
@@ -1575,6 +1601,9 @@ FILE *f;
                                if ((s3=strchr(s2,'\n'))) *s3='\0';
                                pushargstack_one(s2,0);
                                break;
+                       case 's':
+                               if (receive_smsc) pushargstack_one(receive_smsc,0);
+                               break;
                        default: assert(0);
                        }
                }
@@ -1593,6 +1622,173 @@ err:
        exit(EXIT_SUCCESS); /* cleanup() has been disabled */
 }
 
+static inline unsigned char fromhex(char c)
+{
+       c&=0xDF;
+       return(c<'A'?c-'0':(c-'A')+0xA);
+}
+
+static int teldecode(char *text,unsigned char *bin,size_t digits)
+{
+unsigned char b;
+int r=0,i;
+
+       for (i=0;i<digits;text++,i++) {
+               if (!(i&1)) b=*bin;
+               else b=(*bin++)>>4;
+               b&=0x0F;
+               if (b<=0x09)
+                       *text=b+'0';
+               else {
+                       *text='?';
+                       r++;
+                       }
+               }
+       *text='\0';
+       return(r);
+}
+
+static void sctsparse(unsigned char *bin,const char *pduline,int offs)
+{
+#define DIGIT2BIN(v) (((v)&0x0F)*10+(((v)>>4)&0x0F))
+int i;
+
+       receive_time=-1;
+       memset(&tm,0,sizeof(tm)); /* may be redundant */
+       for (i=0;i<NELEM(timeparse);offs++,i++) {
+               if ((*bin&0x0F)>0x09 || (*bin&0xF0)>0x90) {
+                       error(_("Invalid value of \"%s\" at offset %d in: %s"),
+                               timeparse[i].name,offs,pduline);
+                       return;
+                       }
+               GETTIME(i)=DIGIT2BIN(*bin);
+               bin++;
+               }
+       maketime(pduline);
+
+#undef DIGIT2BIN
+}
+
+static void receive_pdu(char *pduline)
+{
+unsigned char pdu[140+0x100],*pdup,*pdue,oalen,inreg;
+char text[160+1],*textp,*s;
+size_t pdulinel=strlen(pduline),want;
+size_t udl,udlb;
+int inb,outb,xb;
+
+       d2("receive_pdu: %s\n",pduline);
+       if (pdulinel>2*sizeof(pdu))
+               { error(_("PDU too long (%d/2) to be valid: %s"),pdulinel,pduline); return; }
+       if (pdulinel&1)
+               { error(_("PDU length odd (%d): %s"),pdulinel,pduline); return; }
+       if (pdulinel<2*13)
+               { error(_("PDU length %d too small (min. 2*%d): %s"),pdulinel,13,pduline); return; }
+       for (pdup=pdu;*pduline;pduline+=2) {
+               if (!isxdigit(pduline[0]) || !(isxdigit(pduline[1])))
+               { error(_("Invalid hex byte: %c%c on byte %d in: %s"),
+                       pduline[0],pduline[1],pdup-pdu,pduline); return; }
+               *pdup++=(fromhex(pduline[0])<<4)|fromhex(pduline[1]);
+               }
+       pdue=pdup;
+       free(receive_smsc);
+       if (*pdu<=1) {
+               receive_smsc=NULL;
+               }
+       else {
+               if (*pdu>10)
+                       { error(_("SMSC length too large (%d, max. %d): %s"),*pdu,10,pduline); return; }
+               chk(receive_smsc=malloc(1+2*(*pdu)+1));
+               s=receive_smsc;
+               if (pdu[1]==ADDR_INT) *s++='+';
+               else {
+                       if (pdu[1]!=ADDR_NAT)
+                               error(_("Unknown address type 0x%02X of %s, ignoring in PDU: %s"),_("SMSC"),pdu[1],pduline); return;
+                       }
+               if (teldecode(s,pdu+2,2*(*pdu-1)-((pdu[1+(*pdu)]&0xF0)==0xF0)))
+                       error(_("Some digits unrecognized in %s \"%s\", ignoring in PDU: %s"),_("SMSC"),receive_smsc,pduline);
+               }
+       pdup=pdu+1+(*pdu);
+       if (*pdup&0x03) /* PDU type */
+               error(_("Unrecognized PDU type 0x%02X at offset %d, dropping: %s"),*pdup,pdup-pdu,pduline);
+       pdup++;
+       free(receive_number);
+       if ((oalen=*pdup++)>10) /* OA len */
+               { error(_("Originating number too large (%d, max. %d): %s"),oalen,10,pduline); return; }
+       if (pdup+(want=1+(oalen+1)/2+10)>pdue)
+               { error(_("PDU length too short (want %d, is %d): %s"),(pdup-pdu)+want,pdue-pdu,pduline); return; }
+       chk(receive_number=malloc(1+2*(*pdup)+1));
+       s=receive_number;
+       if (*pdup==ADDR_INT) *s++='+';
+       else {
+               if (*pdup!=ADDR_NAT)
+                       error(_("Unknown address type 0x%02X of %s, ignoring in PDU: %s"),_("originating number"),*pdup,pduline); return;
+               }
+       pdup++;
+       if (teldecode(s,pdup,oalen))
+               error(_("Some digits unrecognized in %s \"%s\", ignoring in PDU at offset %d: %s"),
+                       _("originating number"),receive_number,pdup-pdu,pduline);
+       pdup+=(oalen+1)/2;
+       if (*pdup) /* PID */
+               error(_("PID number %02X unsupported, ignoring: %s"),*pdup,pduline);
+       pdup++;
+       if (*pdup) { /* DCS */
+               if ((*pdup&0xF4)==0xF4)
+                       { error(_("DCS 0x%02X indicates 8-bit data, unsupported, dropping: %s"),*pdup,pduline); return; }
+               error(_("DCS 0x%02X unsupported, will attempt decoding: %s"),*pdup,pduline);
+               }
+       pdup++;
+       sctsparse(pdup,pduline,pdup-pdu);
+       pdup+=7;
+       /* UDL */
+       udl=*pdup++;
+       if (pdue-pdup>140) {
+               error(_("PDU data (%d) exceed maximum length of %d bytes, cut: %s"),
+                       pdue-pdup,140,pduline);
+               pdue=pdup+140;
+               }
+       udlb=(udl*7+7)/8;
+       if (pdup+udlb>pdue) {
+size_t udl1,udlb1;
+
+               udlb1=pdue-pdup;
+               udl1=(udlb*8)/7;
+               error(_("PDU data length (%d/7->%d/8) longer than data (%d), cut to %d/7->%d/8: %s"),
+                       udl,udlb,pdue-pdup,pduline);
+               udl=udl1; udlb=udlb1;
+               }
+       else
+               error(_("Trailing garbage ignored in PDU data (UDL %d/7->%d/8, got %d) in: %s"),
+                       udl,udlb,pdue-pdup,pduline);
+       textp=text;
+       inb=outb=0;
+       inreg=0; /* GCC happiness */
+       while (udl) {
+               if (!inb) {
+                       inreg=*pdup++;
+                       inb=8;
+                       }
+               if (!outb) {
+                       assert(textp<text+160);
+                       *textp=0x00;
+                       outb=7;
+                       }
+               xb=MIN(inb,outb);
+#if 0
+               d4("inb=%d,outb=%d,xb=%d\n",inb,outb,xb);
+#endif
+               *textp|=((inreg>>(unsigned)(7-inb))&((1<<xb)-1))<<(unsigned)(8-outb);
+               inb-=xb; outb-=xb;
+               if (!outb) {
+                       *textp=charconv_recv(*textp,textp-text);
+                       textp++;
+                       udl--;
+                       }
+               }
+       *textp=0;
+       receive_text(text);
+}
+
 static struct {
        char **sp;
        long *ip;
@@ -1608,7 +1804,7 @@ static struct {
 int main(int argc,char **argv)
 {
 char *s;
-int i;
+int i,cmgf=-1 /* GCC happiness */;
 unsigned fatal=0;
 speed_t portbaud=0 /* GCC happiness */;
 enum modenum argsmode;
@@ -1797,18 +1993,32 @@ retryall:
                devcmd("",NULL,"\r\nAT\033\032"); /* ESCAPE, CTRL-Z */
                devcmd(NULL,NULL,"\r\nAT");
                smscset();
-               switch (mode) {
-                       case MODE_SEND:
-retrysendcmgf:
+               if (mode==MODE_SEND || mode==MODE_RECEIVE) {
+                       cmgf=-1;
+                       do {
                                if (!devcmd(NULL,NULL,"!\r\nAT+CMGF=0")) {
                                        if (!devcmd(NULL,NULL,"!\r\nAT+CMGF=1"))
-                                               { retrying(); goto retrysendcmgf; }
+                                               { retrying(); continue; }
                /* CMGF=1 */
+                                       if (verbose>=1)
+                                               error(_(".Using AT+CMGF=1 (text mode).."));
+                                       cmgf=1;
+                                       }
+                               else {
+               /* CMGF=0 */
+                                       if (verbose>=1)
+                                               error(_(".Using AT+CMGF=0 (PDU mode).."));
+                                       cmgf=0;
+                                       }
+                               } while (cmgf==-1);
+                       }
+               switch (mode) {
+                       case MODE_SEND:
+                               if (cmgf) {
                                        devcmd("\n> ",NULL,"\r\nAT+CMGS=\"%s\"",phone);
                                        s=devcmd(NULL,"\n+CMGS:","!~%s\032",body);
                                        }
                                else {
-               /* CMGF=0 */
                                        devcmd("\n> ",NULL,"\r\nAT+CMGS=%d",(strlen(pdusmsc)+strlen(pdudata))/2);
                                        s=devcmd(NULL,"\n+CMGS:","!~%s%s\032",pdusmsc,pdudata);
                                        }
@@ -1827,10 +2037,9 @@ struct hexdata *hd;
                                        }
                                } break;
                        case MODE_RECEIVE:
-                               devcmd(NULL,NULL,"\r\nAT+CMGF=1");
                                restore="\r\nAT+CNMI=,0";
-                               devcmd(NULL,NULL,"\r\nAT+CSDH=0");
                                devcmd(NULL,NULL,"\r\nAT+CNMI=,2");
+                               devcmd(NULL,NULL,"\r\nAT+CSDH=0");
                                unlockdevice(0);
                                /* Never bail-out when we got up to this point */
                                if (maxretryn!=-1 && verbose>=1)
@@ -1853,11 +2062,14 @@ struct hexdata *hd;
                                        d1("Reading a message for us...\n");
                                        if (!(s=devcmd("\r","@+CMT:"," ")))
                                                goto retryall;
-                                       if (!(i=receive_headerparse(s)))
+                                       if (cmgf && !(i=receive_headerparse(s)))
                                                error(_("Receive-header parsing failed on: %s"),s);
                                        if (!(s=devcmd("\r","@\n"," ")))
                                                goto retryall;
-                                       if (i) receive_accept(s);
+                                       if (cmgf) {
+                                               if (i) receive_text(s);
+                                               }
+                                       else receive_pdu(s);
                                        if (!devcmd("\n",NULL," ")) /* eat last '\n' */
                                                goto retryall;
                                        } while (datawait(1));
index af7c200..a1fcad1 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -2,7 +2,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mdsms 1.5.0\n"
-"POT-Creation-Date: 1999-11-03 13:45+0100\n"
+"POT-Creation-Date: 1999-11-07 12:15+0100\n"
 "PO-Revision-Date: 1999-11-03 13:45+0100\n"
 "Last-Translator: Jan Kratochvil <short@ucw.cz>\n"
 "Language-Team: Czech <cs@li.org>\n"
@@ -73,8 +73,10 @@ msgid ""
 " <command name>\tProgram to run on receive, message will be on stdin\n"
 "\t\tFollowing substitutes are recognized:\n"
 "\t\t%%p - source phone number\n"
-"\t\t%%T - timestamp from SMSC as number of seconds from 1970\n"
-"\t\t%%t - ctime(3) style timestamp (e.g. \"Wed Jun 30 21:49:08 1993\")\n"
+"\t\t%%T - timestamp from SMSC as # of seconds from 1970 (-1 if invalid)\n"
+"\t\t%%t - ctime(3) style timestamp (e.g. \"Wed Jun 30 21:49:08 1993\"),\n"
+"\t\t     empty string if invalid\n"
+"\t\t%%s - originating SMSC number, if available (else empty)\n"
 "--logo-send:\n"
 " <GSMnet id>\t* Oper. logo: Enter custom network code MccMnc, e.g. 23002\n"
 "\t\t* Oper. logo: Specify \"%s\" to read network code from NOL file\n"
@@ -130,9 +132,12 @@ msgstr ""
 "vstupu\n"
 "\t\tNaslédující substituce jsou na pøíkazu provedeny:\n"
 "\t\t%%p - telefonní èíslo odesilatele zprávy\n"
-"\t\t%%T - èas odeslání (ze SMSC) jako poèet sekund od roku 1970\n"
+"\t\t%%T - èas odeslání (ze SMSC) jako poèet sekund od roku 1970,\n"
+"\t\t     hodnota -1 je-li nekorektní\n"
 "\t\t%%t - èas odeslání ve stylu ctime(3) (napø. \"Wed Jun 30 21:49:08 "
-"1993\")\n"
+"1993\"),\n"
+"\t\t     prázdný øetìzec je-li pøijaty èas nekorektní\n"
+"\t\t%%s - èíslo SMSC pøíchozí zprávy, je-li k dispozici (jinak prázdné)\n"
 "--logo-send: odeslat Nokia logo\n"
 " <èíslo GSM sítì>\t* Logo oper.: Zadejte èíslo sítì ve tvaru MccMnc, napø. "
 "23002\n"
@@ -145,50 +150,50 @@ msgstr ""
 "./mdsms 2>&1|more\n"
 "\n"
 
-#: mdsms.c:327
+#: mdsms.c:329
 #, c-format
 msgid "^Error closing \"%s\""
 msgstr "^Chyba pøi uzavírání \"%s\""
 
-#: mdsms.c:335
+#: mdsms.c:337
 #, c-format
 msgid "^Error seeking to end of \"%s\""
 msgstr "^Nemohu nastavit ukazatel (seek) na konec \"%s\""
 
-#: mdsms.c:337
+#: mdsms.c:339
 #, c-format
 msgid "^Error measuring length of \"%s\""
 msgstr "^Nemohu zjistit délku \"%s\""
 
-#: mdsms.c:353
+#: mdsms.c:355
 #, c-format
 msgid "Too many config files to read, max is %d, break-out"
 msgstr ""
 "Pøíli¹ konfiguraèních souborù pro naèítání, maximum je %d, konèím s jejich "
 "ètením"
 
-#: mdsms.c:357
+#: mdsms.c:359
 #, c-format
 msgid "^Can't open config file \"%s\" for r/o"
 msgstr "^Nemohu otevøít konfiguraèní soubor \"%s\" pro ètení"
 
-#: mdsms.c:361
+#: mdsms.c:363
 #, c-format
 msgid ".Reading config file \"%s\""
 msgstr ".Naèítám konfiguraèní soubor \"%s\""
 
-#: mdsms.c:364
+#: mdsms.c:366
 #, c-format
 msgid "File \"%s\" is too long, read only %d bytes"
 msgstr "Soubor \"%s\" je pøíli¹ dlouhy, naèetl jsem pouze %d bajtù"
 
-#: mdsms.c:368
+#: mdsms.c:370
 #, c-format
 msgid "File \"%s\" read error, got only %u bytes of %ld"
 msgstr ""
 "Chyba pøi ètení \"%s\", naèetl jsem pouze %u bajtù z celkem %ld po¾adovaných"
 
-#: mdsms.c:379
+#: mdsms.c:381
 #, c-format
 msgid ""
 "\n"
@@ -197,19 +202,19 @@ msgstr ""
 "\n"
 "Konf. soubor \"%s\": argument #%d: %s"
 
-#: mdsms.c:385
+#: mdsms.c:387
 #, c-format
 msgid "Too many arguments in \"%s\", from offset %d ignored"
 msgstr "Pøíli¹ argumentù v \"%s\", od pozice %d ignorovány"
 
-#: mdsms.c:535
+#: mdsms.c:537
 #, c-format
 msgid "Looping (%d) during attempt to read config file \"%s\", break-out"
 msgstr ""
 "Pokus o zacyklení (%d) pøi ètení konfiguraèního souboru \"%s\", konèím "
 "naèítání"
 
-#: mdsms.c:574
+#: mdsms.c:576
 #, c-format
 msgid ""
 "\n"
@@ -220,31 +225,31 @@ msgstr ""
 "Poslední zobrazená chyba getopt(3)-u nastala pøi zpracování argumentu %d ze "
 "\"%s\"! Následuje nápovìda:"
 
-#: mdsms.c:595
+#: mdsms.c:597
 msgid "destination phone number"
 msgstr "cílový telefon"
 
-#: mdsms.c:596
+#: mdsms.c:598
 msgid "logo filename"
 msgstr "soubor s logem"
 
-#: mdsms.c:597
+#: mdsms.c:599
 msgid "ring filename"
 msgstr "soubor se zvonìním"
 
-#: mdsms.c:598
+#: mdsms.c:600
 msgid "body text"
 msgstr "text zprávy"
 
-#: mdsms.c:600
+#: mdsms.c:602
 msgid "GSM operator network code"
 msgstr "kód GSM sítì operátora"
 
-#: mdsms.c:601
+#: mdsms.c:603
 msgid "device for communication"
 msgstr "zaøízení pro komunikaci"
 
-#: mdsms.c:621
+#: mdsms.c:623
 #, c-format
 msgid ""
 "\n"
@@ -253,28 +258,28 @@ msgstr ""
 "\n"
 "Pøebyteèný argument %d ze \"%s\" zignorován: %s"
 
-#: mdsms.c:635
+#: mdsms.c:637
 #, c-format
 msgid "Invalid digit '%c' in phone number - at offset %d"
 msgstr "Chybný znak '%c' v telefonním èísle na pozici %d"
 
-#: mdsms.c:640
+#: mdsms.c:642
 #, c-format
 msgid "Phone number too long (%d), max. %d digits allowed"
 msgstr "Telefonní èíslo je pøíli¹ dlouhé (%d), povoleno max. %d èíslic"
 
-#: mdsms.c:651
+#: mdsms.c:653
 #, c-format
 msgid "!%s in option %d from \"%s\": %s"
 msgstr "!%s v argumentu %d ze \"%s\": %s"
 
-#: mdsms.c:666
+#: mdsms.c:668
 msgid "Unknown formatsymbol '%c' (use \"%%%%%c\" to fix it) at pos %d in: %s"
 msgstr ""
 "Neznámý formátovací znak '%c' (pou¾ijte \"%%%%%c\" pro opravu) na pozici %d "
 "ve: %s"
 
-#: mdsms.c:693
+#: mdsms.c:695
 #, c-format
 msgid ""
 "\n"
@@ -283,7 +288,7 @@ msgstr ""
 "\n"
 "Chybný znak '%c' v kódu GSM sítì na pozici %d: %s"
 
-#: mdsms.c:699
+#: mdsms.c:701
 #, c-format
 msgid ""
 "\n"
@@ -294,7 +299,7 @@ msgstr ""
 "Kód GSM sítì musí mít pøesnì 5 cifer nebo musí být buï\n"
 "\"%s\" èi \"%s\", ale jeho `nalezená délka je %d: %s"
 
-#: mdsms.c:706
+#: mdsms.c:708
 #, c-format
 msgid ""
 "\n"
@@ -303,112 +308,112 @@ msgstr ""
 "\n"
 "Kód GSM sítì, argument %d ze \"%s\" zahozen pro pøedchozí chyby: %s"
 
-#: mdsms.c:724
+#: mdsms.c:726
 #, c-format
 msgid "Error closing lockfile \"%s\""
 msgstr "^Nemohu uzavøít uzamykací soubor \"%s\""
 
-#: mdsms.c:743
+#: mdsms.c:745
 #, c-format
 msgid ".Checking the lockfile \"%s\".."
 msgstr ".Kontroluji uzamykací soubor \"%s\".."
 
-#: mdsms.c:748
+#: mdsms.c:750
 #, c-format
 msgid ".Lockfile \"%s\" is still not valid, removing it"
 msgstr ".Uzamykací soubor \"%s\" je¹tì stále není korektní, odstraòuji jej"
 
-#: mdsms.c:760
+#: mdsms.c:762
 #, c-format
 msgid "^Error during checking consciousness of PID %d"
 msgstr "^Chyba pøi kontrole ¾ivotaschopnosti procesu s PID %d"
 
-#: mdsms.c:765
+#: mdsms.c:767
 #, c-format
 msgid ".Lockfile \"%s\" is stale (PID %d), removing it"
 msgstr ".Uzamykací soubor \"%s\" je ji¾ neplatný (PID %d), odstraòuji jej"
 
-#: mdsms.c:769
+#: mdsms.c:771
 #, c-format
 msgid "^Error removing foreign lockfile \"%s\""
 msgstr "^Nemohu odstranit cizí uzamykací soubor \"%s\""
 
-#: mdsms.c:775
+#: mdsms.c:777
 #, c-format
 msgid "^!Error creating lockfile \"%s\""
 msgstr "^Nemohu vytvoøit uzamykací soubor \"%s\""
 
-#: mdsms.c:780
+#: mdsms.c:782
 #, c-format
 msgid "^!Error writing data to lockfile \"%s\""
 msgstr "^Nemohu zapisovat do uzamykacího souboru \"%s\""
 
-#: mdsms.c:800
+#: mdsms.c:802
 msgid "Timed out"
 msgstr "Maximální doba vypr¹ela"
 
-#: mdsms.c:808
+#: mdsms.c:810
 #, c-format
 msgid "^!fcntl() on device for %s mode"
 msgstr "^!Volání fcntl() na zaøizení pro získáni %s re¾imu"
 
-#: mdsms.c:808
+#: mdsms.c:810
 msgid "blocking"
 msgstr "blokujícího"
 
-#: mdsms.c:808
+#: mdsms.c:810
 msgid "non-blocking"
 msgstr "neblokujícího"
 
-#: mdsms.c:840
+#: mdsms.c:842
 #, c-format
 msgid "!Maximum command retry count (%ld) exceeded"
 msgstr "!Maximální poèet opakování pøíkazu (%ld) pøekroèen"
 
-#: mdsms.c:841
+#: mdsms.c:843
 #, c-format
 msgid ".Retrying phase, %d out of %ld.."
 msgstr ".Fáze opakování, poøadí %d z celkem %ld.."
 
-#: mdsms.c:854
+#: mdsms.c:856
 msgid "<unset>"
 msgstr "<nenastaveno>"
 
-#: mdsms.c:918
+#: mdsms.c:920
 #, c-format
 msgid "!Command too big (%d>%d)"
 msgstr "!Pøíkaz je pøíli¹ velký (%d>%d)"
 
-#: mdsms.c:919
+#: mdsms.c:921
 #, c-format
 msgid ".devcmd(send=%s,term=%s,catch=%s,timeout=%ld)"
 msgstr ".devcmd(poslat=%s,skonèit=%s,zachytit=%s,max. doba=%ld)"
 
-#: mdsms.c:926
+#: mdsms.c:928
 msgid "^Error flushing I/O queue of device"
 msgstr "^Nemohu vyprázdnit I/O frontu zaøízení"
 
-#: mdsms.c:930
+#: mdsms.c:932
 #, c-format
 msgid "^Error forcing output of char at pos %d of cmd %s"
 msgstr "^Nemohu zajistit výstup znaku na pozici %d pøíkazu %s"
 
-#: mdsms.c:934
+#: mdsms.c:936
 #, c-format
 msgid "^Wrote only %d of %d bytes of command"
 msgstr "^Zapsáno pouze %d z celkem %d bajtù pøíkazu"
 
-#: mdsms.c:968
+#: mdsms.c:970
 #, c-format
 msgid "Maximum response timeout (%lds) exceeded"
 msgstr "Maximální doba odezvy (%lds) pøekroèena"
 
-#: mdsms.c:969
+#: mdsms.c:971
 #, c-format
 msgid "^Couldn't read device data (ret=%d)"
 msgstr "^Nemohu èíst data zaøízení (návratový kód=%d)"
 
-#: mdsms.c:978
+#: mdsms.c:980
 #, c-format
 msgid ""
 "\n"
@@ -417,35 +422,35 @@ msgstr ""
 "\n"
 "Data ze zaøízení: %s"
 
-#: mdsms.c:990
+#: mdsms.c:992
 #, c-format
 msgid "Found ERROR response on command %s"
 msgstr "Nalezl jsem ERROR v odpovìdi na pøíkaz %s"
 
-#: mdsms.c:1008
+#: mdsms.c:1010
 #, c-format
 msgid "Data requested on command %s but no found after term %s"
 msgstr ""
 "U pøíkazu %s bylo po¾adováno vrácení dat, ale ¾ádná nebyla pøed naètením "
 "ukonèovaèe %s nalezena"
 
-#: mdsms.c:1014
+#: mdsms.c:1016
 #, c-format
 msgid ".Returning data %s for cmd %s"
 msgstr ".Vracím data %s pro pøíkaz %s"
 
-#: mdsms.c:1028
+#: mdsms.c:1030
 #, c-format
 msgid "!Error during conversion of number at: %s"
 msgstr "!Chyba pøi konverzi èísla od pozice: %s"
 
-#: mdsms.c:1068
+#: mdsms.c:1070
 msgid "!No SMSC set in mobile station found, please use option \"-s\""
 msgstr ""
 "!V mobilním zaøízení nebylo nalezeno èíslo SMSC, prosím pou¾ijte argument "
 "\"-s\""
 
-#: mdsms.c:1069
+#: mdsms.c:1071
 #, c-format
 msgid ""
 "\n"
@@ -454,33 +459,33 @@ msgstr ""
 "\n"
 "Nalezl jsem SMSC v mobilu: %s"
 
-#: mdsms.c:1070
+#: mdsms.c:1072
 #, c-format
 msgid "!No left-quote found in: %s"
 msgstr "!Chybí levé uvozovky: %s"
 
-#: mdsms.c:1071
+#: mdsms.c:1073
 #, c-format
 msgid "!No right-quote found in: %s"
 msgstr "!Chybí pravé uvozovky: %s"
 
-#: mdsms.c:1073
+#: mdsms.c:1075
 msgid "!No SMS set in mobile station found, please use option \"-s\""
 msgstr ""
 "!V mobilním zaøízení nebylo nalezeno èíslo SMSC, prosím pou¾ijte argument "
 "\"-s\""
 
-#: mdsms.c:1076
+#: mdsms.c:1078
 #, c-format
 msgid "!No comma found after quotes in: %s"
 msgstr "!Nenalezl jsem po uvozovkách èárku ve: %s"
 
-#: mdsms.c:1080
+#: mdsms.c:1082
 #, c-format
 msgid "!Type parse error in: %s"
 msgstr "!Chyba pøi dekódování typu ve: %s`"
 
-#: mdsms.c:1084
+#: mdsms.c:1086
 #, c-format
 msgid ""
 "\n"
@@ -489,14 +494,14 @@ msgstr ""
 "\n"
 "Zji¹tìné èíslo SMSC: %s"
 
-#: mdsms.c:1102
+#: mdsms.c:1104
 #, c-format
 msgid ""
 "Can't convert character '%c' (0x%02X) at offs %d (0-based), substituted '?'"
 msgstr ""
 "Nemohu zkonvertovat znak '%c' (0x%02X) na pozici %d (od 0-ly), substituji '?'"
 
-#: mdsms.c:1129
+#: mdsms.c:1142
 #, c-format
 msgid ""
 "\n"
@@ -505,27 +510,27 @@ msgstr ""
 "\n"
 "Pøipravil jsem hexdata: %s"
 
-#: mdsms.c:1151
+#: mdsms.c:1164
 #, c-format
 msgid "^!Cannot open logo file \"%s\" for r/o"
 msgstr "^!Nemohu otevøít soubor s logem \"%s\" pro ètení"
 
-#: mdsms.c:1158
+#: mdsms.c:1171
 #, c-format
 msgid ".Reading NOL file \"%s\", GSMnet \"%s\", word@4=%d.."
 msgstr ".Naèítám NOL soubor \"%s\", èíslo GSM sítì \"%s\", hodnota@4=%d.."
 
-#: mdsms.c:1163
+#: mdsms.c:1176
 #, c-format
 msgid ".Reading NGG file \"%s\", word@4=%d.."
 msgstr ".Naèítám NGG soubor \"%s\", hodnota@4=%d.."
 
-#: mdsms.c:1166
+#: mdsms.c:1179
 #, c-format
 msgid "!Unknown file format of logo file \"%s\""
 msgstr "!Neznámý formát souboru s logem \"%s\""
 
-#: mdsms.c:1168
+#: mdsms.c:1181
 msgid ""
 "!NOL network code detection requested but NOL file not loaded, please "
 "specify network code"
@@ -533,7 +538,7 @@ msgstr ""
 "!Byla po¾adována detekce èíslá GSM sítì z NOL, ale NOL soubor není k "
 "dispozici, specifikujte prosím èíslo GSM sítì"
 
-#: mdsms.c:1172
+#: mdsms.c:1185
 msgid ""
 "\n"
 "Sending logo as: group graphics"
@@ -541,7 +546,7 @@ msgstr ""
 "\n"
 "Posílám logo jako: symbol skupiny"
 
-#: mdsms.c:1176
+#: mdsms.c:1189
 #, c-format
 msgid ""
 "\n"
@@ -550,65 +555,65 @@ msgstr ""
 "\n"
 "Posílám logo jako: logo operátora \"%s\""
 
-#: mdsms.c:1181
+#: mdsms.c:1194
 #, c-format
 msgid ".Magic words: @+4=%d, @+6=%d, @+8=%d"
 msgstr ".Magické hodnoty: @+4=%d, @+6=%d, @+8=%d"
 
-#: mdsms.c:1185
+#: mdsms.c:1198
 #, c-format
 msgid "!Invalid size: %dx%d"
 msgstr "!Nesprávná velikost: %dx%d"
 
-#: mdsms.c:1187
+#: mdsms.c:1200
 #, c-format
 msgid "!Logo file \"%s\" too short - actual=%d, need(%dx%d)=%d"
 msgstr "!Soubor loga \"%s\" je pøíli¹ krátký - velikost=%d, potøebná(%dx%d)=%d"
 
-#: mdsms.c:1190
+#: mdsms.c:1203
 #, c-format
 msgid "Ignoring trailing garbage in \"%s\", used only %d bytes"
 msgstr "Ignoruji pøebyteèná data v \"%s\", pou¾il jsem pouze %d bajtù"
 
-#: mdsms.c:1192
+#: mdsms.c:1205
 #, c-format
 msgid "!SMS size would be %d bytes but 140 is maximum"
 msgstr "!Velikost SMS zprávy by byla %d bajtù, ale 140 je maximum"
 
-#: mdsms.c:1206
+#: mdsms.c:1219
 #, c-format
 msgid ""
 "!Invalid character (neither '0' nor '1') in logo file \"%s\" at offset 0x%X"
 msgstr ""
 "!Nekorektní znak (ani '0', ani '1') v souboru s logem \"%s\" na pozici 0x%X"
 
-#: mdsms.c:1247
+#: mdsms.c:1260
 #, c-format
 msgid "^!Cannot open ring file \"%s\" for r/o"
 msgstr "^!Nemohu otevøít soubor se zvonìním \"%s\" pro ètení"
 
-#: mdsms.c:1249
+#: mdsms.c:1262
 msgid "!File size determination is essential to continue operation"
 msgstr "!Zji¹tìní velikosti souboru je nutné pro pokraèování"
 
-#: mdsms.c:1251
+#: mdsms.c:1264
 #, c-format
 msgid "!File \"%s\" size %ld too small (must >=0x103)! Is it .000 file?"
 msgstr ""
 "!Velikost souboru \"%s\" %ld je pøíli¹ malá (musí být >=0x103)! Je to vùbec "
 ".000 soubor?"
 
-#: mdsms.c:1254
+#: mdsms.c:1267
 #, c-format
 msgid "^Seeking error on \"%s\", ignoring"
 msgstr "^Chyba pøi nastavování ukazatele (seek) ve \"%s\", ignoruji"
 
-#: mdsms.c:1258
+#: mdsms.c:1271
 #, c-format
 msgid "^Read error on \"%s\", wanted %ld, got %d"
 msgstr "^Chyba pøi ètení \"%s\", vy¾aduji %ld, získal jsem %d"
 
-#: mdsms.c:1259
+#: mdsms.c:1272
 #, c-format
 msgid ""
 "\n"
@@ -617,13 +622,13 @@ msgstr ""
 "\n"
 "Posílám zvonìní \"%s\" jako jedinou SMS zprávu (velikost %ld, maximum je %d)"
 
-#: mdsms.c:1266
+#: mdsms.c:1279
 #, c-format
 msgid "!File size %ld too large even for multi-SMS ring upload (max=%d)"
 msgstr ""
 "!Velikost souboru %ld je pøíli¹ velká i pro víceèás»ové SMS (maximum=%d)"
 
-#: mdsms.c:1270
+#: mdsms.c:1283
 #, c-format
 msgid ""
 "\n"
@@ -633,7 +638,7 @@ msgstr ""
 "Posílám zvonìní \"%s\" jako %d zpráv(y) (velikost %ld, maximum je %d, "
 "fragment %d)"
 
-#: mdsms.c:1274
+#: mdsms.c:1287
 #, c-format
 msgid ""
 "\n"
@@ -642,17 +647,17 @@ msgstr ""
 "\n"
 "Pou¾ívám unikátní èíslo víceèás»ové SMS 0x%02X"
 
-#: mdsms.c:1279
+#: mdsms.c:1292
 #, c-format
 msgid "^Read error on \"%s\", wanted %d, got %d"
 msgstr "^Chyba pøi ètení \"%s\", vy¾aduji %d, získal jsem %d"
 
-#: mdsms.c:1305
+#: mdsms.c:1318
 #, c-format
 msgid "Body too large (%d>%d), cut"
 msgstr "Velikost SMS textu pøíli¹ velká (%d>%d), zkrátil jsem jej"
 
-#: mdsms.c:1352
+#: mdsms.c:1365
 msgid ""
 "\n"
 "Please enter the SMS text body, end with EOF (ctrl-D):"
@@ -660,200 +665,309 @@ msgstr ""
 "\n"
 "Prosím zadejte text SMS zprávy, ukonèení pøes EOF (ctrl-D):"
 
-#: mdsms.c:1356
+#: mdsms.c:1369
 #, c-format
 msgid "^!Can't open data file \"%s\" for r/o"
 msgstr "^!Nemohu otevøít datový soubor \"%s\" pro ètení"
 
-#: mdsms.c:1361
+#: mdsms.c:1374
 #, c-format
 msgid "^!Error reading stream \"%s\""
 msgstr "^!Nemohu èíst soubor \"%s\""
 
-#: mdsms.c:1361
+#: mdsms.c:1374
 msgid "<stdin>"
 msgstr "<stdin/standardní vstup>"
 
-#: mdsms.c:1389
+#: mdsms.c:1402
 #, c-format
 msgid "!Device file descriptor %d can't fit in select() FD_SETSIZE (%d)"
 msgstr "!Deskriptor zaøízení %d se nevejde do FD_SETSIZE (%d) funkce select()"
 
-#: mdsms.c:1398
+#: mdsms.c:1411
 #, c-format
 msgid "^Failed (retval %d) while waiting for data, ignoring"
 msgstr "^Selhání (retval %d) pøí èekání na data, ignoruji"
 
-#: mdsms.c:1405
+#: mdsms.c:1418
 msgid "^Error while waiting for data, ignoring"
 msgstr "^Chyba pøi èekání na data, ignoruji"
 
-#: mdsms.c:1413
+#: mdsms.c:1426
 msgid "^No data input after waited for data, retrying"
 msgstr "^Po èekání na data jsem ¾ádná nezískal, zkou¹ím znovu"
 
-#: mdsms.c:1432
+#: mdsms.c:1445
 msgid "digit"
 msgstr "èíslici"
 
-#: mdsms.c:1436
+#: mdsms.c:1449
 msgid "+/- sign"
 msgstr "znaménko + èi -"
 
-#: mdsms.c:1443
+#: mdsms.c:1456
 #, c-format
 msgid "Expected %s, found '%c' at pos %d of string [%s], formatstring [%s]"
 msgstr ""
 "Oèekávám %s, nalezl jsem '%c' na pozici %d øetìzce [%s], formátovací øetìzec "
 "je [%s]"
 
-#: mdsms.c:1448
+#: mdsms.c:1461
 #, c-format
 msgid "String too short for format, string [%s], formatstring [%s]"
 msgstr ""
 "Øetìzec je pro daný formát pøíli¹ krátký, øetìzec [%s], formátovací øetìzec "
 "je [%s]"
 
-#: mdsms.c:1453
+#: mdsms.c:1466
 #, c-format
 msgid "Trailing garbage in string [%s], formatstring [%s]"
 msgstr "Koncová pøebyteèná data v øetìzci [%s], formátovací øetìzec je [%s]"
 
-#: mdsms.c:1475
+#: mdsms.c:1484
 msgid "year"
 msgstr "roku"
 
-#: mdsms.c:1476
+#: mdsms.c:1485
 msgid "month"
 msgstr "mìsíce"
 
-#: mdsms.c:1477
+#: mdsms.c:1486
 msgid "day of month"
 msgstr "dne v mìsíci"
 
-#: mdsms.c:1478
+#: mdsms.c:1487
 msgid "hour"
 msgstr "hodiny"
 
-#: mdsms.c:1479
+#: mdsms.c:1488
 msgid "minute"
 msgstr "minuty"
 
-#: mdsms.c:1480
+#: mdsms.c:1489
 msgid "second"
 msgstr "sekundy"
 
-#: mdsms.c:1489
+#: mdsms.c:1502
+#, c-format
+msgid "Weird value of %s, is %d but expected %d..%d, setting to %d"
+msgstr "Divná hodnota %s, je %d, ale oèekávám %d..%d, nastavuji na %d"
+
+#: mdsms.c:1512
+#, c-format
+msgid "^mktime(3) failed for %s"
+msgstr "^mktime(3) selhal pro %s"
+
+#: mdsms.c:1525
 #, c-format
 msgid "Cannot find initial '\"' in CMT header: %s"
 msgstr "Nemohu nalézt poèáteèní '\"' v CMT hlavièce: %s"
 
-#: mdsms.c:1494
+#: mdsms.c:1530
 #, c-format
 msgid "Only one '\"' found in CMT header: %s"
 msgstr "Nalezl jsem pouze jednu '\"' v CMT hlavièce: %s"
 
-#: mdsms.c:1503
+#: mdsms.c:1540
 #, c-format
 msgid "%s in CMT header: %s"
 msgstr "%s v CMT hlavièce: %s"
 
-#: mdsms.c:1510
-#, c-format
-msgid "Weird value of %s, is %d but expected %d..%d, setting to %d"
-msgstr "Divná hodnota %s, je %d, ale oèekávám %d..%d, nastavuji na %d"
-
-#: mdsms.c:1521
-#, c-format
-msgid "^mktime(3) failed for %s"
-msgstr "^mktime(3) selhal pro %s"
-
-#: mdsms.c:1544
+#: mdsms.c:1569
 msgid "Can't fork(2), process spawning may block receive"
 msgstr "Nemohu provést fork(2), spou¹tìní procesu mù¾e zablokovat ètení zpráv"
 
-#: mdsms.c:1572
+#: mdsms.c:1598
 msgid "Failing ctime(3), ignoring substitution"
 msgstr "ctime(3) sehlal, ignoruji substituci"
 
-#: mdsms.c:1583
+#: mdsms.c:1612
 #, c-format
 msgid "^Failing spawn of receive command: %s"
 msgstr "^Selhalo spu¹tìní pøíjímacího pøíkazu: %s"
 
-#: mdsms.c:1587
+#: mdsms.c:1616
 #, c-format
 msgid "^Failing write to child receive command: %s"
 msgstr "^Selhal zápis na vstup pøijímacího pøíkazu: %s"
 
-#: mdsms.c:1589
+#: mdsms.c:1618
 #, c-format
 msgid "^Spawned receive command failure (code %d): %s"
 msgstr "^Selhání pøijímacího pøíkazu (kód %d): %s"
 
-#: mdsms.c:1629
+#: mdsms.c:1660
+#, c-format
+msgid "Invalid value of \"%s\" at offset %d in: %s"
+msgstr "Nepovolená hodnota \"%s\" na pozici %d ve: %s"
+
+#: mdsms.c:1682
+#, c-format
+msgid "PDU too long (%d/2) to be valid: %s"
+msgstr "PDU zprávy pøíli¹ dlouhé (%d/2) na to, aby mohlo být správné: %s"
+
+#: mdsms.c:1684
+#, c-format
+msgid "PDU length odd (%d): %s"
+msgstr "Délka PDU zprávy je lichá (%d): %s"
+
+#: mdsms.c:1686
+#, c-format
+msgid "PDU length %d too small (min. 2*%d): %s"
+msgstr "Délka PDU zprávy %d je pøíli¹ malá (min. 2*%d): %s"
+
+#: mdsms.c:1689
+#, c-format
+msgid "Invalid hex byte: %c%c on byte %d in: %s"
+msgstr "Nepovolené hexadecimální vyjádøení bajtu: %c%c na bajtu %d ve: %s"
+
+#: mdsms.c:1700
+#, c-format
+msgid "SMSC length too large (%d, max. %d): %s"
+msgstr "Délka SMSC pøíli¹ velká (%d, max. %d): %s"
+
+#: mdsms.c:1706 mdsms.c:1725
+#, c-format
+msgid "Unknown address type 0x%02X of %s, ignoring in PDU: %s"
+msgstr "Neznámý typ adresy 0x%02X v %s, ignoruji v PDU: %s"
+
+#: mdsms.c:1706 mdsms.c:1709
+msgid "SMSC"
+msgstr "SMSC"
+
+#: mdsms.c:1709
+#, c-format
+msgid "Some digits unrecognized in %s \"%s\", ignoring in PDU: %s"
+msgstr "Nìkteré èíslice nebyly rozpoznány ve %s \"%s\", ignoruji v PDU: %s"
+
+#. PDU type
+#: mdsms.c:1713
+#, c-format
+msgid "Unrecognized PDU type 0x%02X at offset %d, dropping: %s"
+msgstr "Nerozpoznaný typ PDU 0x%02X na pozici %d, zahazuji: %s"
+
+#. OA len
+#: mdsms.c:1717
+#, c-format
+msgid "Originating number too large (%d, max. %d): %s"
+msgstr "Telefonní èíslo odesilate pøíli¹ dlouhé (%d, max. %d): %s"
+
+#: mdsms.c:1719
+#, c-format
+msgid "PDU length too short (want %d, is %d): %s"
+msgstr "Délka PDU pøíli¹ krátká (po¾aduji %d, je %d): %s"
+
+#: mdsms.c:1725 mdsms.c:1730
+msgid "originating number"
+msgstr "zdrojovém telefonním èíslu"
+
+#: mdsms.c:1729
+#, c-format
+msgid "Some digits unrecognized in %s \"%s\", ignoring in PDU at offset %d: %s"
+msgstr ""
+"Nìkteré èíslice nebyly rozpoznány ve %s \"%s\", ignoruji v PDU na pozici %d: "
+"%s"
+
+#. PID
+#: mdsms.c:1733
+#, c-format
+msgid "PID number %02X unsupported, ignoring: %s"
+msgstr "Hodnota PID %02X nepodporována, ignoruji: %s"
+
+#: mdsms.c:1737
+#, c-format
+msgid "DCS 0x%02X indicates 8-bit data, unsupported, dropping: %s"
+msgstr ""
+"Hodnota DCS 0x%02X vyjadøuje 8-mi bitová data, nepodporováno, zahazuji: %s"
+
+#: mdsms.c:1738
+#, c-format
+msgid "DCS 0x%02X unsupported, will attempt decoding: %s"
+msgstr "Hodnota DCS 0x%02X nepodporována, pokusím se o dekódování: %s"
+
+#: mdsms.c:1746
+#, c-format
+msgid "PDU data (%d) exceed maximum length of %d bytes, cut: %s"
+msgstr "Délka PDU dat (%d) pøekraèuje maximální hodnotu %d bajtù, oøíznuto: %s"
+
+#: mdsms.c:1756
+#, c-format
+msgid ""
+"PDU data length (%d/7->%d/8) longer than data (%d), cut to %d/7->%d/8: %s"
+msgstr ""
+"Délka PDU dat (%d/7->%d/8) del¹í ne¾ naètená data (%d), oøíznuto na "
+"%d/7->%d/8: %s"
+
+#: mdsms.c:1761
+#, c-format
+msgid "Trailing garbage ignored in PDU data (UDL %d/7->%d/8, got %d) in: %s"
+msgstr ""
+"Koncová pøebyteèná data zignorována v PDU datech (UDL %d/7->%d/8, dostal "
+"jsem %d) ve: %s"
+
+#: mdsms.c:1825
 msgid ""
 "atexit(3) not available at compilation time, device cleanup may be missed"
 msgstr ""
 "atexit(3) nebyla pøi kompilaci k dispozici, úklid stavu zaøízení nemusí být "
 "vykonán"
 
-#: mdsms.c:1647
+#: mdsms.c:1843
 msgid "<command-line>"
 msgstr "<pøíkazová øádka>"
 
-#: mdsms.c:1660
+#: mdsms.c:1856
 #, c-format
 msgid ".Detected mode \"%s\" from my program name \"%s\""
 msgstr ".Zdetekován re¾im \"%s\" z mého jména programu \"%\""
 
-#: mdsms.c:1662
+#: mdsms.c:1858
 #, c-format
 msgid ".Automatic mode detection unsuccessul for my progam name \"%s\""
 msgstr ""
 ".Automatická detekce re¾imu byla pro mé jméno programu \"%s\" neúspì¹ná"
 
-#: mdsms.c:1666
+#: mdsms.c:1862
 msgid "!Operation mode unset, use --send or similiar command, see help (-h)"
 msgstr ""
 "!Re¾im operace není nastaven, pou¾ijte --send èi jiný podobný argument, více "
 "viz nápovìda (-h)"
 
-#: mdsms.c:1667
+#: mdsms.c:1863
 #, c-format
 msgid ".Running program in mode \"%s\""
 msgstr ".Program byl spu¹tìn v re¾imu \"%s\""
 
-#: mdsms.c:1683
+#: mdsms.c:1879
 #, c-format
 msgid "Missing parameter \"%s\""
 msgstr "Chybí argument \"%s\""
 
-#: mdsms.c:1686
+#: mdsms.c:1882
 #, c-format
 msgid "!Previous %s considered unrecoverable"
 msgstr "!Pøedchozí %s pova¾uji za fatální"
 
-#: mdsms.c:1686
+#: mdsms.c:1882
 msgid "error"
 msgstr "chybu"
 
-#: mdsms.c:1686
+#: mdsms.c:1882
 msgid "errors"
 msgstr "chyby"
 
-#: mdsms.c:1697
+#: mdsms.c:1893
 #, c-format
 msgid "!Number parse error for parameter \"%s\" of \"%s\" at: %s"
 msgstr ""
 "!Chyba pøi dekódování èísla pro argument \"%s\" ze \"%s\" na pozici: %s"
 
-#: mdsms.c:1718
+#: mdsms.c:1914
 msgid "!Only one \"%%s\" permitted in lockfile format-string"
 msgstr ""
 "!Ve formátovacím øetìzci uzamykacího soubor je \"%%s\" povoleno jen jedno"
 
-#: mdsms.c:1721
+#: mdsms.c:1917
 msgid ""
 "!Invalid format-character '%c' in lockfile format-string, only \"%%s\" "
 "allowed"
@@ -861,81 +975,89 @@ msgstr ""
 "!Neznámý formátovací znak '%c' ve formátovacím øetìzci uzamykacího souboru, "
 "pouze \"%%s\" je povoleno"
 
-#: mdsms.c:1726
+#: mdsms.c:1922
 #, c-format
 msgid "^!Error opening log \"%s\" for append"
 msgstr "^!Chyba pøi otevírání logovacího souboru \"%s\" pro pøidávání (append)"
 
-#: mdsms.c:1727
+#: mdsms.c:1923
 #, c-format
 msgid "Starting up: %s"
 msgstr "Program spu¹tìn: %s"
 
-#: mdsms.c:1746
+#: mdsms.c:1942
 #, c-format
 msgid "Warning: -f / --file is forbidden with mode \"%s\""
 msgstr "Varování: -f / --file jsou povoleny jen v re¾imu \"%s\""
 
-#: mdsms.c:1756
+#: mdsms.c:1952
 #, c-format
 msgid "!Specified baudrate %ld is not supported"
 msgstr "!Specifikovaná baudová rychlost %ld není podporována"
 
-#: mdsms.c:1758
+#: mdsms.c:1954
 #, c-format
 msgid ".Will use baudrate %ld with hexval 0x%X"
 msgstr ".Pou¾iji baudovou rychlost %ld, hex hodnota 0x%X"
 
-#: mdsms.c:1762
+#: mdsms.c:1958
 #, c-format
 msgid ".Locking device \"%s\" by \"%s\".."
 msgstr ".Uzamykám zaøízení \"%s\" souborem \"%s\".."
 
-#: mdsms.c:1767
+#: mdsms.c:1963
 #, c-format
 msgid "Device lock succeeded after %ld seconds"
 msgstr "Uzamknutí zaøízení uspìlo po %ld sekundách"
 
-#: mdsms.c:1769
+#: mdsms.c:1965
 #, c-format
 msgid ".Opening device \"%s\".."
 msgstr ".Otevírám zaøízení \"%s\".."
 
-#: mdsms.c:1771
+#: mdsms.c:1967
 #, c-format
 msgid "^!Cannot open device \"%s\" for r/w access"
 msgstr "^!Nemohu otevøít zaøízení \"%s\" pro ètení i zápis"
 
-#: mdsms.c:1774
+#: mdsms.c:1970
 msgid "^Unable to get termios settings"
 msgstr "^Nemohu získat terminálová nastavení (termios)"
 
-#: mdsms.c:1788
+#: mdsms.c:1984
 msgid "^Error setting termios baudrate on device"
 msgstr "^Nemohu nastavit vlastnosti terminálu (termios) zaøízení"
 
-#: mdsms.c:1790
+#: mdsms.c:1986
 msgid "^Error flushing termios (TCIOFLUSH) on device"
 msgstr "^Nemohu vyprázdnit vstupnì-výstupní fronty (TCIOFLUSH) zaøízení"
 
-#: mdsms.c:1792
+#: mdsms.c:1988
 msgid "^!Unable to set initial termios device settings"
 msgstr "^!Nemohu nastavit poèáteèní vlastnosti terminálu (termios)"
 
-#: mdsms.c:1837
+#: mdsms.c:2004
+msgid ".Using AT+CMGF=1 (text mode).."
+msgstr ".Pou¾ívám AT+CMGF=1 (textový re¾im).."
+
+#: mdsms.c:2010
+msgid ".Using AT+CMGF=0 (PDU mode).."
+msgstr ".Pou¾ívám AT+CMGF=0 (PDU re¾im).."
+
+#: mdsms.c:2046
 msgid ".Initialization successful, infinite retry count set"
 msgstr ".Inicializace úspì¹ná, nastavil jsem nekoneèné opakování"
 
-#: mdsms.c:1847
+#: mdsms.c:2056
 msgid ".Dialout detected, waiting for lock.."
 msgstr ".Detekováno odchozí voláni, èekám na uzamknutí.."
 
-#: mdsms.c:1857
+#: mdsms.c:2066
 #, c-format
 msgid "Receive-header parsing failed on: %s"
 msgstr "Selhalo dekódování pøijímací hlavièky na: %s"
 
-#: mdsms.c:1871
+#: mdsms.c:2083
 #, c-format
 msgid ""
 "\n"
@@ -944,7 +1066,7 @@ msgstr ""
 "\n"
 "Zpráva úspì¹nì odeslána s MR (referenèní èíslo zprávy): %s"
 
-#: mdsms.c:1874
+#: mdsms.c:2086
 #, c-format
 msgid "SMS sent (after %d retries), message reference: %s"
 msgstr "SMS odeslána (po %d opakováních), referenèní èíslo zprávy: %s"