[ntp:questions] Re: using ACTS modem time service

cipo cseplo_l at netlock.net
Mon Nov 8 15:55:05 UTC 2004


The ACTS problems with ntp-dev-1107 are the same as those with 1102.
1. without writing "\r" after the phone call string on the serial 
port, the modem does not dial.
402.   if(write(pp->io.fd,sys_phone...
+  if(write(pp->io.fd,"\r",1) ....

2. Sometimes, my modem returns the modem initialization string, rather 
than "OK" as the answer for modem initialization.
   This problem can be solved, for example:
   in void acts_message(
389.   case S_OK:
+        if(strncmp(pp->a_lastcode,MODEM_SETUP,strlen(MODEM_SETUP)-1) == 0) {
+            return;
+        }
         if(strcmp(pp->a_lastcode,"OK") != 0) {
            acts_disc(peer);
            return;
         }

3. The cause for the coredump/segfault is in the acts_message function.
The tbuf is declared as char tbuf[SMAX], where SMAX defined as 80.
The 370. sprintf(tbuf, "acts: (%d %d) %d %s", up->state, 
up->timer, len,
pp->a_lastcode);
code causes the buffer overflow, and then segfault, because PTB and
METAS 
has 78 bytes long timecode.

4. In the modem initialization string (MODEM_SETUP), &C0 is required instead of &C1
for 
all European time services we tried, as suggested by Giuseppe. This 
is true for PTB (Deutch), METAS(Swiss), BEV (Osterreich).

-cipo






More information about the questions mailing list