From: stefanb@rama.informatik.rwth-aachen.de (Stefan Becker)
Newsgroups: comp.dcom.modems
Subject: Re: NetFax & ZyXEL U-1496E ... are they compatible???
Date: 31 Aug 92 18:09:55 GMT
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen

stefanb@hathi.informatik.rwth-aachen.de (Stefan Becker) writes:

>I have the patches at hand, anyone interested?

OK OK, you are interested :-) Here is the patch:

----------------------------- Cut Here ----------------------------------
diff -r -c fax-3.2/lib/libfax/gen.c netfax/lib/libfax/gen.c
*** fax-3.2/lib/libfax/gen.c	Wed Jun 24 22:32:25 1992
--- netfax/lib/libfax/gen.c	Tue Jul 14 12:51:06 1992
***************
*** 84,89 ****
--- 84,95 ----
  	tcdrain(f->fd); sleep(1);
  	fdprintf(f->fd, "ATS7=120 +FCR=1\r");
  	tcdrain(f->fd); sleep(1);
+ 	/* set DCE capabilities. +FDT= doesn't work on ZyXEL's */
+ 	fdprintf(f->fd, "AT+FDCC=1,5,0,2,0,0,0,4\r");
+ 	tcdrain(f->fd); sleep(1);
+ 	/* set local ID */
+ 	fdprintf(f->fd, "AT+FLID=4924184964\r");
+ 	tcdrain(f->fd); sleep(1);
  
  	/* flush any echoes or return codes */
  	tcflush(f->fd, TCIFLUSH);
diff -r -c fax-3.2/lib/libfax/response.c netfax/lib/libfax/response.c
*** fax-3.2/lib/libfax/response.c	Wed Jun 24 22:33:01 1992
--- netfax/lib/libfax/response.c	Fri Jun 26 10:33:57 1992
***************
*** 144,149 ****
--- 144,150 ----
      RESPONSE_NUMERIC,
      RESPONSE_TEXT,
      RESPONSE_CONNECT,
+ 	RESPONSE_OK,
      RESPONSE_DONE,
  } response_state;
  
***************
*** 233,242 ****
--- 234,254 ----
  		*reply_ptr++ = '\0';
  		if (strncmp(reply, "CONNECT", 7) == 0)
  		  state = RESPONSE_CONNECT;
+ 		else if (strncmp(reply, "OK", 2) == 0)
+ 		  state = RESPONSE_OK;
  		else
  		  parse_text_response(f, reply);
  	    } else
  	      *reply_ptr++ = c;
+ 	    break;
+ 
+ 	  case RESPONSE_OK:
+ 	    if (c != '\n')
+ 	      log(L_WARNING, "invalid ok message");
+ 	    else
+ 	      log(L_INFO, "received ok response");
+ 	    f->result = 0;
+ 	    state = RESPONSE_DONE;
  	    break;
  
  	  case RESPONSE_CONNECT:
diff -r -c fax-3.2/lib/libfax/send.c netfax/lib/libfax/send.c
*** fax-3.2/lib/libfax/send.c	Wed Jun 24 22:33:08 1992
--- netfax/lib/libfax/send.c	Tue Jul 14 12:58:30 1992
***************
*** 21,26 ****
--- 21,27 ----
  #include <stdio.h>
  #include <termios.h>
  #include <fcntl.h>
+ #include <unistd.h>
  
  #include "log.h"
  #include "c2proto.h"
***************
*** 133,139 ****
  {
      log(L_NOTICE, "setting xmit params: %d %d %d %d", df, vr, wd, ln);
  
!     if (fdprintf(f->fd, "AT+FDT=%d,%d,%d,%d\r", df, vr, wd, ln) < 0)
        return (-1);
  
      /*
--- 134,142 ----
  {
      log(L_NOTICE, "setting xmit params: %d %d %d %d", df, vr, wd, ln);
  
! /* +FDT= doesn't work on ZyXEL's */
! /*    if (fdprintf(f->fd, "AT+FDT=%d,%d,%d,%d\r", df, vr, wd, ln) < 0) */
!     if (fdprintf(f->fd, "AT+FDT\r") < 0)
        return (-1);
  
      /*
----------------------------- Cut Here ----------------------------------

	Stefan

-- 
Mail  : Stefan Becker, Holsteinstrasse 9, D-5100 Aachen  ///    Only
Phone : +49-241-505705                      Germany     ///  Amiga makes
Domain: stefanb@pool.informatik.rwth-aachen.de      \\\///  it possible..
FIDO  : 2:242/7.6, Stefan_Becker@mowgli.fido.de	     \XX/  -->A3000/25<--
Newsgroups: comp.dcom.modems